From abb4efc76600da1acc08bf011d4d32d86d8ab094 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 29 Nov 2020 11:25:43 +0900 Subject: [PATCH] wip --- locales/ja-JP.yml | 1 + src/client/pages/user/index.vue | 6 + src/client/pages/welcome.entrance.block.vue | 1 + src/client/scripts/get-user-menu.ts | 11 +- src/client/themes/_dark.json5 | 1 + src/client/themes/_light.json5 | 1 + src/client/ui/visitor/b.vue | 252 ++++++++++++++++---- src/client/ui/visitor/header.vue | 235 +++++++++++------- 8 files changed, 365 insertions(+), 143 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 43774adae..e3d94cfea 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -650,6 +650,7 @@ pageLikedCount: "Pageにいいねされた数" reversiCount: "リバーシの対局数" contact: "連絡先" useSystemFont: "システムのデフォルトのフォントを使う" +clips: "クリップ" _aboutMisskey: about: "Misskeyはsyuiloによって2014年から開発されている、オープンソースのソフトウェアです。" diff --git a/src/client/pages/user/index.vue b/src/client/pages/user/index.vue index fd2e2f10c..0c816a2d2 100644 --- a/src/client/pages/user/index.vue +++ b/src/client/pages/user/index.vue @@ -508,12 +508,17 @@ export default defineComponent({ } .ftskorzw.narrow { + max-width: 100vw; + box-sizing: border-box; + overflow: hidden; + > .punished { font-size: 0.8em; padding: 16px; } > .profile { + > .main { position: relative; overflow: hidden; @@ -678,6 +683,7 @@ export default defineComponent({ overflow: hidden; white-space: nowrap; text-overflow: ellipsis; + margin: 0; } } diff --git a/src/client/pages/welcome.entrance.block.vue b/src/client/pages/welcome.entrance.block.vue index 0e4aefa4b..b4f588177 100644 --- a/src/client/pages/welcome.entrance.block.vue +++ b/src/client/pages/welcome.entrance.block.vue @@ -136,6 +136,7 @@ export default defineComponent({ > div { flex: 1; overflow: auto; + background: var(--bg); } } diff --git a/src/client/scripts/get-user-menu.ts b/src/client/scripts/get-user-menu.ts index c3de7313c..a97fed991 100644 --- a/src/client/scripts/get-user-menu.ts +++ b/src/client/scripts/get-user-menu.ts @@ -7,9 +7,10 @@ import getAcct from '../../misc/acct/render'; import * as os from '@/os'; import { store, userActions } from '@/store'; import { router } from '@/router'; -import { popout } from './popout'; export function getUserMenu(user) { + const meId = store.getters.isSignedIn ? store.state.i.id : null; + async function pushList() { const t = i18n.global.t('selectList'); // なぜか後で参照すると null になるので最初にメモリに確保しておく const lists = await os.api('users/lists/list'); @@ -130,7 +131,7 @@ export function getUserMenu(user) { action: () => { os.post({ specified: user }); } - }, store.state.i.id != user.id ? { + }, meId != user.id ? { type: 'link', icon: faComments, text: i18n.global.t('startMessaging'), @@ -139,13 +140,13 @@ export function getUserMenu(user) { icon: faListUl, text: i18n.global.t('addToList'), action: pushList - }, store.state.i.id != user.id ? { + }, meId != user.id ? { icon: faUsers, text: i18n.global.t('inviteToGroup'), action: inviteGroup } : undefined] as any; - if (store.getters.isSignedIn && store.state.i.id != user.id) { + if (store.getters.isSignedIn && meId != user.id) { menu = menu.concat([null, { icon: user.isMuted ? faEye : faEyeSlash, text: user.isMuted ? i18n.global.t('unmute') : i18n.global.t('mute'), @@ -175,7 +176,7 @@ export function getUserMenu(user) { } } - if (store.getters.isSignedIn && store.state.i.id === user.id) { + if (store.getters.isSignedIn && meId === user.id) { menu = menu.concat([null, { icon: faPencilAlt, text: i18n.global.t('editProfile'), diff --git a/src/client/themes/_dark.json5 b/src/client/themes/_dark.json5 index f290586eb..9ce885361 100644 --- a/src/client/themes/_dark.json5 +++ b/src/client/themes/_dark.json5 @@ -76,5 +76,6 @@ X13: 'rgba(255, 255, 255, 0.15)', X14: ':alpha<0.5<@navBg', X15: ':alpha<0<@panel', + X16: ':alpha<0.7<@panel', }, } diff --git a/src/client/themes/_light.json5 b/src/client/themes/_light.json5 index 0a1125cab..d08063fda 100644 --- a/src/client/themes/_light.json5 +++ b/src/client/themes/_light.json5 @@ -76,5 +76,6 @@ X13: 'rgba(0, 0, 0, 0.15)', X14: ':alpha<0.5<@navBg', X15: ':alpha<0<@panel', + X16: ':alpha<0.7<@panel', }, } diff --git a/src/client/ui/visitor/b.vue b/src/client/ui/visitor/b.vue index 39ee4e3ed..6c7366c6f 100644 --- a/src/client/ui/visitor/b.vue +++ b/src/client/ui/visitor/b.vue @@ -4,7 +4,7 @@

{{ instanceName }}

-
+
@@ -28,14 +28,35 @@
-
-
- -
-
+
+ +
@@ -48,6 +69,27 @@
+ + + + + + + +
@@ -61,7 +103,7 @@ import MkPagination from '@/components/ui/pagination.vue'; import XSigninDialog from '@/components/signin-dialog.vue'; import XSignupDialog from '@/components/signup-dialog.vue'; import MkButton from '@/components/ui/button.vue'; -import XHeader from '../_common_/header.vue'; +import XHeader from './header.vue'; const DESKTOP_THRESHOLD = 1100; @@ -79,6 +121,7 @@ export default defineComponent({ pageKey: 0, pageInfo: null, meta: null, + showMenu: false, narrow: window.innerWidth < 1280, announcements: { endpoint: 'announcements', @@ -159,6 +202,28 @@ export default defineComponent({ - - diff --git a/src/client/ui/visitor/header.vue b/src/client/ui/visitor/header.vue index ff6fb9144..808616463 100644 --- a/src/client/ui/visitor/header.vue +++ b/src/client/ui/visitor/header.vue @@ -1,31 +1,47 @@