From 77d4d6e3777d33615cb874a3ed2c71fb24e62f11 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Jul 2022 05:12:22 +0900 Subject: [PATCH 1/6] =?UTF-8?q?fix(client):=20=E3=83=87=E3=83=83=E3=82=ADU?= =?UTF-8?q?I=E6=99=82=E3=81=AB=20=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=A7?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=20=E3=83=9C=E3=82=BF=E3=83=B3=E3=81=8C?= =?UTF-8?q?=E6=A9=9F=E8=83=BD=E3=81=97=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #9010 --- CHANGELOG.md | 7 +++++++ packages/client/src/components/page-window.vue | 2 +- packages/client/src/nirax.ts | 6 +++--- packages/client/src/ui/deck.vue | 3 ++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf7522493..63f6c7f4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ You should also include the user name that made the change. --> +## 12.x.x (unreleased) + +### Improvements + +### Bugfixes +- Client: デッキUI時に ページで表示 ボタンが機能しない問題を修正 @syuilo + ## 12.116.0 (2022/07/16) ### Improvements diff --git a/packages/client/src/components/page-window.vue b/packages/client/src/components/page-window.vue index 5b06c7718..98140b95c 100644 --- a/packages/client/src/components/page-window.vue +++ b/packages/client/src/components/page-window.vue @@ -122,7 +122,7 @@ function close() { } function expand() { - mainRouter.push(router.getCurrentPath()); + mainRouter.push(router.getCurrentPath(), 'forcePage'); windowEl.close(); } diff --git a/packages/client/src/nirax.ts b/packages/client/src/nirax.ts index 4efa0345a..4ba1fe70f 100644 --- a/packages/client/src/nirax.ts +++ b/packages/client/src/nirax.ts @@ -71,7 +71,7 @@ export class Router extends EventEmitter<{ private currentKey = Date.now().toString(); public currentRoute: ShallowRef = shallowRef(null); - public navHook: ((path: string) => boolean) | null = null; + public navHook: ((path: string, flag?: any) => boolean) | null = null; constructor(routes: Router['routes'], currentPath: Router['currentPath']) { super(); @@ -213,14 +213,14 @@ export class Router extends EventEmitter<{ return this.currentKey; } - public push(path: string) { + public push(path: string, flag?: any) { const beforePath = this.currentPath; if (path === beforePath) { this.emit('same'); return; } if (this.navHook) { - const cancel = this.navHook(path); + const cancel = this.navHook(path, flag); if (cancel) return; } this.navigate(path, null); diff --git a/packages/client/src/ui/deck.vue b/packages/client/src/ui/deck.vue index 8c9e52063..20b955ddb 100644 --- a/packages/client/src/ui/deck.vue +++ b/packages/client/src/ui/deck.vue @@ -89,7 +89,8 @@ import { mainRouter } from '@/router'; import { unisonReload } from '@/scripts/unison-reload'; const XStatusBars = defineAsyncComponent(() => import('@/ui/_common_/statusbars.vue')); -mainRouter.navHook = (path): boolean => { +mainRouter.navHook = (path, flag): boolean => { + if (flag === 'forcePage') return false; const noMainColumn = !deckStore.state.columns.some(x => x.type === 'main'); if (deckStore.state.navWindow || noMainColumn) { os.pageWindow(path); From da92988fb89c925f2561c589570ec41e2e62b473 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Jul 2022 05:12:43 +0900 Subject: [PATCH 2/6] fix(client): fix deck style --- packages/client/src/ui/deck.vue | 2 -- packages/client/src/ui/deck/column.vue | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/client/src/ui/deck.vue b/packages/client/src/ui/deck.vue index 20b955ddb..f8263b1b9 100644 --- a/packages/client/src/ui/deck.vue +++ b/packages/client/src/ui/deck.vue @@ -162,8 +162,6 @@ const onContextmenu = (ev) => { }], ev); }; -provide('shouldSpacerMin', true); - document.documentElement.style.overflowY = 'hidden'; document.documentElement.style.scrollBehavior = 'auto'; window.addEventListener('wheel', (ev) => { diff --git a/packages/client/src/ui/deck/column.vue b/packages/client/src/ui/deck/column.vue index 4d34ca9b8..3de9b1801 100644 --- a/packages/client/src/ui/deck/column.vue +++ b/packages/client/src/ui/deck/column.vue @@ -46,6 +46,7 @@ import { i18n } from '@/i18n'; provide('shouldHeaderThin', true); provide('shouldOmitHeaderTitle', true); +provide('shouldSpacerMin', true); const props = withDefaults(defineProps<{ column: Column; From bec2d9e3fafd721f116066f6a7e3ff0507b27de9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Jul 2022 05:12:59 +0900 Subject: [PATCH 3/6] Update 1651224615271-foreign-key.js #8852 --- packages/backend/migration/1651224615271-foreign-key.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/migration/1651224615271-foreign-key.js b/packages/backend/migration/1651224615271-foreign-key.js index 1f1510f84..535d21731 100644 --- a/packages/backend/migration/1651224615271-foreign-key.js +++ b/packages/backend/migration/1651224615271-foreign-key.js @@ -30,9 +30,9 @@ export class foreignKeyReports1651224615271 { queryRunner.query(`CREATE INDEX "IDX_f22169eb10657bded6d875ac8f" ON "note" ("channelId")`), //queryRunner.query(`CREATE INDEX "IDX_a9021cc2e1feb5f72d3db6e9f5" ON "abuse_user_report" ("targetUserId")`), - queryRunner.query(`DELETE FROM "abuse_user_report" WHERE "targetUserId" NOT IN (SELECT "id" FROM "user")`).then(() => { - queryRunner.query(`ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_a9021cc2e1feb5f72d3db6e9f5f" FOREIGN KEY ("targetUserId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - }), + //queryRunner.query(`DELETE FROM "abuse_user_report" WHERE "targetUserId" NOT IN (SELECT "id" FROM "user")`).then(() => { + // queryRunner.query(`ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_a9021cc2e1feb5f72d3db6e9f5f" FOREIGN KEY ("targetUserId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); + //}), queryRunner.query(`ALTER TABLE "poll" ADD CONSTRAINT "UQ_da851e06d0dfe2ef397d8b1bf1b" UNIQUE ("noteId")`), queryRunner.query(`ALTER TABLE "user_keypair" ADD CONSTRAINT "UQ_f4853eb41ab722fe05f81cedeb6" UNIQUE ("userId")`), From 2dae56fc8f8cb8382e2c10d87c65c19529827838 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Jul 2022 05:13:07 +0900 Subject: [PATCH 4/6] chore(client): tweak style --- packages/client/src/pages/registry.keys.vue | 2 +- packages/client/src/pages/registry.value.vue | 2 +- packages/client/src/pages/registry.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/src/pages/registry.keys.vue b/packages/client/src/pages/registry.keys.vue index 9d2f24f18..e58077905 100644 --- a/packages/client/src/pages/registry.keys.vue +++ b/packages/client/src/pages/registry.keys.vue @@ -1,7 +1,7 @@