summaryrefslogtreecommitdiff
path: root/src/client/app/common/views/widgets
diff options
context:
space:
mode:
authorrinsuki <428rinsuki+git@gmail.com>2018-05-17 07:52:24 +0900
committerrinsuki <428rinsuki+git@gmail.com>2018-05-17 07:52:24 +0900
commit829b4012e6dc14eb64a3d8f60826fe9b6a41b40d (patch)
tree42ac37f323db349dca9316e6fdb39fc33b860686 /src/client/app/common/views/widgets
parentadd yarn.lock to gitignore (diff)
parentUpdate deliver.ts (diff)
downloadmisskey-829b4012e6dc14eb64a3d8f60826fe9b6a41b40d.tar.gz
misskey-829b4012e6dc14eb64a3d8f60826fe9b6a41b40d.tar.bz2
misskey-829b4012e6dc14eb64a3d8f60826fe9b6a41b40d.zip
Merge branch 'master' into fix/yarn-lock-ignore
Diffstat (limited to 'src/client/app/common/views/widgets')
-rw-r--r--src/client/app/common/views/widgets/access-log.vue3
-rw-r--r--src/client/app/common/views/widgets/broadcast.vue1
-rw-r--r--src/client/app/common/views/widgets/calendar.vue21
-rw-r--r--src/client/app/common/views/widgets/donation.vue18
-rw-r--r--src/client/app/common/views/widgets/nav.vue29
-rw-r--r--src/client/app/common/views/widgets/photo-stream.vue2
-rw-r--r--src/client/app/common/views/widgets/rss.vue69
-rw-r--r--src/client/app/common/views/widgets/server.cpu-memory.vue11
-rw-r--r--src/client/app/common/views/widgets/server.cpu.vue10
-rw-r--r--src/client/app/common/views/widgets/server.disk.vue10
-rw-r--r--src/client/app/common/views/widgets/server.memory.vue10
-rw-r--r--src/client/app/common/views/widgets/server.pie.vue10
-rw-r--r--src/client/app/common/views/widgets/server.vue2
-rw-r--r--src/client/app/common/views/widgets/slideshow.vue6
-rw-r--r--src/client/app/common/views/widgets/tips.vue2
15 files changed, 137 insertions, 67 deletions
diff --git a/src/client/app/common/views/widgets/access-log.vue b/src/client/app/common/views/widgets/access-log.vue
index 637ba328c6..8652e35645 100644
--- a/src/client/app/common/views/widgets/access-log.vue
+++ b/src/client/app/common/views/widgets/access-log.vue
@@ -61,6 +61,7 @@ export default define({
} else {
this.props.design++;
}
+ this.save();
}
}
});
@@ -78,7 +79,7 @@ export default define({
color #555
&:nth-child(odd)
- background rgba(0, 0, 0, 0.025)
+ background rgba(#000, 0.025)
> b
margin-right 4px
diff --git a/src/client/app/common/views/widgets/broadcast.vue b/src/client/app/common/views/widgets/broadcast.vue
index 96d1d0ef3a..75b1d60524 100644
--- a/src/client/app/common/views/widgets/broadcast.vue
+++ b/src/client/app/common/views/widgets/broadcast.vue
@@ -68,6 +68,7 @@ export default define({
} else {
this.props.design++;
}
+ this.save();
}
}
});
diff --git a/src/client/app/common/views/widgets/calendar.vue b/src/client/app/common/views/widgets/calendar.vue
index 03f69a7597..41e9253784 100644
--- a/src/client/app/common/views/widgets/calendar.vue
+++ b/src/client/app/common/views/widgets/calendar.vue
@@ -73,6 +73,7 @@ export default define({
} else {
this.props.design++;
}
+ this.save();
},
tick() {
const now = new Date();
@@ -109,11 +110,11 @@ export default define({
<style lang="stylus" scoped>
@import '~const.styl'
-.mkw-calendar
+root(isDark)
padding 16px 0
- color #777
- background #fff
- border solid 1px rgba(0, 0, 0, 0.075)
+ color isDark ? #c5ced6 :#777
+ background isDark ? #282C37 : #fff
+ border solid 1px rgba(#000, 0.075)
border-radius 6px
&[data-special='on-new-years-day']
@@ -126,7 +127,7 @@ export default define({
&[data-mobile]
border none
border-radius 8px
- box-shadow 0 0 0 1px rgba(0, 0, 0, 0.2)
+ box-shadow 0 0 0 1px rgba(#000, 0.2)
&:after
content ""
@@ -171,7 +172,7 @@ export default define({
margin 0 0 2px 0
font-size 12px
line-height 18px
- color #888
+ color isDark ? #7a8692 : #888
> b
margin-left 2px
@@ -179,7 +180,7 @@ export default define({
> .meter
width 100%
overflow hidden
- background #eee
+ background isDark ? #1c1f25 : #eee
border-radius 8px
> .val
@@ -198,4 +199,10 @@ export default define({
> .meter > .val
background #41ddde
+.mkw-calendar[data-darkmode]
+ root(true)
+
+.mkw-calendar:not([data-darkmode])
+ root(false)
+
</style>
diff --git a/src/client/app/common/views/widgets/donation.vue b/src/client/app/common/views/widgets/donation.vue
index 6b5a6697ed..e35462611d 100644
--- a/src/client/app/common/views/widgets/donation.vue
+++ b/src/client/app/common/views/widgets/donation.vue
@@ -19,9 +19,9 @@ export default define({
</script>
<style lang="stylus" scoped>
-.mkw-donation
- background #fff
- border solid 1px #ead8bb
+root(isDark)
+ background isDark ? #282c37 : #fff
+ border solid 1px isDark ? #c3831c : #ead8bb
border-radius 6px
> article
@@ -30,7 +30,7 @@ export default define({
> h1
margin 0 0 5px 0
font-size 1em
- color #888
+ color isDark ? #b2bac1 : #888
> [data-fa]
margin-right 0.25em
@@ -40,13 +40,13 @@ export default define({
z-index 1
margin 0
font-size 0.8em
- color #999
+ color isDark ? #a1a6ab : #999
&[data-mobile]
border none
background #ead8bb
border-radius 8px
- box-shadow 0 0 0 1px rgba(0, 0, 0, 0.2)
+ box-shadow 0 0 0 1px rgba(#000, 0.2)
> article
> h1
@@ -55,4 +55,10 @@ export default define({
> p
color #777d71
+.mkw-donation[data-darkmode]
+ root(true)
+
+.mkw-donation:not([data-darkmode])
+ root(false)
+
</style>
diff --git a/src/client/app/common/views/widgets/nav.vue b/src/client/app/common/views/widgets/nav.vue
index 7bd5a7832f..0cbf7c158e 100644
--- a/src/client/app/common/views/widgets/nav.vue
+++ b/src/client/app/common/views/widgets/nav.vue
@@ -1,7 +1,7 @@
<template>
<div class="mkw-nav">
<mk-widget-container>
- <div :class="$style.body">
+ <div class="mkw-nav--body">
<mk-nav/>
</div>
</mk-widget-container>
@@ -15,17 +15,24 @@ export default define({
});
</script>
-<style lang="stylus" module>
-.body
- padding 16px
- font-size 12px
- color #aaa
- background #fff
+<style lang="stylus" scoped>
+root(isDark)
+ .mkw-nav--body
+ padding 16px
+ font-size 12px
+ color isDark ? #9aa4b3 : #aaa
+ background isDark ? #282c37 : #fff
- a
- color #999
+ a
+ color isDark ? #9aa4b3 : #999
- i
- color #ccc
+ i
+ color isDark ? #9aa4b3 : #ccc
+
+.mkw-nav[data-darkmode]
+ root(true)
+
+.mkw-nav:not([data-darkmode])
+ root(false)
</style>
diff --git a/src/client/app/common/views/widgets/photo-stream.vue b/src/client/app/common/views/widgets/photo-stream.vue
index c51d932bd1..ae5924bb10 100644
--- a/src/client/app/common/views/widgets/photo-stream.vue
+++ b/src/client/app/common/views/widgets/photo-stream.vue
@@ -59,6 +59,8 @@ export default define({
} else {
this.props.design++;
}
+
+ this.save();
}
}
});
diff --git a/src/client/app/common/views/widgets/rss.vue b/src/client/app/common/views/widgets/rss.vue
index 4d74b2f7a4..b5339add0b 100644
--- a/src/client/app/common/views/widgets/rss.vue
+++ b/src/client/app/common/views/widgets/rss.vue
@@ -4,9 +4,11 @@
<template slot="header">%fa:rss-square%RSS</template>
<button slot="func" title="設定" @click="setting">%fa:cog%</button>
- <p :class="$style.fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
- <div :class="$style.feed" v-else>
- <a v-for="item in items" :href="item.link" target="_blank">{{ item.title }}</a>
+ <div class="mkw-rss--body">
+ <p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
+ <div class="feed" v-else>
+ <a v-for="item in items" :href="item.link" target="_blank">{{ item.title }}</a>
+ </div>
</div>
</mk-widget-container>
</div>
@@ -38,6 +40,7 @@ export default define({
methods: {
func() {
this.props.compact = !this.props.compact;
+ this.save();
},
fetch() {
fetch(`https://api.rss2json.com/v1/api.json?rss_url=${this.url}`, {
@@ -56,38 +59,46 @@ export default define({
});
</script>
-<style lang="stylus" module>
-.feed
- padding 12px 16px
- font-size 0.9em
+<style lang="stylus" scoped>
+root(isDark)
+ .mkw-rss--body
+ .feed
+ padding 12px 16px
+ font-size 0.9em
- > a
- display block
- padding 4px 0
- color #666
- border-bottom dashed 1px #eee
+ > a
+ display block
+ padding 4px 0
+ color isDark ? #9aa4b3 : #666
+ border-bottom dashed 1px isDark ? #1c2023 : #eee
- &:last-child
- border-bottom none
+ &:last-child
+ border-bottom none
-.fetching
- margin 0
- padding 16px
- text-align center
- color #aaa
+ .fetching
+ margin 0
+ padding 16px
+ text-align center
+ color #aaa
- > [data-fa]
- margin-right 4px
+ > [data-fa]
+ margin-right 4px
-&[data-mobile]
- .feed
- padding 0
- font-size 1em
+ &[data-mobile]
+ .feed
+ padding 0
+ font-size 1em
- > a
- padding 8px 16px
+ > a
+ padding 8px 16px
- &:nth-child(even)
- background rgba(0, 0, 0, 0.05)
+ &:nth-child(even)
+ background rgba(#000, 0.05)
+
+.mkw-rss[data-darkmode]
+ root(true)
+
+.mkw-rss:not([data-darkmode])
+ root(false)
</style>
diff --git a/src/client/app/common/views/widgets/server.cpu-memory.vue b/src/client/app/common/views/widgets/server.cpu-memory.vue
index d75a142568..fbd36b255a 100644
--- a/src/client/app/common/views/widgets/server.cpu-memory.vue
+++ b/src/client/app/common/views/widgets/server.cpu-memory.vue
@@ -100,7 +100,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-.cpu-memory
+root(isDark)
> svg
display block
padding 10px
@@ -115,7 +115,7 @@ export default Vue.extend({
> text
font-size 5px
- fill rgba(0, 0, 0, 0.55)
+ fill isDark ? rgba(#fff, 0.55) : rgba(#000, 0.55)
> tspan
opacity 0.5
@@ -124,4 +124,11 @@ export default Vue.extend({
content ""
display block
clear both
+
+.cpu-memory[data-darkmode]
+ root(true)
+
+.cpu-memory:not([data-darkmode])
+ root(false)
+
</style>
diff --git a/src/client/app/common/views/widgets/server.cpu.vue b/src/client/app/common/views/widgets/server.cpu.vue
index 596c856da8..b9748bdf7c 100644
--- a/src/client/app/common/views/widgets/server.cpu.vue
+++ b/src/client/app/common/views/widgets/server.cpu.vue
@@ -38,7 +38,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-.cpu
+root(isDark)
> .pie
padding 10px
height 100px
@@ -52,7 +52,7 @@ export default Vue.extend({
> p
margin 0
font-size 12px
- color #505050
+ color isDark ? #a8b4bd : #505050
&:first-child
font-weight bold
@@ -65,4 +65,10 @@ export default Vue.extend({
display block
clear both
+.cpu[data-darkmode]
+ root(true)
+
+.cpu:not([data-darkmode])
+ root(false)
+
</style>
diff --git a/src/client/app/common/views/widgets/server.disk.vue b/src/client/app/common/views/widgets/server.disk.vue
index 2af1982a96..5c7e9678de 100644
--- a/src/client/app/common/views/widgets/server.disk.vue
+++ b/src/client/app/common/views/widgets/server.disk.vue
@@ -46,7 +46,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-.disk
+root(isDark)
> .pie
padding 10px
height 100px
@@ -60,7 +60,7 @@ export default Vue.extend({
> p
margin 0
font-size 12px
- color #505050
+ color isDark ? #a8b4bd : #505050
&:first-child
font-weight bold
@@ -73,4 +73,10 @@ export default Vue.extend({
display block
clear both
+.disk[data-darkmode]
+ root(true)
+
+.disk:not([data-darkmode])
+ root(false)
+
</style>
diff --git a/src/client/app/common/views/widgets/server.memory.vue b/src/client/app/common/views/widgets/server.memory.vue
index 834a62671d..9212f2271f 100644
--- a/src/client/app/common/views/widgets/server.memory.vue
+++ b/src/client/app/common/views/widgets/server.memory.vue
@@ -46,7 +46,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-.memory
+root(isDark)
> .pie
padding 10px
height 100px
@@ -60,7 +60,7 @@ export default Vue.extend({
> p
margin 0
font-size 12px
- color #505050
+ color isDark ? #a8b4bd : #505050
&:first-child
font-weight bold
@@ -73,4 +73,10 @@ export default Vue.extend({
display block
clear both
+.memory[data-darkmode]
+ root(true)
+
+.memory:not([data-darkmode])
+ root(false)
+
</style>
diff --git a/src/client/app/common/views/widgets/server.pie.vue b/src/client/app/common/views/widgets/server.pie.vue
index ce2cff1d00..d557c52ea5 100644
--- a/src/client/app/common/views/widgets/server.pie.vue
+++ b/src/client/app/common/views/widgets/server.pie.vue
@@ -45,7 +45,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-svg
+root(isDark)
display block
height 100%
@@ -56,6 +56,12 @@ svg
> text
font-size 0.15px
- fill rgba(0, 0, 0, 0.6)
+ fill isDark ? rgba(#fff, 0.6) : rgba(#000, 0.6)
+
+svg[data-darkmode]
+ root(true)
+
+svg:not([data-darkmode])
+ root(false)
</style>
diff --git a/src/client/app/common/views/widgets/server.vue b/src/client/app/common/views/widgets/server.vue
index 2fbc07adf0..2fdd60499b 100644
--- a/src/client/app/common/views/widgets/server.vue
+++ b/src/client/app/common/views/widgets/server.vue
@@ -68,6 +68,7 @@ export default define({
} else {
this.props.view++;
}
+ this.save();
},
func() {
if (this.props.design == 2) {
@@ -75,6 +76,7 @@ export default define({
} else {
this.props.design++;
}
+ this.save();
}
}
});
diff --git a/src/client/app/common/views/widgets/slideshow.vue b/src/client/app/common/views/widgets/slideshow.vue
index ad32299f37..459b24a32f 100644
--- a/src/client/app/common/views/widgets/slideshow.vue
+++ b/src/client/app/common/views/widgets/slideshow.vue
@@ -64,6 +64,7 @@ export default define({
} else {
this.props.size++;
}
+ this.save();
this.applySize();
},
@@ -111,6 +112,7 @@ export default define({
choose() {
(this as any).apis.chooseDriveFolder().then(folder => {
this.props.folder = folder ? folder.id : null;
+ this.save();
this.fetch();
});
}
@@ -122,13 +124,13 @@ export default define({
.mkw-slideshow
overflow hidden
background #fff
- border solid 1px rgba(0, 0, 0, 0.075)
+ border solid 1px rgba(#000, 0.075)
border-radius 6px
&[data-mobile]
border none
border-radius 8px
- box-shadow 0 0 0 1px rgba(0, 0, 0, 0.2)
+ box-shadow 0 0 0 1px rgba(#000, 0.2)
> div
width 100%
diff --git a/src/client/app/common/views/widgets/tips.vue b/src/client/app/common/views/widgets/tips.vue
index bdecc068e1..08e665f92f 100644
--- a/src/client/app/common/views/widgets/tips.vue
+++ b/src/client/app/common/views/widgets/tips.vue
@@ -17,7 +17,7 @@ const tips = [
'ドライブでファイルをドラッグしてフォルダ移動できます',
'ドライブでフォルダをドラッグしてフォルダ移動できます',
'ホームは設定からカスタマイズできます',
- 'MisskeyはMIT Licenseです',
+ 'MisskeyはAGPLv3です',
'タイムマシンウィジェットを利用すると、簡単に過去のタイムラインに遡れます',
'投稿の ... をクリックして、投稿をユーザーページにピン留めできます',
'ドライブの容量は(デフォルトで)1GBです',