Chore: UI fixes and enhancements (#796)
Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
This commit is contained in:
parent
8906fd808d
commit
a951fb20cb
29 changed files with 335 additions and 250 deletions
|
@ -1,6 +1,10 @@
|
|||
<template>
|
||||
<transition-group name="toast-fade" tag="div" class="ui-snackbar-container">
|
||||
<woot-snackbar :message="snackMessage" v-for="snackMessage in snackMessages" v-bind:key="snackMessage" />
|
||||
<woot-snackbar
|
||||
v-for="snackMessage in snackMessages"
|
||||
:key="snackMessage"
|
||||
:message="snackMessage"
|
||||
/>
|
||||
</transition-group>
|
||||
</template>
|
||||
|
||||
|
@ -9,8 +13,12 @@
|
|||
import WootSnackbar from './Snackbar';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
WootSnackbar,
|
||||
},
|
||||
props: {
|
||||
duration: {
|
||||
type: Number,
|
||||
default: 2500,
|
||||
},
|
||||
},
|
||||
|
@ -22,16 +30,12 @@ export default {
|
|||
},
|
||||
|
||||
mounted() {
|
||||
bus.$on('newToastMessage', (message) => {
|
||||
bus.$on('newToastMessage', message => {
|
||||
this.snackMessages.push(message);
|
||||
window.setTimeout(() => {
|
||||
this.snackMessages.splice(0, 1);
|
||||
}, this.duration);
|
||||
});
|
||||
},
|
||||
|
||||
components: {
|
||||
WootSnackbar,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -44,12 +44,12 @@ export default {
|
|||
.file {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: $space-normal;
|
||||
padding: $space-smaller 0;
|
||||
cursor: pointer;
|
||||
|
||||
.icon-wrap {
|
||||
font-size: $font-size-giga;
|
||||
color: $color-woot;
|
||||
color: $color-white;
|
||||
line-height: 1;
|
||||
margin-left: $space-smaller;
|
||||
margin-right: $space-slab;
|
||||
|
@ -57,15 +57,22 @@ export default {
|
|||
|
||||
.text-block-title {
|
||||
margin: 0;
|
||||
color: $color-white;
|
||||
font-weight: $font-weight-bold;
|
||||
}
|
||||
|
||||
.button {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: $color-primary-light;
|
||||
}
|
||||
|
||||
.meta {
|
||||
padding-right: $space-two;
|
||||
}
|
||||
|
||||
.time {
|
||||
min-width: $space-larger;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<span class="message-text__wrap">
|
||||
<span class="time">{{ readableTime }}</span>
|
||||
<span v-html="message"></span>
|
||||
<span class="time">{{ readableTime }}</span>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue