@@ -222,7 +223,7 @@ root(isDark)
overflow hidden
text-align left
background isDark ? #282C37 : #fff
- border solid 1px rgba(0, 0, 0, 0.1)
+ border solid 1px rgba(#000, 0.1)
border-radius 8px
> .read-more
diff --git a/src/client/app/desktop/views/components/notes.note.vue b/src/client/app/desktop/views/components/notes.note.vue
index e8fabe3c63..4d7e6ee8b8 100644
--- a/src/client/app/desktop/views/components/notes.note.vue
+++ b/src/client/app/desktop/views/components/notes.note.vue
@@ -607,7 +607,7 @@ root(isDark)
> .detail
padding-top 4px
- background rgba(0, 0, 0, 0.0125)
+ background rgba(#000, 0.0125)
.note[data-darkmode]
root(true)
diff --git a/src/client/app/desktop/views/components/notifications.vue b/src/client/app/desktop/views/components/notifications.vue
index 47463b8b5b..36e9dce6af 100644
--- a/src/client/app/desktop/views/components/notifications.vue
+++ b/src/client/app/desktop/views/components/notifications.vue
@@ -204,7 +204,7 @@ root(isDark)
padding 16px
overflow-wrap break-word
font-size 0.9em
- border-bottom solid 1px isDark ? #1c2023 : rgba(0, 0, 0, 0.05)
+ border-bottom solid 1px isDark ? #1c2023 : rgba(#000, 0.05)
&:last-child
border-bottom none
@@ -215,7 +215,7 @@ root(isDark)
top 16px
right 12px
vertical-align top
- color isDark ? #606984 : rgba(0, 0, 0, 0.6)
+ color isDark ? #606984 : rgba(#000, 0.6)
font-size small
&:after
@@ -250,10 +250,10 @@ root(isDark)
margin-right 4px
.note-preview
- color isDark ? #c2cad4 : rgba(0, 0, 0, 0.7)
+ color isDark ? #c2cad4 : rgba(#000, 0.7)
.note-ref
- color isDark ? #c2cad4 : rgba(0, 0, 0, 0.7)
+ color isDark ? #c2cad4 : rgba(#000, 0.7)
[data-fa]
font-size 1em
@@ -282,7 +282,7 @@ root(isDark)
font-size 0.8em
color isDark ? #666b79 : #aaa
background isDark ? #242731 : #fdfdfd
- border-bottom solid 1px isDark ? #1c2023 : rgba(0, 0, 0, 0.05)
+ border-bottom solid 1px isDark ? #1c2023 : rgba(#000, 0.05)
span
margin 0 16px
@@ -295,13 +295,13 @@ root(isDark)
width 100%
padding 16px
color #555
- border-top solid 1px rgba(0, 0, 0, 0.05)
+ border-top solid 1px rgba(#000, 0.05)
&:hover
- background rgba(0, 0, 0, 0.025)
+ background rgba(#000, 0.025)
&:active
- background rgba(0, 0, 0, 0.05)
+ background rgba(#000, 0.05)
&.fetching
cursor wait
diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue
index d704cdc3ca..92a7f9ada7 100644
--- a/src/client/app/desktop/views/components/post-form.vue
+++ b/src/client/app/desktop/views/components/post-form.vue
@@ -364,7 +364,6 @@ root(isDark)
clear both
> .content
-
> input
> textarea
display block
@@ -585,7 +584,7 @@ root(isDark)
color rgba($theme-color, 0.6)
background isDark ? transparent : linear-gradient(to bottom, lighten($theme-color, 80%) 0%, lighten($theme-color, 90%) 100%)
border-color rgba($theme-color, 0.5)
- box-shadow 0 2px 4px rgba(0, 0, 0, 0.15) inset
+ box-shadow 0 2px 4px rgba(#000, 0.15) inset
&:focus
&:after
diff --git a/src/client/app/desktop/views/components/timeline.vue b/src/client/app/desktop/views/components/timeline.vue
index 2047b5dced..bcfce299f4 100644
--- a/src/client/app/desktop/views/components/timeline.vue
+++ b/src/client/app/desktop/views/components/timeline.vue
@@ -59,7 +59,7 @@ export default Vue.extend({
root(isDark)
background isDark ? #282C37 : #fff
- border solid 1px rgba(0, 0, 0, 0.075)
+ border solid 1px rgba(#000, 0.075)
border-radius 6px
> header
diff --git a/src/client/app/desktop/views/components/ui.header.account.vue b/src/client/app/desktop/views/components/ui.header.account.vue
index 5148c5b967..145666b4bc 100644
--- a/src/client/app/desktop/views/components/ui.header.account.vue
+++ b/src/client/app/desktop/views/components/ui.header.account.vue
@@ -165,7 +165,7 @@ root(isDark)
font-size 0.8em
background $bgcolor
border-radius 4px
- box-shadow 0 1px 4px rgba(0, 0, 0, 0.25)
+ box-shadow 0 1px 4px rgba(#000, 0.25)
&:before
content ""
@@ -176,7 +176,7 @@ root(isDark)
right 12px
border-top solid 14px transparent
border-right solid 14px transparent
- border-bottom solid 14px rgba(0, 0, 0, 0.1)
+ border-bottom solid 14px rgba(#000, 0.1)
border-left solid 14px transparent
&:after
diff --git a/src/client/app/desktop/views/components/ui.header.notifications.vue b/src/client/app/desktop/views/components/ui.header.notifications.vue
index 5326f92836..ea814dd7a3 100644
--- a/src/client/app/desktop/views/components/ui.header.notifications.vue
+++ b/src/client/app/desktop/views/components/ui.header.notifications.vue
@@ -125,7 +125,7 @@ root(isDark)
width 300px
background $bgcolor
border-radius 4px
- box-shadow 0 1px 4px rgba(0, 0, 0, 0.25)
+ box-shadow 0 1px 4px rgba(#000, 0.25)
&:before
content ""
@@ -136,7 +136,7 @@ root(isDark)
right 74px
border-top solid 14px transparent
border-right solid 14px transparent
- border-bottom solid 14px rgba(0, 0, 0, 0.1)
+ border-bottom solid 14px rgba(#000, 0.1)
border-left solid 14px transparent
&:after
diff --git a/src/client/app/desktop/views/components/ui.header.search.vue b/src/client/app/desktop/views/components/ui.header.search.vue
index 3167aab8ab..1ed28ba3a8 100644
--- a/src/client/app/desktop/views/components/ui.header.search.vue
+++ b/src/client/app/desktop/views/components/ui.header.search.vue
@@ -50,7 +50,7 @@ export default Vue.extend({
width 14em
height 32px
font-size 1em
- background rgba(0, 0, 0, 0.05)
+ background rgba(#000, 0.05)
outline none
//border solid 1px #ddd
border none
@@ -62,7 +62,7 @@ export default Vue.extend({
color #9eaba8
&:hover
- background rgba(0, 0, 0, 0.08)
+ background rgba(#000, 0.08)
&:focus
box-shadow 0 0 0 2px rgba($theme-color, 0.5) !important
diff --git a/src/client/app/desktop/views/components/ui.header.vue b/src/client/app/desktop/views/components/ui.header.vue
index 7ce85d4c3d..353fd58561 100644
--- a/src/client/app/desktop/views/components/ui.header.vue
+++ b/src/client/app/desktop/views/components/ui.header.vue
@@ -103,7 +103,7 @@ root(isDark)
top 0
z-index 1000
width 100%
- box-shadow 0 1px 1px rgba(0, 0, 0, 0.075)
+ box-shadow 0 1px 1px rgba(#000, 0.075)
> .main
height 48px
diff --git a/src/client/app/desktop/views/components/user-preview.vue b/src/client/app/desktop/views/components/user-preview.vue
index 2e1870800f..d0111d7dc5 100644
--- a/src/client/app/desktop/views/components/user-preview.vue
+++ b/src/client/app/desktop/views/components/user-preview.vue
@@ -94,7 +94,7 @@ root(isDark)
width 250px
background isDark ? #282c37 : #fff
background-clip content-box
- border solid 1px rgba(0, 0, 0, 0.1)
+ border solid 1px rgba(#000, 0.1)
border-radius 4px
overflow hidden
opacity 0
diff --git a/src/client/app/desktop/views/components/users-list.vue b/src/client/app/desktop/views/components/users-list.vue
index e8f4c94d42..13d0d07bbc 100644
--- a/src/client/app/desktop/views/components/users-list.vue
+++ b/src/client/app/desktop/views/components/users-list.vue
@@ -119,7 +119,7 @@ export default Vue.extend({
overflow auto
> *
- border-bottom solid 1px rgba(0, 0, 0, 0.05)
+ border-bottom solid 1px rgba(#000, 0.05)
> *
max-width 600px
diff --git a/src/client/app/desktop/views/components/widget-container.vue b/src/client/app/desktop/views/components/widget-container.vue
index 926d7702b9..2edba5a230 100644
--- a/src/client/app/desktop/views/components/widget-container.vue
+++ b/src/client/app/desktop/views/components/widget-container.vue
@@ -36,7 +36,7 @@ export default Vue.extend({
+.mk-post-form[data-darkmode]
+ root(true)
+
+.mk-post-form:not([data-darkmode])
+ root(false)
+
diff --git a/src/client/app/mobile/views/components/users-list.vue b/src/client/app/mobile/views/components/users-list.vue
index 67a38a8955..6175067459 100644
--- a/src/client/app/mobile/views/components/users-list.vue
+++ b/src/client/app/mobile/views/components/users-list.vue
@@ -74,7 +74,7 @@ export default Vue.extend({
justify-content center
margin 0 auto
max-width 600px
- border-bottom solid 1px rgba(0, 0, 0, 0.2)
+ border-bottom solid 1px rgba(#000, 0.2)
> span
display block
@@ -97,7 +97,7 @@ export default Vue.extend({
font-size 12px
line-height 1
color #fff
- background rgba(0, 0, 0, 0.3)
+ background rgba(#000, 0.3)
border-radius 20px
> .users
@@ -106,14 +106,14 @@ export default Vue.extend({
width calc(100% - 16px)
background #fff
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)
@media (min-width 500px)
margin 16px auto
width calc(100% - 32px)
> *
- border-bottom solid 1px rgba(0, 0, 0, 0.05)
+ border-bottom solid 1px rgba(#000, 0.05)
> .no
margin 0
diff --git a/src/client/app/mobile/views/components/widget-container.vue b/src/client/app/mobile/views/components/widget-container.vue
index 7319c90849..1bdc875763 100644
--- a/src/client/app/mobile/views/components/widget-container.vue
+++ b/src/client/app/mobile/views/components/widget-container.vue
@@ -28,7 +28,7 @@ export default Vue.extend({
.mk-widget-container
background #eee
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)
overflow hidden
&.hideHeader
diff --git a/src/client/app/mobile/views/pages/home.vue b/src/client/app/mobile/views/pages/home.vue
index e43c5876e6..f69c4d9c68 100644
--- a/src/client/app/mobile/views/pages/home.vue
+++ b/src/client/app/mobile/views/pages/home.vue
@@ -121,7 +121,7 @@ root(isDark)
margin 0 auto
background isDark ? #272f3a : #fff
border-radius 8px
- box-shadow 0 0 16px rgba(0, 0, 0, 0.1)
+ box-shadow 0 0 16px rgba(#000, 0.1)
$balloon-size = 16px
diff --git a/src/client/app/mobile/views/pages/profile-setting.vue b/src/client/app/mobile/views/pages/profile-setting.vue
index d0b9095cef..7048cdef31 100644
--- a/src/client/app/mobile/views/pages/profile-setting.vue
+++ b/src/client/app/mobile/views/pages/profile-setting.vue
@@ -136,7 +136,7 @@ export default Vue.extend({
.form
position relative
background #fff
- box-shadow 0 0 0 1px rgba(0, 0, 0, 0.2)
+ box-shadow 0 0 0 1px rgba(#000, 0.2)
border-radius 8px
&:before
@@ -145,7 +145,7 @@ export default Vue.extend({
position absolute
bottom -20px
left calc(50% - 10px)
- border-top solid 10px rgba(0, 0, 0, 0.2)
+ border-top solid 10px rgba(#000, 0.2)
border-right solid 10px transparent
border-bottom solid 10px transparent
border-left solid 10px transparent
diff --git a/src/client/app/mobile/views/pages/search.vue b/src/client/app/mobile/views/pages/search.vue
index 6c80de3aa0..f038a6f81f 100644
--- a/src/client/app/mobile/views/pages/search.vue
+++ b/src/client/app/mobile/views/pages/search.vue
@@ -84,7 +84,7 @@ export default Vue.extend({
width calc(100% - 16px)
background #fff
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)
@media (min-width 500px)
margin 16px auto
diff --git a/src/client/app/mobile/views/pages/selectdrive.vue b/src/client/app/mobile/views/pages/selectdrive.vue
index 741559ed0b..d730e4fcff 100644
--- a/src/client/app/mobile/views/pages/selectdrive.vue
+++ b/src/client/app/mobile/views/pages/selectdrive.vue
@@ -62,7 +62,7 @@ export default Vue.extend({
width 100%
z-index 1000
background #fff
- box-shadow 0 1px rgba(0, 0, 0, 0.1)
+ box-shadow 0 1px rgba(#000, 0.1)
> h1
margin 0
diff --git a/src/client/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue
index ebf14f68f5..0e9c5ea962 100644
--- a/src/client/app/mobile/views/pages/settings.vue
+++ b/src/client/app/mobile/views/pages/settings.vue
@@ -62,7 +62,7 @@ export default Vue.extend({
width calc(100% - 32px)
list-style none
background #fff
- border solid 1px rgba(0, 0, 0, 0.2)
+ border solid 1px rgba(#000, 0.2)
border-radius $radius
> li
@@ -70,7 +70,7 @@ export default Vue.extend({
border-bottom solid 1px #ddd
&:hover
- background rgba(0, 0, 0, 0.1)
+ background rgba(#000, 0.1)
&:first-child
border-top-left-radius $radius
diff --git a/src/client/app/mobile/views/pages/signup.vue b/src/client/app/mobile/views/pages/signup.vue
index 9dc07a4b86..b8245beb00 100644
--- a/src/client/app/mobile/views/pages/signup.vue
+++ b/src/client/app/mobile/views/pages/signup.vue
@@ -40,7 +40,7 @@ export default Vue.extend({
.form
background #fff
- border solid 1px rgba(0, 0, 0, 0.2)
+ border solid 1px rgba(#000, 0.2)
border-radius 8px
overflow hidden
diff --git a/src/client/app/mobile/views/pages/welcome.vue b/src/client/app/mobile/views/pages/welcome.vue
index 1bc7ffd862..485996870e 100644
--- a/src/client/app/mobile/views/pages/welcome.vue
+++ b/src/client/app/mobile/views/pages/welcome.vue
@@ -108,7 +108,7 @@ export default Vue.extend({
.form
margin-bottom 16px
background #fff
- border solid 1px rgba(0, 0, 0, 0.2)
+ border solid 1px rgba(#000, 0.2)
border-radius 8px
overflow hidden
@@ -131,7 +131,7 @@ export default Vue.extend({
margin 0 0 16px 0
width 100%
font-size 1em
- color rgba(0, 0, 0, 0.7)
+ color rgba(#000, 0.7)
background #fff
outline none
border solid 1px #ddd
@@ -156,7 +156,7 @@ export default Vue.extend({
background-color #767676
background-image none
border-color #444
- box-shadow 0 1px 3px rgba(0, 0, 0, 0.075), inset 0 0 5px rgba(0, 0, 0, 0.2)
+ box-shadow 0 1px 3px rgba(#000, 0.075), inset 0 0 5px rgba(#000, 0.2)
> div
padding 16px
@@ -164,7 +164,7 @@ export default Vue.extend({
> .tl
background #fff
- border solid 1px rgba(0, 0, 0, 0.2)
+ border solid 1px rgba(#000, 0.2)
border-radius 8px
overflow hidden
diff --git a/src/client/app/mobile/views/widgets/profile.vue b/src/client/app/mobile/views/widgets/profile.vue
index 502f886ceb..59c1ec7c0e 100644
--- a/src/client/app/mobile/views/widgets/profile.vue
+++ b/src/client/app/mobile/views/widgets/profile.vue
@@ -34,7 +34,7 @@ export default define({
display block
width 100%
height 100%
- background rgba(0, 0, 0, 0.5)
+ background rgba(#000, 0.5)
.avatar
display block
@@ -47,7 +47,7 @@ export default define({
left ((100px - 58px) / 2)
border none
border-radius 100%
- box-shadow 0 0 16px rgba(0, 0, 0, 0.5)
+ box-shadow 0 0 16px rgba(#000, 0.5)
.name
display block
@@ -58,6 +58,6 @@ export default define({
line-height 100px
color #fff
font-weight bold
- text-shadow 0 0 8px rgba(0, 0, 0, 0.5)
+ text-shadow 0 0 8px rgba(#000, 0.5)
diff --git a/src/renderers/get-note-summary.ts b/src/renderers/get-note-summary.ts
index fc7482ca16..dfc05ebfd6 100644
--- a/src/renderers/get-note-summary.ts
+++ b/src/renderers/get-note-summary.ts
@@ -3,6 +3,10 @@
* @param {*} note 投稿
*/
const summarize = (note: any): string => {
+ if (note.isHidden) {
+ return '(非公開の投稿)';
+ }
+
let summary = '';
// チャンネル
--
cgit v1.2.3-freya
From 9870e73069e06370a4cc20b65bd1230c1415b67a Mon Sep 17 00:00:00 2001
From: syuilo
Date: Sun, 29 Apr 2018 09:00:41 +0900
Subject: wip
---
.../app/desktop/views/components/post-form.vue | 14 ++++++++++++++
.../app/mobile/views/components/note-preview.vue | 20 +++++++++++---------
2 files changed, 25 insertions(+), 9 deletions(-)
(limited to 'src/client/app/desktop/views/components')
diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue
index 92a7f9ada7..ec220cc585 100644
--- a/src/client/app/desktop/views/components/post-form.vue
+++ b/src/client/app/desktop/views/components/post-form.vue
@@ -35,6 +35,7 @@
+ {{ 1000 - text.length }}
@@ -557,6 +558,19 @@ root(isDark)
from {background-position: 0 0;}
to {background-position: -64px 32px;}
+ > .text-count
+ pointer-events none
+ display block
+ position absolute
+ bottom 16px
+ right 138px
+ margin 0
+ line-height 40px
+ color rgba($theme-color, 0.5)
+
+ &.over
+ color #ec3828
+
> .upload
> .drive
> .kao
diff --git a/src/client/app/mobile/views/components/note-preview.vue b/src/client/app/mobile/views/components/note-preview.vue
index 1de739d5d2..41244cc759 100644
--- a/src/client/app/mobile/views/components/note-preview.vue
+++ b/src/client/app/mobile/views/components/note-preview.vue
@@ -27,7 +27,7 @@ export default Vue.extend({
--
cgit v1.2.3-freya
From 2f2a94590599185c09ddbfa71efd99213e7eaa91 Mon Sep 17 00:00:00 2001
From: syuilo
Date: Sun, 29 Apr 2018 09:19:05 +0900
Subject: wip
---
.../desktop/views/components/notes.note.sub.vue | 28 ++++++++++++++++++----
.../app/desktop/views/components/notes.note.vue | 15 ++++++++----
.../app/mobile/views/components/note.sub.vue | 28 ++++++++++++++++++----
src/client/app/mobile/views/components/note.vue | 14 ++++++++---
4 files changed, 68 insertions(+), 17 deletions(-)
(limited to 'src/client/app/desktop/views/components')
diff --git a/src/client/app/desktop/views/components/notes.note.sub.vue b/src/client/app/desktop/views/components/notes.note.sub.vue
index 3e1b75c29f..4472ddefb8 100644
--- a/src/client/app/desktop/views/components/notes.note.sub.vue
+++ b/src/client/app/desktop/views/components/notes.note.sub.vue
@@ -7,9 +7,18 @@
@@ -85,9 +94,18 @@ root(isDark)
margin 0 .5em 0 0
color isDark ? #606984 : #d1d8da
- > .created-at
+ > .info
margin-left auto
- color isDark ? #606984 : #b2b8bb
+ font-size 0.9em
+
+ > *
+ color isDark ? #606984 : #b2b8bb
+
+ > .mobile
+ margin-right 6px
+
+ > .visibility
+ margin-left 6px
> .body
max-height 128px
diff --git a/src/client/app/desktop/views/components/notes.note.vue b/src/client/app/desktop/views/components/notes.note.vue
index 4d7e6ee8b8..ee24543ebf 100644
--- a/src/client/app/desktop/views/components/notes.note.vue
+++ b/src/client/app/desktop/views/components/notes.note.vue
@@ -28,6 +28,12 @@
+
+ %fa:home%
+ %fa:unlock%
+ %fa:envelope%
+ %fa:lock%
+
@@ -442,18 +448,19 @@ root(isDark)
margin-left auto
font-size 0.9em
+ > *
+ color isDark ? #606984 : #c0c0c0
+
> .mobile
margin-right 8px
- color isDark ? #606984 : #ccc
> .app
margin-right 8px
padding-right 8px
- color #ccc
border-right solid 1px #eaeaea
- > .created-at
- color isDark ? #606984 : #c0c0c0
+ > .visibility
+ margin-left 8px
> .body
diff --git a/src/client/app/mobile/views/components/note.sub.vue b/src/client/app/mobile/views/components/note.sub.vue
index 8e3835ac23..01f02bdb56 100644
--- a/src/client/app/mobile/views/components/note.sub.vue
+++ b/src/client/app/mobile/views/components/note.sub.vue
@@ -7,9 +7,18 @@
@@ -92,9 +101,18 @@ root(isDark)
margin 0
color isDark ? #606984 : #d1d8da
- > .created-at
+ > .info
margin-left auto
- color isDark ? #606984 : #b2b8bb
+ font-size 0.9em
+
+ > *
+ color isDark ? #606984 : #b2b8bb
+
+ > .mobile
+ margin-right 6px
+
+ > .visibility
+ margin-left 6px
> .body
max-height 128px
diff --git a/src/client/app/mobile/views/components/note.vue b/src/client/app/mobile/views/components/note.vue
index 5202e0eb54..07e18544dd 100644
--- a/src/client/app/mobile/views/components/note.vue
+++ b/src/client/app/mobile/views/components/note.vue
@@ -27,6 +27,12 @@
+
+ %fa:home%
+ %fa:unlock%
+ %fa:envelope%
+ %fa:lock%
+
@@ -379,12 +385,14 @@ root(isDark)
margin-left auto
font-size 0.9em
+ > *
+ color isDark ? #606984 : #c0c0c0
+
> .mobile
margin-right 6px
- color isDark ? #606984 : #c0c0c0
- > .created-at
- color isDark ? #606984 : #c0c0c0
+ > .visibility
+ margin-left 6px
> .body
--
cgit v1.2.3-freya
From 372bfaceda5bf694bf33986b5a64a56e5787104c Mon Sep 17 00:00:00 2001
From: syuilo
Date: Sun, 29 Apr 2018 17:17:15 +0900
Subject: リファクタリングなど
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/client/app/common/define-widget.ts | 62 ++++++++-------
src/client/app/common/mios.ts | 56 +++++++++-----
src/client/app/common/scripts/streaming/home.ts | 23 +++++-
src/client/app/common/views/components/avatar.vue | 38 +++++++++
src/client/app/common/views/components/index.ts | 2 +
.../views/components/messaging-room.message.vue | 24 ++----
.../app/common/views/components/messaging.vue | 4 +-
.../common/views/components/welcome-timeline.vue | 15 ++--
src/client/app/common/views/widgets/access-log.vue | 1 +
src/client/app/common/views/widgets/broadcast.vue | 1 +
src/client/app/common/views/widgets/calendar.vue | 1 +
.../app/common/views/widgets/photo-stream.vue | 2 +
src/client/app/common/views/widgets/rss.vue | 1 +
src/client/app/common/views/widgets/server.vue | 2 +
src/client/app/common/views/widgets/slideshow.vue | 2 +
.../app/desktop/views/components/friends-maker.vue | 17 ++--
src/client/app/desktop/views/components/home.vue | 83 +++++++-------------
.../desktop/views/components/note-detail.sub.vue | 17 ++--
.../app/desktop/views/components/note-detail.vue | 37 +++------
.../app/desktop/views/components/note-preview.vue | 17 ++--
.../desktop/views/components/notes.note.sub.vue | 17 ++--
.../app/desktop/views/components/notes.note.vue | 38 ++++-----
src/client/app/desktop/views/components/notes.vue | 6 +-
.../app/desktop/views/components/notifications.vue | 41 +++-------
.../app/desktop/views/components/settings.vue | 59 +++++++-------
.../app/desktop/views/components/timeline.core.vue | 8 +-
.../desktop/views/components/ui.header.account.vue | 2 +-
.../views/components/user-list-timeline.vue | 8 +-
.../app/desktop/views/components/user-preview.vue | 16 ++--
.../desktop/views/components/users-list.item.vue | 17 ++--
.../desktop/views/components/widget-container.vue | 4 +-
src/client/app/desktop/views/components/window.vue | 4 +-
.../app/desktop/views/pages/user-list.users.vue | 17 ++--
.../app/desktop/views/pages/user/user.friends.vue | 17 ++--
.../app/desktop/views/pages/user/user.header.vue | 3 +-
src/client/app/desktop/views/pages/welcome.vue | 4 +-
src/client/app/desktop/views/widgets/activity.vue | 2 +
src/client/app/desktop/views/widgets/channel.vue | 1 +
src/client/app/desktop/views/widgets/messaging.vue | 1 +
.../app/desktop/views/widgets/notifications.vue | 1 +
src/client/app/desktop/views/widgets/polls.vue | 1 +
src/client/app/desktop/views/widgets/post-form.vue | 1 +
src/client/app/desktop/views/widgets/profile.vue | 1 +
.../app/desktop/views/widgets/timemachine.vue | 1 +
src/client/app/desktop/views/widgets/trends.vue | 1 +
src/client/app/desktop/views/widgets/users.vue | 18 ++---
src/client/app/init.ts | 28 ++-----
.../mobile/views/components/note-detail.sub.vue | 17 ++--
.../app/mobile/views/components/note-detail.vue | 47 ++++-------
.../app/mobile/views/components/note-preview.vue | 17 ++--
.../app/mobile/views/components/note.sub.vue | 23 ++----
src/client/app/mobile/views/components/note.vue | 46 ++++-------
src/client/app/mobile/views/components/notes.vue | 6 +-
.../app/mobile/views/components/notification.vue | 32 +++-----
.../app/mobile/views/components/post-form.vue | 2 +-
.../mobile/views/components/user-list-timeline.vue | 8 +-
.../app/mobile/views/components/user-preview.vue | 25 ++----
src/client/app/mobile/views/pages/dashboard.vue | 20 ++---
.../app/mobile/views/pages/home.timeline.vue | 8 +-
src/client/app/mobile/views/pages/welcome.vue | 4 +-
src/client/app/mobile/views/widgets/activity.vue | 1 +
src/client/app/store.ts | 90 ++++++++++++++++++++++
.../api/endpoints/i/update_client_setting.ts | 17 ++--
src/server/index.ts | 6 +-
64 files changed, 521 insertions(+), 570 deletions(-)
create mode 100644 src/client/app/common/views/components/avatar.vue
create mode 100644 src/client/app/store.ts
(limited to 'src/client/app/desktop/views/components')
diff --git a/src/client/app/common/define-widget.ts b/src/client/app/common/define-widget.ts
index 7b98c0903f..0b2bc36566 100644
--- a/src/client/app/common/define-widget.ts
+++ b/src/client/app/common/define-widget.ts
@@ -18,61 +18,65 @@ export default function(data: {
default: false
}
},
+
computed: {
id(): string {
return this.widget.id;
+ },
+
+ props(): T {
+ return this.widget.data;
}
},
+
data() {
return {
- props: data.props ? data.props() : {} as T,
- bakedOldProps: null,
- preventSave: false
+ bakedOldProps: null
};
},
+
created() {
- if (this.props) {
- Object.keys(this.props).forEach(prop => {
- if (this.widget.data.hasOwnProperty(prop)) {
- this.props[prop] = this.widget.data[prop];
- }
- });
- }
+ this.mergeProps();
+
+ this.$watch('props', () => {
+ this.mergeProps();
+ });
this.bakeProps();
+ },
+
+ methods: {
+ bakeProps() {
+ this.bakedOldProps = JSON.stringify(this.props);
+ },
- this.$watch('props', newProps => {
- if (this.preventSave) {
- this.preventSave = false;
- this.bakeProps();
- return;
+ mergeProps() {
+ if (data.props) {
+ const defaultProps = data.props();
+ Object.keys(defaultProps).forEach(prop => {
+ if (!this.props.hasOwnProperty(prop)) {
+ Vue.set(this.props, prop, defaultProps[prop]);
+ }
+ });
}
- if (this.bakedOldProps == JSON.stringify(newProps)) return;
+ },
+
+ save() {
+ if (this.bakedOldProps == JSON.stringify(this.props)) return;
this.bakeProps();
if (this.isMobile) {
(this as any).api('i/update_mobile_home', {
id: this.id,
- data: newProps
- }).then(() => {
- (this as any).os.i.clientSettings.mobileHome.find(w => w.id == this.id).data = newProps;
+ data: this.props
});
} else {
(this as any).api('i/update_home', {
id: this.id,
- data: newProps
- }).then(() => {
- (this as any).os.i.clientSettings.home.find(w => w.id == this.id).data = newProps;
+ data: this.props
});
}
- }, {
- deep: true
- });
- },
- methods: {
- bakeProps() {
- this.bakedOldProps = JSON.stringify(this.props);
}
}
});
diff --git a/src/client/app/common/mios.ts b/src/client/app/common/mios.ts
index 4e471cf96f..7dcae47946 100644
--- a/src/client/app/common/mios.ts
+++ b/src/client/app/common/mios.ts
@@ -3,6 +3,7 @@ import { EventEmitter } from 'eventemitter3';
import * as merge from 'object-assign-deep';
import * as uuid from 'uuid';
+import initStore from '../store';
import { hostname, apiUrl, swPublickey, version, lang, googleMapsApiKey } from '../config';
import Progress from './scripts/loading';
import Connection from './scripts/streaming/stream';
@@ -16,16 +17,6 @@ import Err from '../common/views/components/connect-failed.vue';
import { LocalTimelineStreamManager } from './scripts/streaming/local-timeline';
import { GlobalTimelineStreamManager } from './scripts/streaming/global-timeline';
-const defaultSettings = {
- fetchOnScroll: true,
- showMaps: true,
- showPostFormOnTopOfTl: false,
- gradientWindowHeader: false,
- showReplyTarget: true,
- showMyRenotes: true,
- showRenotedMyNotes: true
-};
-
//#region api requests
let spinner = null;
let pending = 0;
@@ -117,6 +108,8 @@ export default class MiOS extends EventEmitter {
return localStorage.getItem('enableSounds') == 'true';
}
+ public store: ReturnType;
+
public apis: API;
/**
@@ -232,6 +225,11 @@ export default class MiOS extends EventEmitter {
console.error.apply(null, args);
}
+ public bakeMe() {
+ // ローカルストレージにキャッシュ
+ localStorage.setItem('me', JSON.stringify(this.i));
+ }
+
public signout() {
localStorage.removeItem('me');
document.cookie = `i=; domain=${hostname}; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
@@ -243,6 +241,8 @@ export default class MiOS extends EventEmitter {
* @param callback A function that call when initialized
*/
public async init(callback) {
+ this.store = initStore(this);
+
//#region Init stream managers
this.streams.serverStream = new ServerStreamManager(this);
@@ -307,16 +307,11 @@ export default class MiOS extends EventEmitter {
// フェッチが完了したとき
const fetched = me => {
- if (me) {
- // デフォルトの設定をマージ
- me.clientSettings = Object.assign(defaultSettings, me.clientSettings);
-
- // ローカルストレージにキャッシュ
- localStorage.setItem('me', JSON.stringify(me));
- }
-
this.i = me;
+ // ローカルストレージにキャッシュ
+ this.bakeMe();
+
this.emit('signedin');
// Finish init
@@ -333,6 +328,14 @@ export default class MiOS extends EventEmitter {
// Get cached account data
const cachedMe = JSON.parse(localStorage.getItem('me'));
+ //#region キャッシュされた設定を復元
+ const cachedSettings = JSON.parse(localStorage.getItem('settings'));
+
+ if (cachedSettings) {
+ this.store.commit('settings/init', cachedSettings);
+ }
+ //#endregion
+
// キャッシュがあったとき
if (cachedMe) {
if (cachedMe.token == null) {
@@ -346,12 +349,25 @@ export default class MiOS extends EventEmitter {
// 後から新鮮なデータをフェッチ
fetchme(cachedMe.token, freshData => {
merge(cachedMe, freshData);
+
+ this.store.commit('settings/init', freshData.clientSettings);
});
} else {
// Get token from cookie
const i = (document.cookie.match(/i=(!\w+)/) || [null, null])[1];
- fetchme(i, fetched);
+ fetchme(i, me => {
+ if (me) {
+ Object.entries(me.clientSettings).forEach(([key, value]) => {
+ this.store.commit('settings/set', { key, value });
+ });
+
+ fetched(me);
+ } else {
+ // Finish init
+ callback();
+ }
+ });
}
}
@@ -456,7 +472,7 @@ export default class MiOS extends EventEmitter {
};
const promise = new Promise((resolve, reject) => {
- const viaStream = this.stream.hasConnection &&
+ const viaStream = this.stream && this.stream.hasConnection &&
(localStorage.getItem('apiViaStream') ? localStorage.getItem('apiViaStream') == 'true' : true);
if (viaStream) {
diff --git a/src/client/app/common/scripts/streaming/home.ts b/src/client/app/common/scripts/streaming/home.ts
index 73f2c5302c..ddb0d4820e 100644
--- a/src/client/app/common/scripts/streaming/home.ts
+++ b/src/client/app/common/scripts/streaming/home.ts
@@ -25,10 +25,31 @@ export class HomeStream extends Stream {
console.log('I updated:', i);
}
merge(me, i);
+
+ // キャッシュ更新
+ os.bakeMe();
+ });
+
+ this.on('clientSettingUpdated', x => {
+ os.store.commit('settings/set', {
+ key: x.key,
+ value: x.value
+ });
+ });
+
+ this.on('home_updated', x => {
+ if (x.home) {
+ os.store.commit('settings/setHome', x.home);
+ } else {
+ os.store.commit('settings/setHomeWidget', {
+ id: x.id,
+ data: x.data
+ });
+ }
});
// トークンが再生成されたとき
- // このままではAPIが利用できないので強制的にサインアウトさせる
+ // このままではMisskeyが利用できないので強制的にサインアウトさせる
this.on('my_token_regenerated', () => {
alert('%i18n:!common.my-token-regenerated%');
os.signout();
diff --git a/src/client/app/common/views/components/avatar.vue b/src/client/app/common/views/components/avatar.vue
new file mode 100644
index 0000000000..5aac9c8ba1
--- /dev/null
+++ b/src/client/app/common/views/components/avatar.vue
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/client/app/common/views/components/index.ts b/src/client/app/common/views/components/index.ts
index 6bfe43a800..69fed00c74 100644
--- a/src/client/app/common/views/components/index.ts
+++ b/src/client/app/common/views/components/index.ts
@@ -3,6 +3,7 @@ import Vue from 'vue';
import signin from './signin.vue';
import signup from './signup.vue';
import forkit from './forkit.vue';
+import avatar from './avatar.vue';
import nav from './nav.vue';
import noteHtml from './note-html';
import poll from './poll.vue';
@@ -28,6 +29,7 @@ import welcomeTimeline from './welcome-timeline.vue';
Vue.component('mk-signin', signin);
Vue.component('mk-signup', signup);
Vue.component('mk-forkit', forkit);
+Vue.component('mk-avatar', avatar);
Vue.component('mk-nav', nav);
Vue.component('mk-note-html', noteHtml);
Vue.component('mk-poll', poll);
diff --git a/src/client/app/common/views/components/messaging-room.message.vue b/src/client/app/common/views/components/messaging-room.message.vue
index 70df899f5a..ba0ab3209f 100644
--- a/src/client/app/common/views/components/messaging-room.message.vue
+++ b/src/client/app/common/views/components/messaging-room.message.vue
@@ -1,8 +1,6 @@
-
-
-
+
%i18n:@is-read%
@@ -67,20 +65,14 @@ export default Vue.extend({
padding 10px 12px 10px 12px
background-color transparent
- > .avatar-anchor
+ > .avatar
display block
position absolute
top 10px
-
- > .avatar
- display block
- min-width 54px
- min-height 54px
- max-width 54px
- max-height 54px
- margin 0
- border-radius 8px
- transition all 0.1s ease
+ width 54px
+ height 54px
+ border-radius 8px
+ transition all 0.1s ease
> .content
@@ -201,7 +193,7 @@ export default Vue.extend({
margin-left 4px
&:not([data-is-me])
- > .avatar-anchor
+ > .avatar
left 12px
> .content
@@ -225,7 +217,7 @@ export default Vue.extend({
text-align left
&[data-is-me]
- > .avatar-anchor
+ > .avatar
right 12px
> .content
diff --git a/src/client/app/common/views/components/messaging.vue b/src/client/app/common/views/components/messaging.vue
index 6f8fcb3a70..11f9c366d4 100644
--- a/src/client/app/common/views/components/messaging.vue
+++ b/src/client/app/common/views/components/messaging.vue
@@ -13,7 +13,7 @@
@click="navigate(user)"
tabindex="-1"
>
-
![]()
+
{{ user | userName }}
@{{ user | acct }}
@@ -31,7 +31,7 @@
:key="message.id"
>
-
![]()
+
{{ isMe(message) ? message.recipient : message.user | userName }}
@{{ isMe(message) ? message.recipient : message.user | acct }}
diff --git a/src/client/app/common/views/components/welcome-timeline.vue b/src/client/app/common/views/components/welcome-timeline.vue
index 3497976901..6fadb030c3 100644
--- a/src/client/app/common/views/components/welcome-timeline.vue
+++ b/src/client/app/common/views/components/welcome-timeline.vue
@@ -1,9 +1,7 @@
-
-
-
+
{{ note.user | userName }}
@@ -69,18 +67,15 @@ export default Vue.extend({
display block
clear both
- > .avatar-anchor
+ > .avatar
display block
float left
position -webkit-sticky
position sticky
top 16px
-
- > img
- display block
- width 42px
- height 42px
- border-radius 6px
+ width 42px
+ height 42px
+ border-radius 6px
> .body
float right
diff --git a/src/client/app/common/views/widgets/access-log.vue b/src/client/app/common/views/widgets/access-log.vue
index 0b1c7fe2dd..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();
}
}
});
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 0bb503759c..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();
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 f0ba11678e..b5339add0b 100644
--- a/src/client/app/common/views/widgets/rss.vue
+++ b/src/client/app/common/views/widgets/rss.vue
@@ -40,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}`, {
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 95be4b94fd..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();
});
}
diff --git a/src/client/app/desktop/views/components/friends-maker.vue b/src/client/app/desktop/views/components/friends-maker.vue
index af5bde3ad5..3c1f8b8257 100644
--- a/src/client/app/desktop/views/components/friends-maker.vue
+++ b/src/client/app/desktop/views/components/friends-maker.vue
@@ -3,9 +3,7 @@
気になるユーザーをフォロー:
-
-
-
+
{{ user | userName }}
@{{ user | acct }}
@@ -86,18 +84,13 @@ export default Vue.extend({
display block
clear both
- > .avatar-anchor
+ > .avatar
display block
float left
margin 0 12px 0 0
-
- > .avatar
- display block
- width 42px
- height 42px
- margin 0
- border-radius 8px
- vertical-align bottom
+ width 42px
+ height 42px
+ border-radius 8px
> .body
float left
diff --git a/src/client/app/desktop/views/components/home.vue b/src/client/app/desktop/views/components/home.vue
index 4343a7fb78..5337be61fd 100644
--- a/src/client/app/desktop/views/components/home.vue
+++ b/src/client/app/desktop/views/components/home.vue
@@ -53,7 +53,7 @@
@@ -63,7 +63,7 @@
-
+
@@ -81,6 +81,7 @@ export default Vue.extend({
components: {
XDraggable
},
+
props: {
customize: {
type: Boolean,
@@ -91,61 +92,43 @@ export default Vue.extend({
default: 'timeline'
}
},
+
data() {
return {
connection: null,
connectionId: null,
widgetAdderSelected: null,
- trash: [],
- widgets: {
- left: [],
- right: []
- }
+ trash: []
};
},
+
computed: {
- home: {
- get(): any[] {
- //#region 互換性のため
- (this as any).os.i.clientSettings.home.forEach(w => {
- if (w.name == 'rss-reader') w.name = 'rss';
- if (w.name == 'user-recommendation') w.name = 'users';
- if (w.name == 'recommended-polls') w.name = 'polls';
- });
- //#endregion
- return (this as any).os.i.clientSettings.home;
- },
- set(value) {
- (this as any).os.i.clientSettings.home = value;
- }
+ home(): any[] {
+ return this.$store.state.settings.data.home;
},
left(): any[] {
return this.home.filter(w => w.place == 'left');
},
right(): any[] {
return this.home.filter(w => w.place == 'right');
+ },
+ widgets(): any {
+ return {
+ left: this.left,
+ right: this.right
+ };
}
},
- created() {
- this.widgets.left = this.left;
- this.widgets.right = this.right;
- this.$watch('os.i.clientSettings', i => {
- this.widgets.left = this.left;
- this.widgets.right = this.right;
- }, {
- deep: true
- });
- },
+
mounted() {
this.connection = (this as any).os.stream.getConnection();
this.connectionId = (this as any).os.stream.use();
-
- this.connection.on('home_updated', this.onHomeUpdated);
},
+
beforeDestroy() {
- this.connection.off('home_updated', this.onHomeUpdated);
(this as any).os.stream.dispose(this.connectionId);
},
+
methods: {
hint() {
(this as any).apis.dialog({
@@ -159,56 +142,44 @@ export default Vue.extend({
}]
});
},
+
onTlLoaded() {
this.$emit('loaded');
},
- onHomeUpdated(data) {
- if (data.home) {
- (this as any).os.i.clientSettings.home = data.home;
- this.widgets.left = data.home.filter(w => w.place == 'left');
- this.widgets.right = data.home.filter(w => w.place == 'right');
- } else {
- const w = (this as any).os.i.clientSettings.home.find(w => w.id == data.id);
- if (w != null) {
- w.data = data.data;
- this.$refs[w.id][0].preventSave = true;
- this.$refs[w.id][0].props = w.data;
- this.widgets.left = (this as any).os.i.clientSettings.home.filter(w => w.place == 'left');
- this.widgets.right = (this as any).os.i.clientSettings.home.filter(w => w.place == 'right');
- }
- }
- },
+
onWidgetContextmenu(widgetId) {
const w = (this.$refs[widgetId] as any)[0];
if (w.func) w.func();
},
+
onWidgetSort() {
this.saveHome();
},
+
onTrash(evt) {
this.saveHome();
},
+
addWidget() {
- const widget = {
+ this.$store.dispatch('settings/addHomeWidget', {
name: this.widgetAdderSelected,
id: uuid(),
place: 'left',
data: {}
- };
-
- this.widgets.left.unshift(widget);
- this.saveHome();
+ });
},
+
saveHome() {
const left = this.widgets.left;
const right = this.widgets.right;
- this.home = left.concat(right);
+ this.$store.commit('settings/setHome', left.concat(right));
left.forEach(w => w.place = 'left');
right.forEach(w => w.place = 'right');
(this as any).api('i/update_home', {
home: this.home
});
},
+
warp(date) {
(this.$refs.tl as any).warp(date);
}
diff --git a/src/client/app/desktop/views/components/note-detail.sub.vue b/src/client/app/desktop/views/components/note-detail.sub.vue
index 5175c8bd45..24550c4e94 100644
--- a/src/client/app/desktop/views/components/note-detail.sub.vue
+++ b/src/client/app/desktop/views/components/note-detail.sub.vue
@@ -1,8 +1,6 @@
-
-
-
+
@@ -57,18 +55,13 @@ root(isDark)
> .main > footer > button
color #888
- > .avatar-anchor
+ > .avatar
display block
float left
margin 0 16px 0 0
-
- > .avatar
- display block
- width 44px
- height 44px
- margin 0
- border-radius 4px
- vertical-align bottom
+ width 44px
+ height 44px
+ border-radius 4px
> .main
float left
diff --git a/src/client/app/desktop/views/components/note-detail.vue b/src/client/app/desktop/views/components/note-detail.vue
index 525023349e..5d07dc90d4 100644
--- a/src/client/app/desktop/views/components/note-detail.vue
+++ b/src/client/app/desktop/views/components/note-detail.vue
@@ -18,18 +18,14 @@
-
-
-
+
%fa:retweet%
{{ note.user | userName }}
がRenote
-
-
-
+
{{ p.user | userName }}
@{{ p.user | acct }}
@@ -159,7 +155,7 @@ export default Vue.extend({
// Draw map
if (this.p.geo) {
- const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.clientSettings.showMaps : true;
+ const shouldShowMap = (this as any).os.isSignedIn ? (this as any).clientSettings.showMaps : true;
if (shouldShowMap) {
(this as any).os.getGoogleMaps().then(maps => {
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
@@ -262,17 +258,12 @@ root(isDark)
margin 0
padding 16px 32px
- .avatar-anchor
+ .avatar
display inline-block
-
- .avatar
- vertical-align bottom
- min-width 28px
- min-height 28px
- max-width 28px
- max-height 28px
- margin 0 8px 0 0
- border-radius 6px
+ width 28px
+ height 28px
+ margin 0 8px 0 0
+ border-radius 6px
[data-fa]
margin-right 4px
@@ -298,18 +289,10 @@ root(isDark)
> footer > button
color isDark ? #707b97 : #888
- > .avatar-anchor
- display block
+ > .avatar
width 60px
height 60px
-
- > .avatar
- display block
- width 60px
- height 60px
- margin 0
- border-radius 8px
- vertical-align bottom
+ border-radius 8px
> header
position absolute
diff --git a/src/client/app/desktop/views/components/note-preview.vue b/src/client/app/desktop/views/components/note-preview.vue
index b45814e512..43eb159885 100644
--- a/src/client/app/desktop/views/components/note-preview.vue
+++ b/src/client/app/desktop/views/components/note-preview.vue
@@ -1,8 +1,6 @@
-
-
-
+
{{ note.user | userName }}
@@ -41,18 +39,13 @@ root(isDark)
display block
clear both
- > .avatar-anchor
+ > .avatar
display block
float left
margin 0 16px 0 0
-
- > .avatar
- display block
- width 52px
- height 52px
- margin 0
- border-radius 8px
- vertical-align bottom
+ width 52px
+ height 52px
+ border-radius 8px
> .main
float left
diff --git a/src/client/app/desktop/views/components/notes.note.sub.vue b/src/client/app/desktop/views/components/notes.note.sub.vue
index 4472ddefb8..238fb03691 100644
--- a/src/client/app/desktop/views/components/notes.note.sub.vue
+++ b/src/client/app/desktop/views/components/notes.note.sub.vue
@@ -1,8 +1,6 @@
-
-
-
+
{{ note.user | userName }}
@@ -53,18 +51,13 @@ root(isDark)
display block
clear both
- > .avatar-anchor
+ > .avatar
display block
float left
margin 0 14px 0 0
-
- > .avatar
- display block
- width 52px
- height 52px
- margin 0
- border-radius 8px
- vertical-align bottom
+ width 52px
+ height 52px
+ border-radius 8px
> .main
float left
diff --git a/src/client/app/desktop/views/components/notes.note.vue b/src/client/app/desktop/views/components/notes.note.vue
index ee24543ebf..b512f78eca 100644
--- a/src/client/app/desktop/views/components/notes.note.vue
+++ b/src/client/app/desktop/views/components/notes.note.vue
@@ -1,12 +1,10 @@
-
+
-
-
-
+
%fa:retweet%
{{ '%i18n:!@reposted-by%'.substr(0, '%i18n:!@reposted-by%'.indexOf('{')) }}
{{ note.user | userName }}
@@ -14,9 +12,7 @@
-
-
-
+
{{ p.user | userName }}
@@ -182,7 +178,7 @@ export default Vue.extend({
// Draw map
if (this.p.geo) {
- const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.clientSettings.showMaps : true;
+ const shouldShowMap = (this as any).os.isSignedIn ? (this as any).clientSettings.showMaps : true;
if (shouldShowMap) {
(this as any).os.getGoogleMaps().then(maps => {
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
@@ -343,15 +339,12 @@ root(isDark)
color #9dbb00
background isDark ? linear-gradient(to bottom, #314027 0%, #282c37 100%) : linear-gradient(to bottom, #edfde2 0%, #fff 100%)
- .avatar-anchor
+ .avatar
display inline-block
-
- .avatar
- vertical-align bottom
- width 28px
- height 28px
- margin 0 8px 0 0
- border-radius 6px
+ width 28px
+ height 28px
+ margin 0 8px 0 0
+ border-radius 6px
[data-fa]
margin-right 4px
@@ -390,22 +383,17 @@ root(isDark)
> .main > footer > button
color isDark ? #707b97 : #888
- > .avatar-anchor
+ > .avatar
display block
float left
margin 0 16px 10px 0
+ width 58px
+ height 58px
+ border-radius 8px
//position -webkit-sticky
//position sticky
//top 74px
- > .avatar
- display block
- width 58px
- height 58px
- margin 0
- border-radius 8px
- vertical-align bottom
-
> .main
float left
width calc(100% - 74px)
diff --git a/src/client/app/desktop/views/components/notes.vue b/src/client/app/desktop/views/components/notes.vue
index c4824feeac..7e80e6f74a 100644
--- a/src/client/app/desktop/views/components/notes.vue
+++ b/src/client/app/desktop/views/components/notes.vue
@@ -121,13 +121,13 @@ export default Vue.extend({
const isMyNote = note.userId == (this as any).os.i.id;
const isPureRenote = note.renoteId != null && note.text == null && note.mediaIds.length == 0 && note.poll == null;
- if ((this as any).os.i.clientSettings.showMyRenotes === false) {
+ if ((this as any).clientSettings.showMyRenotes === false) {
if (isMyNote && isPureRenote) {
return;
}
}
- if ((this as any).os.i.clientSettings.showRenotedMyNotes === false) {
+ if ((this as any).clientSettings.showRenotedMyNotes === false) {
if (isPureRenote && (note.renote.userId == (this as any).os.i.id)) {
return;
}
@@ -199,7 +199,7 @@ export default Vue.extend({
this.clearNotification();
}
- if ((this as any).os.i.clientSettings.fetchOnScroll !== false) {
+ if ((this as any).clientSettings.fetchOnScroll !== false) {
const current = window.scrollY + window.innerHeight;
if (current > document.body.offsetHeight - 8) this.loadMore();
}
diff --git a/src/client/app/desktop/views/components/notifications.vue b/src/client/app/desktop/views/components/notifications.vue
index 36e9dce6af..7923d1a62d 100644
--- a/src/client/app/desktop/views/components/notifications.vue
+++ b/src/client/app/desktop/views/components/notifications.vue
@@ -6,9 +6,7 @@
-
-
-
+
-
-
-
+
%fa:retweet%
{{ notification.note.user | userName }}
@@ -33,9 +29,7 @@
-
-
-
+
%fa:quote-left%
{{ notification.note.user | userName }}
@@ -44,9 +38,7 @@
-
-
-
+
%fa:user-plus%
{{ notification.user | userName }}
@@ -54,9 +46,7 @@
-
-
-
+
%fa:reply%
{{ notification.note.user | userName }}
@@ -65,9 +55,7 @@
-
-
-
+
%fa:at%
{{ notification.note.user | userName }}
@@ -76,9 +64,7 @@
-
-
-
+
%fa:chart-pie%{{ notification.user | userName }}
@@ -223,20 +209,15 @@ root(isDark)
display block
clear both
- > .avatar-anchor
+ > .avatar
display block
float left
position -webkit-sticky
position sticky
top 16px
-
- > img
- display block
- min-width 36px
- min-height 36px
- max-width 36px
- max-height 36px
- border-radius 6px
+ width 36px
+ height 36px
+ border-radius 6px
> .text
float right
diff --git a/src/client/app/desktop/views/components/settings.vue b/src/client/app/desktop/views/components/settings.vue
index 9d56042ea7..af6ab12669 100644
--- a/src/client/app/desktop/views/components/settings.vue
+++ b/src/client/app/desktop/views/components/settings.vue
@@ -20,7 +20,7 @@
動作
-
+
ページを下までスクロールしたときに自動で追加のコンテンツを読み込みます。
@@ -41,13 +41,14 @@
-
+
+
-
-
-
-
-
+
+
+
+
+
位置情報が添付された投稿のマップを自動的に展開します。
@@ -69,7 +70,7 @@
@@ -297,8 +298,8 @@ export default Vue.extend({
this.$emit('done');
},
onChangeFetchOnScroll(v) {
- (this as any).api('i/update_client_setting', {
- name: 'fetchOnScroll',
+ this.$store.dispatch('settings/set', {
+ key: 'fetchOnScroll',
value: v
});
},
@@ -308,50 +309,56 @@ export default Vue.extend({
});
},
onChangeDark(v) {
- (this as any).api('i/update_client_setting', {
- name: 'dark',
+ this.$store.dispatch('settings/set', {
+ key: 'dark',
value: v
});
},
onChangeShowPostFormOnTopOfTl(v) {
- (this as any).api('i/update_client_setting', {
- name: 'showPostFormOnTopOfTl',
+ this.$store.dispatch('settings/set', {
+ key: 'showPostFormOnTopOfTl',
value: v
});
},
onChangeShowReplyTarget(v) {
- (this as any).api('i/update_client_setting', {
- name: 'showReplyTarget',
+ this.$store.dispatch('settings/set', {
+ key: 'showReplyTarget',
value: v
});
},
onChangeShowMyRenotes(v) {
- (this as any).api('i/update_client_setting', {
- name: 'showMyRenotes',
+ this.$store.dispatch('settings/set', {
+ key: 'showMyRenotes',
value: v
});
},
onChangeShowRenotedMyNotes(v) {
- (this as any).api('i/update_client_setting', {
- name: 'showRenotedMyNotes',
+ this.$store.dispatch('settings/set', {
+ key: 'showRenotedMyNotes',
value: v
});
},
onChangeShowMaps(v) {
- (this as any).api('i/update_client_setting', {
- name: 'showMaps',
+ this.$store.dispatch('settings/set', {
+ key: 'showMaps',
+ value: v
+ });
+ },
+ onChangeCircleIcons(v) {
+ this.$store.dispatch('settings/set', {
+ key: 'circleIcons',
value: v
});
},
onChangeGradientWindowHeader(v) {
- (this as any).api('i/update_client_setting', {
- name: 'gradientWindowHeader',
+ this.$store.dispatch('settings/set', {
+ key: 'gradientWindowHeader',
value: v
});
},
onChangeDisableViaMobile(v) {
- (this as any).api('i/update_client_setting', {
- name: 'disableViaMobile',
+ this.$store.dispatch('settings/set', {
+ key: 'disableViaMobile',
value: v
});
},
diff --git a/src/client/app/desktop/views/components/timeline.core.vue b/src/client/app/desktop/views/components/timeline.core.vue
index a137a57070..254a5b9d63 100644
--- a/src/client/app/desktop/views/components/timeline.core.vue
+++ b/src/client/app/desktop/views/components/timeline.core.vue
@@ -101,8 +101,8 @@ export default Vue.extend({
(this as any).api(this.endpoint, {
limit: fetchLimit + 1,
untilDate: this.date ? this.date.getTime() : undefined,
- includeMyRenotes: (this as any).os.i.clientSettings.showMyRenotes,
- includeRenotedMyNotes: (this as any).os.i.clientSettings.showRenotedMyNotes
+ includeMyRenotes: (this as any).clientSettings.showMyRenotes,
+ includeRenotedMyNotes: (this as any).clientSettings.showRenotedMyNotes
}).then(notes => {
if (notes.length == fetchLimit + 1) {
notes.pop();
@@ -123,8 +123,8 @@ export default Vue.extend({
(this as any).api(this.endpoint, {
limit: fetchLimit + 1,
untilId: (this.$refs.timeline as any).tail().id,
- includeMyRenotes: (this as any).os.i.clientSettings.showMyRenotes,
- includeRenotedMyNotes: (this as any).os.i.clientSettings.showRenotedMyNotes
+ includeMyRenotes: (this as any).clientSettings.showMyRenotes,
+ includeRenotedMyNotes: (this as any).clientSettings.showRenotedMyNotes
}).then(notes => {
if (notes.length == fetchLimit + 1) {
notes.pop();
diff --git a/src/client/app/desktop/views/components/ui.header.account.vue b/src/client/app/desktop/views/components/ui.header.account.vue
index 145666b4bc..897d3de816 100644
--- a/src/client/app/desktop/views/components/ui.header.account.vue
+++ b/src/client/app/desktop/views/components/ui.header.account.vue
@@ -2,7 +2,7 @@