From 93d25a2a34df72fd8ce62cce33fa098cf11d5eb1 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 17 Feb 2020 03:10:51 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E3=81=A8=E3=82=AF=E3=83=A9=E3=82=A4=E3=82=A2=E3=83=B3?= =?UTF-8?q?=E3=83=88=E8=A8=AD=E5=AE=9A=E3=82=92=E5=88=86=E9=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/ja-JP.yml | 1 + src/client/app.vue | 16 ++ .../pages/{settings => my-settings}/2fa.vue | 0 .../pages/{settings => my-settings}/api.vue | 0 .../pages/{settings => my-settings}/drive.vue | 0 .../import-export.vue | 0 src/client/pages/my-settings/index.vue | 100 +++++++++++ .../{settings => my-settings}/integration.vue | 0 .../{settings => my-settings}/mute-block.vue | 0 .../{settings => my-settings}/privacy.vue | 0 .../{settings => my-settings}/profile.vue | 0 .../{settings => my-settings}/reaction.vue | 0 .../{settings => my-settings}/security.vue | 0 src/client/pages/settings/general.vue | 159 ------------------ src/client/pages/settings/index.vue | 144 ++++++++++------ src/client/pages/settings/theme.vue | 22 ++- src/client/router.ts | 3 +- 17 files changed, 236 insertions(+), 209 deletions(-) rename src/client/pages/{settings => my-settings}/2fa.vue (100%) rename src/client/pages/{settings => my-settings}/api.vue (100%) rename src/client/pages/{settings => my-settings}/drive.vue (100%) rename src/client/pages/{settings => my-settings}/import-export.vue (100%) create mode 100644 src/client/pages/my-settings/index.vue rename src/client/pages/{settings => my-settings}/integration.vue (100%) rename src/client/pages/{settings => my-settings}/mute-block.vue (100%) rename src/client/pages/{settings => my-settings}/privacy.vue (100%) rename src/client/pages/{settings => my-settings}/profile.vue (100%) rename src/client/pages/{settings => my-settings}/reaction.vue (100%) rename src/client/pages/{settings => my-settings}/security.vue (100%) delete mode 100644 src/client/pages/settings/general.vue diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index f353654d1..d230f15a7 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -409,6 +409,7 @@ remote: "リモート" total: "合計" weekOverWeekChanges: "前週比" dayOverDayChanges: "前日比" +accessibility: "アクセシビリティ" _ago: unknown: "謎" diff --git a/src/client/app.vue b/src/client/app.vue index ecf437cac..82e118a8b 100644 --- a/src/client/app.vue +++ b/src/client/app.vue @@ -87,6 +87,9 @@ {{ $t('more') }} + + {{ $t('settings') }} + @@ -881,6 +884,7 @@ export default Vue.extend({ width: $nav-width; height: 100vh; padding: 16px 0; + padding-bottom: calc(3.7rem + 24px); box-sizing: border-box; overflow: auto; background: var(--navBg); @@ -894,6 +898,7 @@ export default Vue.extend({ @media (max-width: $nav-icon-only-threshold) and (min-width: $nav-hide-threshold + 1px) { width: $nav-icon-only-width; padding: 8px 0; + padding-bottom: calc(3.7rem + 24px); > .divider { margin: 8px auto; @@ -948,6 +953,17 @@ export default Vue.extend({ color: var(--navActive); } + &:last-child { + position: fixed; + bottom: 0; + width: inherit; + padding-top: 8px; + padding-bottom: 8px; + background: var(--navBg); + border-top: solid 1px var(--divider); + border-right: solid 1px var(--divider); + } + @media (max-width: $nav-icon-only-threshold) and (min-width: $nav-hide-threshold + 1px) { padding-left: 0; width: 100%; diff --git a/src/client/pages/settings/2fa.vue b/src/client/pages/my-settings/2fa.vue similarity index 100% rename from src/client/pages/settings/2fa.vue rename to src/client/pages/my-settings/2fa.vue diff --git a/src/client/pages/settings/api.vue b/src/client/pages/my-settings/api.vue similarity index 100% rename from src/client/pages/settings/api.vue rename to src/client/pages/my-settings/api.vue diff --git a/src/client/pages/settings/drive.vue b/src/client/pages/my-settings/drive.vue similarity index 100% rename from src/client/pages/settings/drive.vue rename to src/client/pages/my-settings/drive.vue diff --git a/src/client/pages/settings/import-export.vue b/src/client/pages/my-settings/import-export.vue similarity index 100% rename from src/client/pages/settings/import-export.vue rename to src/client/pages/my-settings/import-export.vue diff --git a/src/client/pages/my-settings/index.vue b/src/client/pages/my-settings/index.vue new file mode 100644 index 000000000..53f08785f --- /dev/null +++ b/src/client/pages/my-settings/index.vue @@ -0,0 +1,100 @@ + + + diff --git a/src/client/pages/settings/integration.vue b/src/client/pages/my-settings/integration.vue similarity index 100% rename from src/client/pages/settings/integration.vue rename to src/client/pages/my-settings/integration.vue diff --git a/src/client/pages/settings/mute-block.vue b/src/client/pages/my-settings/mute-block.vue similarity index 100% rename from src/client/pages/settings/mute-block.vue rename to src/client/pages/my-settings/mute-block.vue diff --git a/src/client/pages/settings/privacy.vue b/src/client/pages/my-settings/privacy.vue similarity index 100% rename from src/client/pages/settings/privacy.vue rename to src/client/pages/my-settings/privacy.vue diff --git a/src/client/pages/settings/profile.vue b/src/client/pages/my-settings/profile.vue similarity index 100% rename from src/client/pages/settings/profile.vue rename to src/client/pages/my-settings/profile.vue diff --git a/src/client/pages/settings/reaction.vue b/src/client/pages/my-settings/reaction.vue similarity index 100% rename from src/client/pages/settings/reaction.vue rename to src/client/pages/my-settings/reaction.vue diff --git a/src/client/pages/settings/security.vue b/src/client/pages/my-settings/security.vue similarity index 100% rename from src/client/pages/settings/security.vue rename to src/client/pages/my-settings/security.vue diff --git a/src/client/pages/settings/general.vue b/src/client/pages/settings/general.vue deleted file mode 100644 index 5a176c022..000000000 --- a/src/client/pages/settings/general.vue +++ /dev/null @@ -1,159 +0,0 @@ - - - diff --git a/src/client/pages/settings/index.vue b/src/client/pages/settings/index.vue index aa827aa94..977a59bd8 100644 --- a/src/client/pages/settings/index.vue +++ b/src/client/pages/settings/index.vue @@ -1,44 +1,61 @@ - - diff --git a/src/client/pages/settings/theme.vue b/src/client/pages/settings/theme.vue index e8f11fb03..e284c8c6f 100644 --- a/src/client/pages/settings/theme.vue +++ b/src/client/pages/settings/theme.vue @@ -12,6 +12,10 @@ +
+ {{ $t('setWallpaper') }} + {{ $t('removeWallpaper') }} +
@@ -23,6 +27,7 @@ import MkButton from '../../components/ui/button.vue'; import MkSelect from '../../components/ui/select.vue'; import i18n from '../../i18n'; import { Theme, builtinThemes, applyTheme } from '../../theme'; +import { selectFile } from '../../scripts/select-file'; export default Vue.extend({ i18n, @@ -35,6 +40,7 @@ export default Vue.extend({ data() { return { + wallpaper: localStorage.getItem('wallpaper'), faPalette } }, @@ -65,11 +71,25 @@ export default Vue.extend({ watch: { theme() { applyTheme(this.themes.find(x => x.id === this.theme)); + }, + + + wallpaper() { + if (this.wallpaper == null) { + localStorage.removeItem('wallpaper'); + } else { + localStorage.setItem('wallpaper', this.wallpaper); + } + location.reload(); } }, methods: { - + setWallpaper(e) { + selectFile(this, e.currentTarget || e.target, null, false).then(file => { + this.wallpaper = file.url; + }); + }, } }); diff --git a/src/client/router.ts b/src/client/router.ts index fe3de70a0..0a856d580 100644 --- a/src/client/router.ts +++ b/src/client/router.ts @@ -38,13 +38,14 @@ export const router = new VueRouter({ { path: '/my/pages', name: 'pages', component: page('pages') }, { path: '/my/pages/new', component: page('page-editor/page-editor') }, { path: '/my/pages/edit/:pageId', component: page('page-editor/page-editor'), props: route => ({ initPageId: route.params.pageId }) }, - { path: '/my/settings', component: page('settings/index') }, + { path: '/my/settings', component: page('my-settings/index') }, { path: '/my/follow-requests', component: page('follow-requests') }, { path: '/my/lists', component: page('my-lists/index') }, { path: '/my/lists/:list', component: page('my-lists/list') }, { path: '/my/groups', component: page('my-groups/index') }, { path: '/my/groups/:group', component: page('my-groups/group') }, { path: '/my/antennas', component: page('my-antennas/index') }, + { path: '/settings', component: page('settings/index') }, { path: '/instance', component: page('instance/index') }, { path: '/instance/emojis', component: page('instance/emojis') }, { path: '/instance/users', component: page('instance/users') },