From e0c6688709c12c71efea8312ae3753b3f10e8ca9 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Tue, 21 Jun 2022 15:56:47 +0200 Subject: [PATCH 001/536] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb91425e8..c4486dd6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,11 +17,13 @@ You should also include the user name that made the change. - Client: Show warning in control panel when there is an unresolved abuse report @syuilo - Improve player detection in URL preview @mei23 - Add Badge Image to Push Notification #8012 @tamaina +- Client: Removing entries from a clip @futchitwo ### Bugfixes - Server: Fix GenerateVideoThumbnail failed @mei23 - Server: Ensure temp directory cleanup @Johann150 - favicons of federated instances not showing @syuilo +- Admin: The checkbox for blocking an instance works again @Johann150 ## 12.111.1 (2022/06/13) From c9d4c007081b5e63f6bf23123f6abc942bbf19c6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 21 Jun 2022 23:22:18 +0900 Subject: [PATCH 002/536] fix(client): moderators cannot view instance-info page --- packages/client/src/pages/instance-info.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/client/src/pages/instance-info.vue b/packages/client/src/pages/instance-info.vue index 11e361857..afee31b44 100644 --- a/packages/client/src/pages/instance-info.vue +++ b/packages/client/src/pages/instance-info.vue @@ -141,12 +141,11 @@ async function fetch() { // suspended and blocked information is only displayed to moderators. // otherwise the API will error anyway - meta = await os.api('admin/meta', { detail: true }); instance = await os.api('federation/show-instance', { host: props.host, }); suspended = instance.isSuspended; - isBlocked = meta.blockedHosts.includes(instance.host); + isBlocked = instance.isBlocked; } } From ad123b3cce0a8691681561984fb8c056db23a816 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 22 Jun 2022 00:10:34 +0900 Subject: [PATCH 003/536] tweak client --- packages/client/src/pages/admin-file.vue | 85 ++++++++++++++------- packages/client/src/pages/instance-info.vue | 6 +- packages/client/src/pages/user-info.vue | 63 +++++++++++++-- 3 files changed, 118 insertions(+), 36 deletions(-) diff --git a/packages/client/src/pages/admin-file.vue b/packages/client/src/pages/admin-file.vue index 2cbe8890a..7273ddce6 100644 --- a/packages/client/src/pages/admin-file.vue +++ b/packages/client/src/pages/admin-file.vue @@ -1,30 +1,46 @@
@@ -33,22 +34,25 @@ From d3f25fa29045b8a6ba9332284d07549185c62c70 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 22 Jun 2022 20:47:53 +0900 Subject: [PATCH 007/536] tweak client --- packages/client/src/components/global/page-header.vue | 10 ++++++++-- packages/client/src/components/ui/window.vue | 3 ++- packages/client/src/pages/admin/_header_.vue | 8 +++++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/packages/client/src/components/global/page-header.vue b/packages/client/src/components/global/page-header.vue index 0ad769983..a750fdb30 100644 --- a/packages/client/src/components/global/page-header.vue +++ b/packages/client/src/components/global/page-header.vue @@ -114,7 +114,11 @@ function onTabMousedown(tab: Tab, ev: MouseEvent): void { } function onTabClick(tab: Tab, ev: MouseEvent): void { - if (tab.onClick) tab.onClick(ev); + if (tab.onClick) { + ev.preventDefault(); + ev.stopPropagation(); + tab.onClick(ev); + } if (tab.key) { emit('update:tab', tab.key); } @@ -150,7 +154,7 @@ onMounted(() => { if (el && el.parentElement) { narrow = el.parentElement.offsetWidth < 500; ro = new ResizeObserver((entries, observer) => { - if (el.parentElement) { + if (el.parentElement && document.body.contains(el)) { narrow = el.parentElement.offsetWidth < 500; } }); @@ -268,6 +272,8 @@ onUnmounted(() => { > .icon { margin-right: 8px; + width: 16px; + text-align: center; } > .title { diff --git a/packages/client/src/components/ui/window.vue b/packages/client/src/components/ui/window.vue index 3cd4378f0..a5efab154 100644 --- a/packages/client/src/components/ui/window.vue +++ b/packages/client/src/components/ui/window.vue @@ -402,7 +402,7 @@ export default defineComponent({ height: 100%; > .header { - --height: 50px; + --height: 45px; &.mini { --height: 38px; @@ -415,6 +415,7 @@ export default defineComponent({ user-select: none; height: var(--height); border-bottom: solid 1px var(--divider); + font-size: 95%; > .left, > .right { > .button { diff --git a/packages/client/src/pages/admin/_header_.vue b/packages/client/src/pages/admin/_header_.vue index 59c5ce4f4..1883b4abe 100644 --- a/packages/client/src/pages/admin/_header_.vue +++ b/packages/client/src/pages/admin/_header_.vue @@ -105,7 +105,11 @@ function onTabMousedown(tab: Tab, ev: MouseEvent): void { } function onTabClick(tab: Tab, ev: MouseEvent): void { - if (tab.onClick) tab.onClick(ev); + if (tab.onClick) { + ev.preventDefault(); + ev.stopPropagation(); + tab.onClick(ev); + } if (tab.key) { emit('update:tab', tab.key); } @@ -217,6 +221,8 @@ onUnmounted(() => { > .icon { margin-right: 8px; + width: 16px; + text-align: center; } > .title { From aabf12038c02de9d6bd2089139a5bfb6059409ad Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 22 Jun 2022 20:51:04 +0900 Subject: [PATCH 008/536] 12.112.0-beta.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fd565f7ce..a642571b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "12.111.1-test.1", + "version": "12.112.0-beta.2", "codename": "indigo", "repository": { "type": "git", From 43b9a9e618f4e1345d303f78a437454ccf685f6a Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 22 Jun 2022 23:40:53 +0900 Subject: [PATCH 009/536] enhance(client): tweak ui --- ...stance-info.vue => instance-card-mini.vue} | 8 +- .../client/src/components/user-card-mini.vue | 95 +++++++++++++++++++ packages/client/src/pages/admin/users.vue | 76 ++------------- packages/client/src/pages/federation.vue | 4 +- packages/client/src/pages/user-info.vue | 10 +- 5 files changed, 119 insertions(+), 74 deletions(-) rename packages/client/src/components/{instance-info.vue => instance-card-mini.vue} (90%) create mode 100644 packages/client/src/components/user-card-mini.vue diff --git a/packages/client/src/components/instance-info.vue b/packages/client/src/components/instance-card-mini.vue similarity index 90% rename from packages/client/src/components/instance-info.vue rename to packages/client/src/components/instance-card-mini.vue index e55c1d821..edcd576ce 100644 --- a/packages/client/src/components/instance-info.vue +++ b/packages/client/src/components/instance-card-mini.vue @@ -2,8 +2,8 @@
- {{ instance.host }} - {{ instance.softwareName || '?' }} {{ instance.softwareVersion }} + {{ instance.name ?? instance.host }} + {{ instance.host }} / {{ instance.softwareName || '?' }} {{ instance.softwareVersion }}
@@ -20,7 +20,7 @@ const props = defineProps<{ const chart = $ref(null); -os.api('charts/instance', { host: props.instance.host, limit: 16, span: 'hour' }).then(res => { +os.api('charts/instance', { host: props.instance.host, limit: 16, span: 'day' }).then(res => { chart = res; }); @@ -42,7 +42,7 @@ os.api('charts/instance', { host: props.instance.host, limit: 16, span: 'hour' } height: ($bodyTitleHieght + $bodyInfoHieght); object-fit: cover; border-radius: 4px; - margin-right: 8px; + margin-right: 10px; } > :global(.body) { diff --git a/packages/client/src/components/user-card-mini.vue b/packages/client/src/components/user-card-mini.vue new file mode 100644 index 000000000..9a286a1a8 --- /dev/null +++ b/packages/client/src/components/user-card-mini.vue @@ -0,0 +1,95 @@ + + + + + diff --git a/packages/client/src/pages/admin/users.vue b/packages/client/src/pages/admin/users.vue index dccf952ba..ce377074c 100644 --- a/packages/client/src/pages/admin/users.vue +++ b/packages/client/src/pages/admin/users.vue @@ -41,25 +41,9 @@
- + + + @@ -74,11 +58,11 @@ import XHeader from './_header_.vue'; import MkInput from '@/components/form/input.vue'; import MkSelect from '@/components/form/select.vue'; import MkPagination from '@/components/ui/pagination.vue'; -import { acct } from '@/filters/user'; import * as os from '@/os'; import { lookupUser } from '@/scripts/lookup-user'; import { i18n } from '@/i18n'; import { definePageMetadata } from '@/scripts/page-metadata'; +import MkUserCardMini from '@/components/user-card-mini.vue'; let paginationComponent = $ref>(); @@ -174,54 +158,12 @@ definePageMetadata(computed(() => ({ > .users { margin-top: var(--margin); + display: grid; + grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); + grid-gap: 12px; - > .user { - display: flex; - width: 100%; - box-sizing: border-box; - text-align: left; - align-items: center; - padding: 16px; - - &:hover { - color: var(--accent); - } - - > .avatar { - width: 60px; - height: 60px; - } - - > .body { - margin-left: 0.3em; - padding: 0 8px; - flex: 1; - - @media (max-width: 500px) { - font-size: 14px; - } - - > header { - > .name { - font-weight: bold; - } - - > .acct { - margin-left: 8px; - opacity: 0.7; - } - - > .staff { - margin-left: 0.5em; - color: var(--badge); - } - - > .punished { - margin-left: 0.5em; - color: #4dabf7; - } - } - } + > .user:hover { + text-decoration: none; } } } diff --git a/packages/client/src/pages/federation.vue b/packages/client/src/pages/federation.vue index 38d42f2be..bbd1bd352 100644 --- a/packages/client/src/pages/federation.vue +++ b/packages/client/src/pages/federation.vue @@ -42,7 +42,7 @@
- +
@@ -57,7 +57,7 @@ import MkButton from '@/components/ui/button.vue'; import MkInput from '@/components/form/input.vue'; import MkSelect from '@/components/form/select.vue'; import MkPagination from '@/components/ui/pagination.vue'; -import MkInstanceInfo from '@/components/instance-info.vue'; +import MkInstanceCardMini from '@/components/instance-card-mini.vue'; import FormSplit from '@/components/form/split.vue'; import * as os from '@/os'; import { i18n } from '@/i18n'; diff --git a/packages/client/src/pages/user-info.vue b/packages/client/src/pages/user-info.vue index 67fc5ba7e..ad11ae045 100644 --- a/packages/client/src/pages/user-info.vue +++ b/packages/client/src/pages/user-info.vue @@ -77,6 +77,10 @@ +
+ + +
@@ -225,7 +229,7 @@ watch(() => props.userId, () => { watch(() => user, () => { os.api('ap/get', { - uri: user.uri || `${url}/users/${user.id}`, + uri: user.uri ?? `${url}/users/${user.id}`, }).then(res => { ap = res; }); @@ -241,6 +245,10 @@ const headerTabs = $computed(() => [{ key: 'chart', title: i18n.ts.charts, icon: 'fas fa-chart-simple', +}, { + key: 'ap', + title: 'AP', + icon: 'fas fa-share-alt', }, { key: 'raw', title: 'Raw data', From 2a2020b79786b25668bfcfed19366a26c840e508 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 23 Jun 2022 13:19:17 +0900 Subject: [PATCH 010/536] chore(dev): improve eslint config --- packages/client/.eslintrc.js | 1 - packages/shared/.eslintrc.js | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/client/.eslintrc.js b/packages/client/.eslintrc.js index 10f0e5a9c..902214348 100644 --- a/packages/client/.eslintrc.js +++ b/packages/client/.eslintrc.js @@ -25,7 +25,6 @@ module.exports = { // data の禁止理由: 抽象的すぎるため // e の禁止理由: error や event など、複数のキーワードの頭文字であり分かりにくいため 'id-denylist': ['error', 'window', 'data', 'e'], - 'eqeqeq': ['error', 'always', { 'null': 'ignore' }], 'no-shadow': ['warn'], 'vue/attributes-order': ['error', { 'alphabetical': false, diff --git a/packages/shared/.eslintrc.js b/packages/shared/.eslintrc.js index 4d9d6f2c8..dc5321882 100644 --- a/packages/shared/.eslintrc.js +++ b/packages/shared/.eslintrc.js @@ -31,6 +31,11 @@ module.exports = { 'beforeColon': false, 'afterColon': true, }], + 'arrow-spacing': ['error', { + 'before': true, + 'after': true, + }], + 'padded-blocks': ['error', 'never'], /* TODO: path aliasを使わないとwarnする 'no-restricted-imports': ['warn', { 'patterns': [ From d1e151172b8e7b41e443e4ce33e2ad710aa0de55 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 23 Jun 2022 13:39:28 +0900 Subject: [PATCH 011/536] chore(client): tweak client design --- .../src/components/instance-card-mini.vue | 4 ++- .../client/src/components/user-card-mini.vue | 4 ++- packages/client/src/pages/user-info.vue | 36 ++++++++++++++++--- 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/packages/client/src/components/instance-card-mini.vue b/packages/client/src/components/instance-card-mini.vue index edcd576ce..0bac6c0ad 100644 --- a/packages/client/src/components/instance-card-mini.vue +++ b/packages/client/src/components/instance-card-mini.vue @@ -62,7 +62,9 @@ os.api('charts/instance', { host: props.instance.host, limit: 16, span: 'day' }) } > :global(.sub) { - font-size: 75%; + display: block; + width: 100%; + font-size: 80%; opacity: 0.7; line-height: $bodyInfoHieght; white-space: nowrap; diff --git a/packages/client/src/components/user-card-mini.vue b/packages/client/src/components/user-card-mini.vue index 9a286a1a8..d83e4a56f 100644 --- a/packages/client/src/components/user-card-mini.vue +++ b/packages/client/src/components/user-card-mini.vue @@ -61,7 +61,9 @@ os.api('charts/user/notes', { userId: props.user.id, limit: 16, span: 'day' }).t } > :global(.sub) { - font-size: 75%; + display: block; + width: 100%; + font-size: 95%; opacity: 0.7; line-height: $bodyInfoHieght; white-space: nowrap; diff --git a/packages/client/src/pages/user-info.vue b/packages/client/src/pages/user-info.vue index ad11ae045..cc187b9df 100644 --- a/packages/client/src/pages/user-info.vue +++ b/packages/client/src/pages/user-info.vue @@ -6,6 +6,10 @@
+
+ + @{{ acct(user) }} +
@@ -17,11 +21,6 @@ {{ i18n.ts.instanceInfo }}
- - - - - @@ -264,10 +263,37 @@ definePageMetadata(computed(() => ({ From c9e9129373a41b1ffe3a8d345b10a3a9a0ce48ee Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 24 Jun 2022 00:47:55 +0900 Subject: [PATCH 016/536] fix #8861 --- packages/client/src/pages/theme-editor.vue | 138 +++++++++--------- .../client/src/scripts/use-leave-guard.ts | 2 + 2 files changed, 72 insertions(+), 68 deletions(-) diff --git a/packages/client/src/pages/theme-editor.vue b/packages/client/src/pages/theme-editor.vue index 38f3b90a6..352554353 100644 --- a/packages/client/src/pages/theme-editor.vue +++ b/packages/client/src/pages/theme-editor.vue @@ -1,68 +1,70 @@ - @@ -19,10 +19,12 @@ const props = defineProps<{ user: misskey.entities.User; }>(); -const chart = $ref(null); +let chartValues = $ref(null); -os.apiGet('charts/user/notes', { userId: props.user.id, limit: 16, span: 'day' }).then(res => { - chart = res; +os.apiGet('charts/user/notes', { userId: props.user.id, limit: 16 + 1, span: 'day' }).then(res => { + // 今日のぶんの値はまだ途中の値であり、それも含めると大抵の場合前日よりも下降しているようなグラフになってしまうため今日は弾く + res.inc.splice(0, 1); + chartValues = res.inc; }); From 4329d9e76dac8b20f72381baceb94076052af424 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 26 Jun 2022 15:55:51 +0900 Subject: [PATCH 052/536] chore(client): fix type --- packages/client/src/components/instance-card-mini.vue | 2 +- packages/client/src/components/user-card-mini.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/src/components/instance-card-mini.vue b/packages/client/src/components/instance-card-mini.vue index 72d83bd99..88621e72c 100644 --- a/packages/client/src/components/instance-card-mini.vue +++ b/packages/client/src/components/instance-card-mini.vue @@ -18,7 +18,7 @@ const props = defineProps<{ instance: misskey.entities.Instance; }>(); -let chartValues = $ref(null); +let chartValues = $ref(null); os.apiGet('charts/instance', { host: props.instance.host, limit: 16 + 1, span: 'day' }).then(res => { // 今日のぶんの値はまだ途中の値であり、それも含めると大抵の場合前日よりも下降しているようなグラフになってしまうため今日は弾く diff --git a/packages/client/src/components/user-card-mini.vue b/packages/client/src/components/user-card-mini.vue index 997431d1b..732adf7f5 100644 --- a/packages/client/src/components/user-card-mini.vue +++ b/packages/client/src/components/user-card-mini.vue @@ -19,7 +19,7 @@ const props = defineProps<{ user: misskey.entities.User; }>(); -let chartValues = $ref(null); +let chartValues = $ref(null); os.apiGet('charts/user/notes', { userId: props.user.id, limit: 16 + 1, span: 'day' }).then(res => { // 今日のぶんの値はまだ途中の値であり、それも含めると大抵の場合前日よりも下降しているようなグラフになってしまうため今日は弾く From bd3c6f4157366e34b41d35eefefce03d110dd415 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 26 Jun 2022 16:38:27 +0900 Subject: [PATCH 053/536] chore(client): tweak ui :art: --- .../client/src/components/form/checkbox.vue | 143 ++++++++++++++++++ .../client/src/components/form/switch.vue | 47 +++--- packages/client/src/themes/_dark.json5 | 4 + packages/client/src/themes/_light.json5 | 4 + 4 files changed, 174 insertions(+), 24 deletions(-) create mode 100644 packages/client/src/components/form/checkbox.vue diff --git a/packages/client/src/components/form/checkbox.vue b/packages/client/src/components/form/checkbox.vue new file mode 100644 index 000000000..fadb770ae --- /dev/null +++ b/packages/client/src/components/form/checkbox.vue @@ -0,0 +1,143 @@ + + + + + diff --git a/packages/client/src/components/form/switch.vue b/packages/client/src/components/form/switch.vue index fadb770ae..22b307a46 100644 --- a/packages/client/src/components/form/switch.vue +++ b/packages/client/src/components/form/switch.vue @@ -1,6 +1,6 @@ - @@ -229,14 +171,13 @@ export default defineComponent({ } > .input { - $height: 42px; position: relative; > input { appearance: none; -webkit-appearance: none; display: block; - height: $height; + height: v-bind("height + 'px'"); width: 100%; margin: 0; padding: 0 12px; @@ -266,7 +207,7 @@ export default defineComponent({ top: 0; padding: 0 12px; font-size: 1em; - height: $height; + height: v-bind("height + 'px'"); pointer-events: none; &:empty { diff --git a/packages/client/src/components/form/select.vue b/packages/client/src/components/form/select.vue index 7f5f8784b..05e95a091 100644 --- a/packages/client/src/components/form/select.vue +++ b/packages/client/src/components/form/select.vue @@ -26,178 +26,139 @@
- From ea3d391df94789bb7d6bf9e00f96eb4ca1009f8f Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 28 Jun 2022 16:02:39 +0900 Subject: [PATCH 074/536] chore(client): tweak style --- packages/client/src/pages/settings/theme.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/pages/settings/theme.vue b/packages/client/src/pages/settings/theme.vue index ddffe0822..d4c23e07b 100644 --- a/packages/client/src/pages/settings/theme.vue +++ b/packages/client/src/pages/settings/theme.vue @@ -388,7 +388,7 @@ definePageMetadata({ .root { > .selects { display: flex; - gap: var(--margin); + gap: 1.5em var(--margin); flex-wrap: wrap; > .select { From 30bdfde4cc666550c00ca1ea36abbfe9702c12ae Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 28 Jun 2022 16:06:23 +0900 Subject: [PATCH 075/536] 12.112.0-beta.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dc15198ca..9b1fd6b1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "12.112.0-beta.6", + "version": "12.112.0-beta.7", "codename": "indigo", "repository": { "type": "git", From a50b1d69a1aa7a6a387dd673f96f040680d529dc Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 28 Jun 2022 17:59:23 +0900 Subject: [PATCH 076/536] chore(client): fix #8858 --- packages/client/src/nirax.ts | 5 +++++ packages/client/src/ui/deck.vue | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/packages/client/src/nirax.ts b/packages/client/src/nirax.ts index cae4edaf1..6db633566 100644 --- a/packages/client/src/nirax.ts +++ b/packages/client/src/nirax.ts @@ -66,6 +66,7 @@ export class Router extends EventEmitter<{ private currentKey = Date.now().toString(); public currentRoute: ShallowRef = shallowRef(null); + public navHook: ((path: string) => boolean) | null = null; constructor(routes: Router['routes'], currentPath: Router['currentPath']) { super(); @@ -192,6 +193,10 @@ export class Router extends EventEmitter<{ } public push(path: string) { + if (this.navHook) { + const cancel = this.navHook(path); + if (cancel) return; + } const beforePath = this.currentPath; this.navigate(path, null); this.emit('push', { diff --git a/packages/client/src/ui/deck.vue b/packages/client/src/ui/deck.vue index 743326479..b3b9ddd55 100644 --- a/packages/client/src/ui/deck.vue +++ b/packages/client/src/ui/deck.vue @@ -65,6 +65,13 @@ import { $i } from '@/account'; import { i18n } from '@/i18n'; import { mainRouter } from '@/router'; +if (deckStore.state.navWindow) { + mainRouter.navHook = (path) => { + os.pageWindow(path); + return true; + }; +} + const isMobile = ref(window.innerWidth <= 500); window.addEventListener('resize', () => { isMobile.value = window.innerWidth <= 500; From d7e7152bd3dfa40a0bc9011944f6caa5447a0a27 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 28 Jun 2022 18:09:42 +0900 Subject: [PATCH 077/536] chore(client): tweak style --- packages/client/src/components/form/radio.vue | 19 ++++++++++--------- .../src/components/global/page-header.vue | 2 +- packages/client/src/components/ui/window.vue | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/client/src/components/form/radio.vue b/packages/client/src/components/form/radio.vue index 2becbec6f..db13fee4f 100644 --- a/packages/client/src/components/form/radio.vue +++ b/packages/client/src/components/form/radio.vue @@ -7,7 +7,8 @@ :aria-disabled="disabled" @click="toggle" > - @@ -23,27 +24,27 @@ import { defineComponent } from 'vue'; export default defineComponent({ props: { modelValue: { - required: false + required: false, }, value: { - required: false + required: false, }, disabled: { type: Boolean, - default: false - } + default: false, + }, }, computed: { checked(): boolean { return this.modelValue === this.value; - } + }, }, methods: { toggle() { if (this.disabled) return; this.$emit('update:modelValue', this.value); - } - } + }, + }, }); @@ -53,7 +54,7 @@ export default defineComponent({ display: inline-block; text-align: left; cursor: pointer; - padding: 10px 12px; + padding: 9px 12px; background-color: var(--panel); background-clip: padding-box !important; border: solid 1px var(--panel); diff --git a/packages/client/src/components/global/page-header.vue b/packages/client/src/components/global/page-header.vue index a750fdb30..a080c39dd 100644 --- a/packages/client/src/components/global/page-header.vue +++ b/packages/client/src/components/global/page-header.vue @@ -181,7 +181,7 @@ onUnmounted(() => { border-bottom: solid 0.5px var(--divider); &.thin { - --height: 50px; + --height: 45px; > .buttons { > .button { diff --git a/packages/client/src/components/ui/window.vue b/packages/client/src/components/ui/window.vue index 25f937ef1..8305cd1b2 100644 --- a/packages/client/src/components/ui/window.vue +++ b/packages/client/src/components/ui/window.vue @@ -408,7 +408,7 @@ export default defineComponent({ background: var(--windowHeader); -webkit-backdrop-filter: var(--blur, blur(15px)); backdrop-filter: var(--blur, blur(15px)); - border-bottom: solid 1px var(--divider); + //border-bottom: solid 1px var(--divider); font-size: 95%; > .left, > .right { From ac162f9996f5fd062d1d5e9696a66045b935761d Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 28 Jun 2022 18:41:37 +0900 Subject: [PATCH 078/536] chore(client): tweak style --- packages/client/src/components/form/range.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/components/form/range.vue b/packages/client/src/components/form/range.vue index 221ad029a..ac4a781e3 100644 --- a/packages/client/src/components/form/range.vue +++ b/packages/client/src/components/form/range.vue @@ -195,7 +195,7 @@ export default defineComponent({ $thumbWidth: 20px; > .body { - padding: 12px; + padding: 10px 12px; background: var(--panel); border: solid 1px var(--panel); border-radius: 6px; From 9a4198293a781932fdcec193c07f659ff6ead076 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 28 Jun 2022 22:32:01 +0900 Subject: [PATCH 079/536] chore(client): tweak style --- packages/client/src/components/form/radio.vue | 1 + .../client/src/components/form/radios.vue | 32 +++++++++---------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/packages/client/src/components/form/radio.vue b/packages/client/src/components/form/radio.vue index db13fee4f..b4d39507e 100644 --- a/packages/client/src/components/form/radio.vue +++ b/packages/client/src/components/form/radio.vue @@ -55,6 +55,7 @@ export default defineComponent({ text-align: left; cursor: pointer; padding: 9px 12px; + min-width: 60px; background-color: var(--panel); background-clip: padding-box !important; border: solid 1px var(--panel); diff --git a/packages/client/src/components/form/radios.vue b/packages/client/src/components/form/radios.vue index a52acae9e..bde4a8fb0 100644 --- a/packages/client/src/components/form/radios.vue +++ b/packages/client/src/components/form/radios.vue @@ -4,11 +4,11 @@ import MkRadio from './radio.vue'; export default defineComponent({ components: { - MkRadio + MkRadio, }, props: { modelValue: { - required: false + required: false, }, }, data() { @@ -19,7 +19,7 @@ export default defineComponent({ watch: { value() { this.$emit('update:modelValue', this.value); - } + }, }, render() { let options = this.$slots.default(); @@ -30,25 +30,25 @@ export default defineComponent({ if (options.length === 1 && options[0].props == null) options = options[0].children; return h('div', { - class: 'novjtcto' + class: 'novjtcto', }, [ ...(label ? [h('div', { - class: 'label' + class: 'label', }, [label])] : []), h('div', { - class: 'body' + class: 'body', }, options.map(option => h(MkRadio, { - key: option.key, - value: option.props.value, - modelValue: this.value, - 'onUpdate:modelValue': value => this.value = value, - }, option.children)), + key: option.key, + value: option.props.value, + modelValue: this.value, + 'onUpdate:modelValue': value => this.value = value, + }, option.children)), ), ...(caption ? [h('div', { - class: 'caption' + class: 'caption', }, [caption])] : []), ]); - } + }, }); @@ -65,9 +65,9 @@ export default defineComponent({ } > .body { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); - grid-gap: 12px; + display: flex; + gap: 12px; + flex-wrap: wrap; } > .caption { From 9f7c9b122fcdf29da85ad7e8caa273a1a0efcc15 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 28 Jun 2022 22:56:18 +0900 Subject: [PATCH 080/536] =?UTF-8?q?fix(client):=20=E9=9D=9E=E3=83=A2?= =?UTF-8?q?=E3=83=87=E3=83=AC=E3=83=BC=E3=82=BF=E3=83=BC=E3=81=8C=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=82=B9=E3=82=BF=E3=83=B3=E3=82=B9=E6=83=85=E5=A0=B1?= =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/client/src/pages/instance-info.vue | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/client/src/pages/instance-info.vue b/packages/client/src/pages/instance-info.vue index 9eddbad79..6d52f2a87 100644 --- a/packages/client/src/pages/instance-info.vue +++ b/packages/client/src/pages/instance-info.vue @@ -134,16 +134,11 @@ let suspended = $ref(false); let isBlocked = $ref(false); async function fetch() { - if (iAmModerator) { - // suspended and blocked information is only displayed to moderators. - // otherwise the API will error anyway - - instance = await os.api('federation/show-instance', { - host: props.host, - }); - suspended = instance.isSuspended; - isBlocked = instance.isBlocked; - } + instance = await os.api('federation/show-instance', { + host: props.host, + }); + suspended = instance.isSuspended; + isBlocked = instance.isBlocked; } async function toggleBlock(ev) { From 1a698111a4ab5464ec000e59179a0083669dbc6d Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 29 Jun 2022 00:36:06 +0900 Subject: [PATCH 081/536] refactor(client): remove invalid computed --- packages/client/src/components/captcha.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/src/components/captcha.vue b/packages/client/src/components/captcha.vue index 183658471..736073491 100644 --- a/packages/client/src/components/captcha.vue +++ b/packages/client/src/components/captcha.vue @@ -51,7 +51,7 @@ const variable = computed(() => { } }); -const loaded = computed(() => !!window[variable.value]); +const loaded = !!window[variable.value]; const src = computed(() => { switch (props.provider) { @@ -62,7 +62,7 @@ const src = computed(() => { const captcha = computed(() => window[variable.value] || {} as unknown as Captcha); -if (loaded.value) { +if (loaded) { available.value = true; } else { (document.getElementById(props.provider) || document.head.appendChild(Object.assign(document.createElement('script'), { @@ -74,7 +74,7 @@ if (loaded.value) { } function reset() { - if (captcha.value?.reset) captcha.value.reset(); + if (captcha.value.reset) captcha.value.reset(); } function requestRender() { From 0f1c0a42a253dcc5758e4811aaa116708d482305 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 29 Jun 2022 11:13:32 +0900 Subject: [PATCH 082/536] =?UTF-8?q?enhance(client):=20=E3=83=A1=E3=83=8B?= =?UTF-8?q?=E3=83=A5=E3=83=BC=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolve #6389 Fix #8035 --- locales/ja-JP.yml | 1 + packages/client/src/components/launch-pad.vue | 31 ++++- packages/client/src/menu.ts | 29 ----- .../{emojis.category.vue => about.emojis.vue} | 0 .../client/src/pages/about.federation.vue | 106 +++++++++++++++ packages/client/src/pages/about.vue | 18 ++- packages/client/src/pages/admin/index.vue | 2 +- packages/client/src/pages/emojis.vue | 60 --------- packages/client/src/pages/federation.vue | 122 ------------------ packages/client/src/pages/mentions.vue | 27 ---- packages/client/src/pages/messages.vue | 30 ----- packages/client/src/pages/notifications.vue | 44 +++++-- .../client/src/pages/user/index.activity.vue | 6 +- packages/client/src/router.ts | 12 -- packages/client/src/widgets/activity.vue | 2 +- 15 files changed, 190 insertions(+), 300 deletions(-) rename packages/client/src/pages/{emojis.category.vue => about.emojis.vue} (100%) create mode 100644 packages/client/src/pages/about.federation.vue delete mode 100644 packages/client/src/pages/emojis.vue delete mode 100644 packages/client/src/pages/federation.vue delete mode 100644 packages/client/src/pages/mentions.vue delete mode 100644 packages/client/src/pages/messages.vue diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index f81338922..139643f72 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -857,6 +857,7 @@ check: "チェック" isSystemAccount: "システムにより自動で作成・管理されているアカウントです。" typeToConfirm: "この操作を行うには {x} と入力してください" deleteAccount: "アカウント削除" +document: "ドキュメント" _emailUnavailable: used: "既に使用されています" diff --git a/packages/client/src/components/launch-pad.vue b/packages/client/src/components/launch-pad.vue index ffefc1b08..a6025f8b2 100644 --- a/packages/client/src/components/launch-pad.vue +++ b/packages/client/src/components/launch-pad.vue @@ -16,13 +16,13 @@
- + -
{{ $t('aboutX', { x: instanceName }) }}
+
{{ $ts.instanceInfo }}
@@ -34,13 +34,14 @@ diff --git a/packages/client/src/pages/about.vue b/packages/client/src/pages/about.vue index c0226bdb6..bacfab771 100644 --- a/packages/client/src/pages/about.vue +++ b/packages/client/src/pages/about.vue @@ -67,6 +67,12 @@
+ + + + + + @@ -75,6 +81,8 @@ - - diff --git a/packages/client/src/pages/federation.vue b/packages/client/src/pages/federation.vue deleted file mode 100644 index 07c5a32bd..000000000 --- a/packages/client/src/pages/federation.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - - - diff --git a/packages/client/src/pages/mentions.vue b/packages/client/src/pages/mentions.vue deleted file mode 100644 index 0835f1f01..000000000 --- a/packages/client/src/pages/mentions.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - diff --git a/packages/client/src/pages/messages.vue b/packages/client/src/pages/messages.vue deleted file mode 100644 index e443b5c46..000000000 --- a/packages/client/src/pages/messages.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - diff --git a/packages/client/src/pages/notifications.vue b/packages/client/src/pages/notifications.vue index 52cb298fa..3df1a3f17 100644 --- a/packages/client/src/pages/notifications.vue +++ b/packages/client/src/pages/notifications.vue @@ -2,8 +2,14 @@ -
- +
+ +
+
+ +
+
+
@@ -13,12 +19,27 @@ import { computed } from 'vue'; import { notificationTypes } from 'misskey-js'; import XNotifications from '@/components/notifications.vue'; +import XNotes from '@/components/notes.vue'; import * as os from '@/os'; import { i18n } from '@/i18n'; import { definePageMetadata } from '@/scripts/page-metadata'; let tab = $ref('all'); let includeTypes = $ref(null); +let unreadOnly = $computed(() => tab === 'unread'); + +const mentionsPagination = { + endpoint: 'notes/mentions' as const, + limit: 10, +}; + +const directNotesPagination = { + endpoint: 'notes/mentions' as const, + limit: 10, + params: { + visibility: 'specified', + }, +}; function setFilter(ev) { const typeItems = notificationTypes.map(t => ({ @@ -38,18 +59,18 @@ function setFilter(ev) { os.popupMenu(items, ev.currentTarget ?? ev.target); } -const headerActions = $computed(() => [{ +const headerActions = $computed(() => [tab === 'all' ? { text: i18n.ts.filter, icon: 'fas fa-filter', highlighted: includeTypes != null, handler: setFilter, -}, { +} : undefined, tab === 'all' ? { text: i18n.ts.markAllAsRead, icon: 'fas fa-check', handler: () => { os.apiWithDialog('notifications/mark-all-as-read'); }, -}]); +} : undefined].filter(x => x !== undefined)); const headerTabs = $computed(() => [{ key: 'all', @@ -57,6 +78,14 @@ const headerTabs = $computed(() => [{ }, { key: 'unread', title: i18n.ts.unread, +}, { + key: 'mentions', + title: i18n.ts.mentions, + icon: 'fas fa-at', +}, { + key: 'directNotes', + title: i18n.ts.directNotes, + icon: 'fas fa-envelope', }]); definePageMetadata(computed(() => ({ @@ -65,8 +94,3 @@ definePageMetadata(computed(() => ({ bg: 'var(--bg)', }))); - - diff --git a/packages/client/src/pages/user/index.activity.vue b/packages/client/src/pages/user/index.activity.vue index aecd25d6b..8a7a86e0f 100644 --- a/packages/client/src/pages/user/index.activity.vue +++ b/packages/client/src/pages/user/index.activity.vue @@ -1,6 +1,6 @@