1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2025-01-31 09:35:16 +01:00

refs #98 Set color from theme color in notifications

This commit is contained in:
AkiraFukushima 2018-04-13 09:23:33 +09:00
parent 7de18166c3
commit 5144eaa52d
4 changed files with 59 additions and 23 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="favourite" tabIndex="0"> <div class="favourite" tabIndex="0" :style="theme">
<div class="action"> <div class="action">
<div class="action-mark"> <div class="action-mark">
<icon name="star" scale="0.7"></icon> <icon name="star" scale="0.7"></icon>
@ -36,10 +36,20 @@
<script> <script>
import moment from 'moment' import moment from 'moment'
import { shell } from 'electron' import { shell } from 'electron'
import { mapState } from 'vuex'
export default { export default {
name: 'favourite', name: 'favourite',
props: ['message'], props: ['message'],
computed: {
...mapState({
theme: (state) => {
return {
'--theme-border-color': state.App.theme.border_color
}
}
})
},
methods: { methods: {
username (account) { username (account) {
if (account.display_name !== '') { if (account.display_name !== '') {
@ -80,17 +90,13 @@ function findLink (target) {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.fill-line {
height: 1px;
background-color: #f2f6fc;
margin: 4px 0 0;
}
.bold { .bold {
font-weight: bold; font-weight: bold;
} }
.favourite { .favourite {
--theme-border-color: #ebeef5;
padding: 8px 0 0 16px; padding: 8px 0 0 16px;
.action { .action {
@ -163,6 +169,12 @@ function findLink (target) {
} }
} }
} }
.fill-line {
height: 1px;
background-color: var(--theme-border-color);
margin: 4px 0 0;
}
} }
.favourite:focus { .favourite:focus {

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="follow" tabIndex="0"> <div class="follow" tabIndex="0" :style="theme">
<div class="action"> <div class="action">
<div class="action-mark"> <div class="action-mark">
<icon name="user-plus" scale="0.7"></icon> <icon name="user-plus" scale="0.7"></icon>
@ -17,9 +17,20 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex'
export default { export default {
name: 'follow', name: 'follow',
props: ['message'], props: ['message'],
computed: {
...mapState({
theme: (state) => {
return {
'--theme-border-color': state.App.theme.border_color
}
}
})
},
methods: { methods: {
username (account) { username (account) {
if (account.display_name !== '') { if (account.display_name !== '') {
@ -38,17 +49,12 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.fill-line {
height: 1px;
background-color: #f2f6fc;
margin: 4px 0 0;
}
.bold { .bold {
font-weight: bold; font-weight: bold;
} }
.follow { .follow {
--theme-border-color: #ebeef5;
padding: 8px 0 0 16px; padding: 8px 0 0 16px;
.action { .action {
@ -86,6 +92,12 @@ export default {
} }
} }
} }
.fill-line {
height: 1px;
background-color: var(--theme-border-color);
margin: 4px 0 0;
}
} }
.follow:focus { .follow:focus {

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="reblog" tabIndex="0"> <div class="reblog" tabIndex="0" :style="theme">
<div class="action"> <div class="action">
<div class="action-mark"> <div class="action-mark">
<icon name="retweet" scala="0.7"></icon> <icon name="retweet" scala="0.7"></icon>
@ -36,10 +36,20 @@
<script> <script>
import moment from 'moment' import moment from 'moment'
import { shell } from 'electron' import { shell } from 'electron'
import { mapState } from 'vuex'
export default { export default {
name: 'reblog', name: 'reblog',
props: ['message'], props: ['message'],
computed: {
...mapState({
theme: (state) => {
return {
'--theme-border-color': state.App.theme.border_color
}
}
})
},
methods: { methods: {
username (account) { username (account) {
if (account.display_name !== '') { if (account.display_name !== '') {
@ -80,17 +90,12 @@ function findLink (target) {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.fill-line {
height: 1px;
background-color: #f2f6fc;
margin: 4px 0 0;
}
.bold { .bold {
font-weight: bold; font-weight: bold;
} }
.reblog { .reblog {
--theme-border-color: #ebeef5;
padding: 8px 0 0 16px; padding: 8px 0 0 16px;
.action { .action {
@ -161,6 +166,12 @@ function findLink (target) {
} }
} }
} }
.fill-line {
height: 1px;
background-color: var(--theme-border-color);
margin: 4px 0 0;
}
} }
.reblog:focus { .reblog:focus {

View File

@ -3,7 +3,7 @@
<div class="notifications" v-for="message in notifications" v-bind:key="message.id"> <div class="notifications" v-for="message in notifications" v-bind:key="message.id">
<notification :message="message"></notification> <notification :message="message"></notification>
</div> </div>
<div class="loading-card" v-loading="lazyLoading"> <div class="loading-card" v-loading="lazyLoading" :element-loading-background="backgroundColor">
</div> </div>
</div> </div>
</template> </template>
@ -18,7 +18,8 @@ export default {
computed: { computed: {
...mapState({ ...mapState({
notifications: state => state.TimelineSpace.notifications, notifications: state => state.TimelineSpace.notifications,
lazyLoading: state => state.TimelineSpace.Contents.Notifications.lazyLoading lazyLoading: state => state.TimelineSpace.Contents.Notifications.lazyLoading,
backgroundColor: state => state.App.theme.background_color
}) })
}, },
mounted () { mounted () {