💄 (#250) Item description capped at 2 lines

This commit is contained in:
Alicia Sykes 2021-10-02 17:02:47 +01:00
parent 018576fd24
commit b88f128154
2 changed files with 23 additions and 5 deletions

View File

@ -1,5 +1,5 @@
<template ref="container"> <template ref="container">
<div class="item-wrapper"> <div :class="`item-wrapper wrap-size-${itemSize}`">
<a @click="itemOpened" <a @click="itemOpened"
@mouseup.right="openContextMenu" @mouseup.right="openContextMenu"
@contextmenu.prevent @contextmenu.prevent
@ -144,7 +144,7 @@ export default {
html: true, html: true,
placement: this.statusResponse ? 'left' : 'auto', placement: this.statusResponse ? 'left' : 'auto',
delay: { show: 600, hide: 200 }, delay: { show: 600, hide: 200 },
classes: 'item-description-tooltip', classes: `item-description-tooltip tooltip-is-${this.itemSize}`,
}; };
}, },
/* Used by certain themes, which display an icon with animated CSS */ /* Used by certain themes, which display an icon with animated CSS */
@ -239,6 +239,10 @@ export default {
.item-wrapper { .item-wrapper {
flex-grow: 1; flex-grow: 1;
flex-basis: 6rem;
&.wrap-size-large {
flex-basis: 12rem;
}
} }
.item { .item {
@ -392,11 +396,13 @@ export default {
width: 100%; width: 100%;
} }
p.description { p.description {
display: block;
margin: 0; margin: 0;
display: block;
white-space: pre-wrap; white-space: pre-wrap;
font-size: .9em;
text-overflow: ellipsis; text-overflow: ellipsis;
font-size: .9em;
line-height: 1rem;
height: 2rem;
} }
} }
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="item-icon"> <div :class="`item-icon wrapper-${size}`">
<!-- Font-Awesome Icon --> <!-- Font-Awesome Icon -->
<i v-if="iconType === 'font-awesome'" :class="`${icon} ${size}`" ></i> <i v-if="iconType === 'font-awesome'" :class="`${icon} ${size}`" ></i>
<!-- Emoji Icon --> <!-- Emoji Icon -->
@ -189,6 +189,18 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
/* Icon wraper */
.item-icon {
&.wrapper-medium {
min-height: 2.5rem;
}
&.wrapper-large {
min-width: 3.5rem;
text-align: center;
}
}
/* Default Image Icon */ /* Default Image Icon */
.tile-icon { .tile-icon {
min-width: 1rem; min-width: 1rem;