Merge branch 'develop'

This commit is contained in:
syuilo 2022-07-17 05:35:36 +09:00
commit f25518af91
16 changed files with 82 additions and 55 deletions

View file

@ -9,6 +9,12 @@
You should also include the user name that made the change. You should also include the user name that made the change.
--> -->
## 12.116.1 (2022/07/17)
### Bugfixes
- Client: デッキUI時に ページで表示 ボタンが機能しない問題を修正 @syuilo
- Error During Migration Run to 12.111.x
## 12.116.0 (2022/07/16) ## 12.116.0 (2022/07/16)
### Improvements ### Improvements

View file

@ -1755,6 +1755,7 @@ _deck:
alwaysShowMainColumn: "常にメインカラムを表示" alwaysShowMainColumn: "常にメインカラムを表示"
columnAlign: "カラムの寄せ" columnAlign: "カラムの寄せ"
addColumn: "カラムを追加" addColumn: "カラムを追加"
configureColumn: "カラムの設定"
swapLeft: "左に移動" swapLeft: "左に移動"
swapRight: "右に移動" swapRight: "右に移動"
swapUp: "上に移動" swapUp: "上に移動"

View file

@ -1,6 +1,6 @@
{ {
"name": "misskey", "name": "misskey",
"version": "12.116.0", "version": "12.116.1",
"codename": "indigo", "codename": "indigo",
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -30,9 +30,9 @@ export class foreignKeyReports1651224615271 {
queryRunner.query(`CREATE INDEX "IDX_f22169eb10657bded6d875ac8f" ON "note" ("channelId")`), queryRunner.query(`CREATE INDEX "IDX_f22169eb10657bded6d875ac8f" ON "note" ("channelId")`),
//queryRunner.query(`CREATE INDEX "IDX_a9021cc2e1feb5f72d3db6e9f5" ON "abuse_user_report" ("targetUserId")`), //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(`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 "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 "poll" ADD CONSTRAINT "UQ_da851e06d0dfe2ef397d8b1bf1b" UNIQUE ("noteId")`),
queryRunner.query(`ALTER TABLE "user_keypair" ADD CONSTRAINT "UQ_f4853eb41ab722fe05f81cedeb6" UNIQUE ("userId")`), queryRunner.query(`ALTER TABLE "user_keypair" ADD CONSTRAINT "UQ_f4853eb41ab722fe05f81cedeb6" UNIQUE ("userId")`),

View file

@ -122,7 +122,7 @@ function close() {
} }
function expand() { function expand() {
mainRouter.push(router.getCurrentPath()); mainRouter.push(router.getCurrentPath(), 'forcePage');
windowEl.close(); windowEl.close();
} }

View file

@ -71,7 +71,7 @@ export class Router extends EventEmitter<{
private currentKey = Date.now().toString(); private currentKey = Date.now().toString();
public currentRoute: ShallowRef<RouteDef | null> = shallowRef(null); public currentRoute: ShallowRef<RouteDef | null> = 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']) { constructor(routes: Router['routes'], currentPath: Router['currentPath']) {
super(); super();
@ -213,14 +213,14 @@ export class Router extends EventEmitter<{
return this.currentKey; return this.currentKey;
} }
public push(path: string) { public push(path: string, flag?: any) {
const beforePath = this.currentPath; const beforePath = this.currentPath;
if (path === beforePath) { if (path === beforePath) {
this.emit('same'); this.emit('same');
return; return;
} }
if (this.navHook) { if (this.navHook) {
const cancel = this.navHook(path); const cancel = this.navHook(path, flag);
if (cancel) return; if (cancel) return;
} }
this.navigate(path, null); this.navigate(path, null);

View file

@ -1,7 +1,7 @@
<template> <template>
<MkStickyContainer> <MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template> <template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="600"> <MkSpacer :content-max="600" :margin-min="16">
<FormSplit> <FormSplit>
<MkKeyValue class="_formBlock"> <MkKeyValue class="_formBlock">
<template #key>{{ $ts._registry.domain }}</template> <template #key>{{ $ts._registry.domain }}</template>

View file

@ -1,7 +1,7 @@
<template> <template>
<MkStickyContainer> <MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template> <template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="600"> <MkSpacer :content-max="600" :margin-min="16">
<FormInfo warn>{{ $ts.editTheseSettingsMayBreakAccount }}</FormInfo> <FormInfo warn>{{ $ts.editTheseSettingsMayBreakAccount }}</FormInfo>
<template v-if="value"> <template v-if="value">

View file

@ -1,7 +1,7 @@
<template> <template>
<MkStickyContainer> <MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template> <template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="600"> <MkSpacer :content-max="600" :margin-min="16">
<MkButton primary @click="createKey">{{ i18n.ts._registry.createKey }}</MkButton> <MkButton primary @click="createKey">{{ i18n.ts._registry.createKey }}</MkButton>
<FormSection v-if="scopes"> <FormSection v-if="scopes">

View file

@ -89,7 +89,8 @@ import { mainRouter } from '@/router';
import { unisonReload } from '@/scripts/unison-reload'; import { unisonReload } from '@/scripts/unison-reload';
const XStatusBars = defineAsyncComponent(() => import('@/ui/_common_/statusbars.vue')); 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'); const noMainColumn = !deckStore.state.columns.some(x => x.type === 'main');
if (deckStore.state.navWindow || noMainColumn) { if (deckStore.state.navWindow || noMainColumn) {
os.pageWindow(path); os.pageWindow(path);
@ -161,8 +162,6 @@ const onContextmenu = (ev) => {
}], ev); }], ev);
}; };
provide('shouldSpacerMin', true);
document.documentElement.style.overflowY = 'hidden'; document.documentElement.style.overflowY = 'hidden';
document.documentElement.style.scrollBehavior = 'auto'; document.documentElement.style.scrollBehavior = 'auto';
window.addEventListener('wheel', (ev) => { window.addEventListener('wheel', (ev) => {

View file

@ -1,5 +1,5 @@
<template> <template>
<XColumn :func="{ handler: setAntenna, title: $ts.selectAntenna }" :column="column" :is-stacked="isStacked" @parent-focus="$event => emit('parent-focus', $event)"> <XColumn :menu="menu" :column="column" :is-stacked="isStacked" @parent-focus="$event => emit('parent-focus', $event)">
<template #header> <template #header>
<i class="fas fa-satellite"></i><span style="margin-left: 8px;">{{ column.name }}</span> <i class="fas fa-satellite"></i><span style="margin-left: 8px;">{{ column.name }}</span>
</template> </template>
@ -11,9 +11,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted } from 'vue'; import { onMounted } from 'vue';
import XColumn from './column.vue'; import XColumn from './column.vue';
import { updateColumn, Column } from './deck-store';
import XTimeline from '@/components/timeline.vue'; import XTimeline from '@/components/timeline.vue';
import * as os from '@/os'; import * as os from '@/os';
import { updateColumn, Column } from './deck-store';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';
const props = defineProps<{ const props = defineProps<{
@ -39,15 +39,22 @@ async function setAntenna() {
const { canceled, result: antenna } = await os.select({ const { canceled, result: antenna } = await os.select({
title: i18n.ts.selectAntenna, title: i18n.ts.selectAntenna,
items: antennas.map(x => ({ items: antennas.map(x => ({
value: x, text: x.name value: x, text: x.name,
})), })),
default: props.column.antennaId default: props.column.antennaId,
}); });
if (canceled) return; if (canceled) return;
updateColumn(props.column.id, { updateColumn(props.column.id, {
antennaId: antenna.id antennaId: antenna.id,
}); });
} }
const menu = [{
icon: 'fas fa-pencil-alt',
text: i18n.ts.selectAntenna,
action: setAntenna,
}];
/* /*
function focus() { function focus() {
timeline.focus(); timeline.focus();

View file

@ -31,31 +31,25 @@
</section> </section>
</template> </template>
<script lang="ts">
export type DeckFunc = {
title: string;
handler: (payload: MouseEvent) => void;
icon?: string;
};
</script>
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeUnmount, onMounted, provide, watch } from 'vue'; import { onBeforeUnmount, onMounted, provide, Ref, watch } from 'vue';
import { updateColumn, swapLeftColumn, swapRightColumn, swapUpColumn, swapDownColumn, stackLeftColumn, popRightColumn, removeColumn, swapColumn, Column , deckStore } from './deck-store'; import { updateColumn, swapLeftColumn, swapRightColumn, swapUpColumn, swapDownColumn, stackLeftColumn, popRightColumn, removeColumn, swapColumn, Column , deckStore } from './deck-store';
import * as os from '@/os'; import * as os from '@/os';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';
import { MenuItem } from '@/types/menu';
provide('shouldHeaderThin', true); provide('shouldHeaderThin', true);
provide('shouldOmitHeaderTitle', true); provide('shouldOmitHeaderTitle', true);
provide('shouldSpacerMin', true);
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
column: Column; column: Column;
isStacked?: boolean; isStacked?: boolean;
func?: DeckFunc | null;
naked?: boolean; naked?: boolean;
indicated?: boolean; indicated?: boolean;
menu?: MenuItem[];
}>(), { }>(), {
isStacked: false, isStacked: false,
func: null,
naked: false, naked: false,
indicated: false, indicated: false,
}); });
@ -110,9 +104,9 @@ function toggleActive() {
} }
function getMenu() { function getMenu() {
const items = [{ let items = [{
icon: 'fas fa-pencil-alt', icon: 'fas fa-cog',
text: i18n.ts.edit, text: i18n.ts._deck.configureColumn,
action: async () => { action: async () => {
const { canceled, result } = await os.form(props.column.name, { const { canceled, result } = await os.form(props.column.name, {
name: { name: {
@ -179,13 +173,9 @@ function getMenu() {
}, },
}]; }];
if (props.func) { if (props.menu) {
items.unshift(null); items.unshift(null);
items.unshift({ items = props.menu.concat(items);
icon: props.func.icon,
text: props.func.title,
action: props.func.handler,
});
} }
return items; return items;

View file

@ -1,5 +1,5 @@
<template> <template>
<XColumn :func="{ handler: setList, title: $ts.selectList }" :column="column" :is-stacked="isStacked" @parent-focus="$event => emit('parent-focus', $event)"> <XColumn :menu="menu" :column="column" :is-stacked="isStacked" @parent-focus="$event => emit('parent-focus', $event)">
<template #header> <template #header>
<i class="fas fa-list-ul"></i><span style="margin-left: 8px;">{{ column.name }}</span> <i class="fas fa-list-ul"></i><span style="margin-left: 8px;">{{ column.name }}</span>
</template> </template>
@ -11,9 +11,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import { } from 'vue'; import { } from 'vue';
import XColumn from './column.vue'; import XColumn from './column.vue';
import { updateColumn, Column } from './deck-store';
import XTimeline from '@/components/timeline.vue'; import XTimeline from '@/components/timeline.vue';
import * as os from '@/os'; import * as os from '@/os';
import { updateColumn, Column } from './deck-store';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';
const props = defineProps<{ const props = defineProps<{
@ -37,16 +37,22 @@ async function setList() {
const { canceled, result: list } = await os.select({ const { canceled, result: list } = await os.select({
title: i18n.ts.selectList, title: i18n.ts.selectList,
items: lists.map(x => ({ items: lists.map(x => ({
value: x, text: x.name value: x, text: x.name,
})), })),
default: props.column.listId default: props.column.listId,
}); });
if (canceled) return; if (canceled) return;
updateColumn(props.column.id, { updateColumn(props.column.id, {
listId: list.id listId: list.id,
}); });
} }
const menu = [{
icon: 'fas fa-pencil-alt',
text: i18n.ts.selectList,
action: setList,
}];
/* /*
function focus() { function focus() {
timeline.focus(); timeline.focus();

View file

@ -1,5 +1,5 @@
<template> <template>
<XColumn :column="column" :is-stacked="isStacked" :func="{ handler: func, title: $ts.notificationSetting }" @parent-focus="$event => emit('parent-focus', $event)"> <XColumn :column="column" :is-stacked="isStacked" :menu="menu" @parent-focus="$event => emit('parent-focus', $event)">
<template #header><i class="fas fa-bell" style="margin-right: 8px;"></i>{{ column.name }}</template> <template #header><i class="fas fa-bell" style="margin-right: 8px;"></i>{{ column.name }}</template>
<XNotifications :include-types="column.includingTypes"/> <XNotifications :include-types="column.includingTypes"/>
@ -9,10 +9,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import { defineAsyncComponent } from 'vue'; import { defineAsyncComponent } from 'vue';
import XColumn from './column.vue'; import XColumn from './column.vue';
import { updateColumn , Column } from './deck-store';
import XNotifications from '@/components/notifications.vue'; import XNotifications from '@/components/notifications.vue';
import * as os from '@/os'; import * as os from '@/os';
import { updateColumn } from './deck-store'; import { i18n } from '@/i18n';
import { Column } from './deck-store';
const props = defineProps<{ const props = defineProps<{
column: Column; column: Column;
@ -30,9 +30,15 @@ function func() {
done: async (res) => { done: async (res) => {
const { includingTypes } = res; const { includingTypes } = res;
updateColumn(props.column.id, { updateColumn(props.column.id, {
includingTypes: includingTypes includingTypes: includingTypes,
}); });
}, },
}, 'closed'); }, 'closed');
} }
const menu = [{
icon: 'fas fa-pencil-alt',
text: i18n.ts.notificationSetting,
action: func,
}];
</script> </script>

View file

@ -1,5 +1,5 @@
<template> <template>
<XColumn :func="{ handler: setType, title: $ts.timeline }" :column="column" :is-stacked="isStacked" :indicated="indicated" @change-active-state="onChangeActiveState" @parent-focus="$event => emit('parent-focus', $event)"> <XColumn :menu="menu" :column="column" :is-stacked="isStacked" :indicated="indicated" @change-active-state="onChangeActiveState" @parent-focus="$event => emit('parent-focus', $event)">
<template #header> <template #header>
<i v-if="column.tl === 'home'" class="fas fa-home"></i> <i v-if="column.tl === 'home'" class="fas fa-home"></i>
<i v-else-if="column.tl === 'local'" class="fas fa-comments"></i> <i v-else-if="column.tl === 'local'" class="fas fa-comments"></i>
@ -22,9 +22,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted } from 'vue'; import { onMounted } from 'vue';
import XColumn from './column.vue'; import XColumn from './column.vue';
import { removeColumn, updateColumn, Column } from './deck-store';
import XTimeline from '@/components/timeline.vue'; import XTimeline from '@/components/timeline.vue';
import * as os from '@/os'; import * as os from '@/os';
import { removeColumn, updateColumn, Column } from './deck-store';
import { $i } from '@/account'; import { $i } from '@/account';
import { instance } from '@/instance'; import { instance } from '@/instance';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';
@ -57,13 +57,13 @@ async function setType() {
const { canceled, result: src } = await os.select({ const { canceled, result: src } = await os.select({
title: i18n.ts.timeline, title: i18n.ts.timeline,
items: [{ items: [{
value: 'home' as const, text: i18n.ts._timelines.home value: 'home' as const, text: i18n.ts._timelines.home,
}, { }, {
value: 'local' as const, text: i18n.ts._timelines.local value: 'local' as const, text: i18n.ts._timelines.local,
}, { }, {
value: 'social' as const, text: i18n.ts._timelines.social value: 'social' as const, text: i18n.ts._timelines.social,
}, { }, {
value: 'global' as const, text: i18n.ts._timelines.global value: 'global' as const, text: i18n.ts._timelines.global,
}], }],
}); });
if (canceled) { if (canceled) {
@ -73,7 +73,7 @@ async function setType() {
return; return;
} }
updateColumn(props.column.id, { updateColumn(props.column.id, {
tl: src tl: src,
}); });
} }
@ -97,6 +97,12 @@ function onChangeActiveState(state) {
} }
} }
const menu = [{
icon: 'fas fa-pencil-alt',
text: i18n.ts.timeline,
action: setType,
}];
/* /*
export default defineComponent({ export default defineComponent({
watch: { watch: {

View file

@ -1,5 +1,5 @@
<template> <template>
<XColumn :func="{ handler: func, title: $ts.editWidgets }" :naked="true" :column="column" :is-stacked="isStacked" @parent-focus="$event => emit('parent-focus', $event)"> <XColumn :menu="menu" :naked="true" :column="column" :is-stacked="isStacked" @parent-focus="$event => emit('parent-focus', $event)">
<template #header><i class="fas fa-window-maximize" style="margin-right: 8px;"></i>{{ column.name }}</template> <template #header><i class="fas fa-window-maximize" style="margin-right: 8px;"></i>{{ column.name }}</template>
<div class="wtdtxvec"> <div class="wtdtxvec">
@ -46,6 +46,12 @@ function updateWidgets(widgets) {
function func() { function func() {
edit = !edit; edit = !edit;
} }
const menu = [{
icon: 'fas fa-pencil-alt',
text: i18n.ts.editWidgets,
action: func,
}];
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>