Merge remote-branch 'misskey/develop'
This commit is contained in:
commit
2b5ac6166d
|
@ -32,6 +32,8 @@
|
|||
- ローカリゼーションの更新
|
||||
|
||||
### Client
|
||||
- 任意のユーザーリストをタイムラインページにピン留めできるように
|
||||
- 設定->クライアント設定->全般 から設定可能です
|
||||
- ノート詳細ページを改修
|
||||
- 読み込み時のパフォーマンスが向上しました
|
||||
- リノート一覧、リアクション一覧がタブとして追加されました
|
||||
|
|
1
locales/index.d.ts
vendored
1
locales/index.d.ts
vendored
|
@ -1182,6 +1182,7 @@ export interface Locale {
|
|||
"renotes": string;
|
||||
"loadReplies": string;
|
||||
"loadConversation": string;
|
||||
"pinnedList": string;
|
||||
"additionalPermissionsForFlash": string;
|
||||
"thisFlashRequiresTheFollowingPermissions": string;
|
||||
"doYouWantToAllowThisPlayToAccessYourAccount": string;
|
||||
|
|
|
@ -1179,6 +1179,7 @@ replies: "返信"
|
|||
renotes: "リノート"
|
||||
loadReplies: "返信を見る"
|
||||
loadConversation: "会話を見る"
|
||||
pinnedList: "ピン留めされたリスト"
|
||||
additionalPermissionsForFlash: "Playへの追加許可"
|
||||
thisFlashRequiresTheFollowingPermissions: "このPlayは以下の権限を要求しています"
|
||||
doYouWantToAllowThisPlayToAccessYourAccount: "このPlayによるアカウントへのアクセスを許可しますか?"
|
||||
|
|
|
@ -30,6 +30,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkSwitch v-model="showFixedPostForm">{{ i18n.ts.showFixedPostForm }}</MkSwitch>
|
||||
<MkSwitch v-model="showFixedPostFormInChannel">{{ i18n.ts.showFixedPostFormInChannel }}</MkSwitch>
|
||||
<MkSwitch v-model="showTimelineReplies">{{ i18n.ts.flagShowTimelineReplies }}<template #caption>{{ i18n.ts.flagShowTimelineRepliesDescription }} {{ i18n.ts.reflectMayTakeTime }}</template></MkSwitch>
|
||||
<MkFolder>
|
||||
<template #label>{{ i18n.ts.pinnedList }}</template>
|
||||
<!-- 複数ピン止め管理できるようにしたいけどめんどいので一旦ひとつのみ -->
|
||||
<MkButton v-if="defaultStore.reactiveState.pinnedUserLists.value.length === 0" @click="setPinnedList()">{{ i18n.ts.add }}</MkButton>
|
||||
<MkButton v-else danger @click="removePinnedList()"><i class="ti ti-trash"></i> {{ i18n.ts.remove }}</MkButton>
|
||||
</MkFolder>
|
||||
</div>
|
||||
</FormSection>
|
||||
|
||||
|
@ -424,6 +430,23 @@ function removeEmojiIndex(lang: string) {
|
|||
os.promiseDialog(main());
|
||||
}
|
||||
|
||||
async function setPinnedList() {
|
||||
const lists = await os.api('users/lists/list');
|
||||
const { canceled, result: list } = await os.select({
|
||||
title: i18n.ts.selectList,
|
||||
items: lists.map(x => ({
|
||||
value: x, text: x.name,
|
||||
})),
|
||||
});
|
||||
if (canceled) return;
|
||||
|
||||
defaultStore.set('pinnedUserLists', [list]);
|
||||
}
|
||||
|
||||
function removePinnedList() {
|
||||
defaultStore.set('pinnedUserLists', []);
|
||||
}
|
||||
|
||||
let smashCount = 0;
|
||||
let smashTimer: number | null = null;
|
||||
function testNotification(): void {
|
||||
|
|
|
@ -35,7 +35,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkTimeline
|
||||
ref="tlComponent"
|
||||
:key="src"
|
||||
:src="src"
|
||||
:src="src.split(':')[0]"
|
||||
:list="src.split(':')[1]"
|
||||
:sound="true"
|
||||
@queue="queueUpdated"
|
||||
/>
|
||||
|
@ -92,20 +93,20 @@ let queue = $ref(0);
|
|||
let srcWhenNotSignin = $ref(isLocalTimelineAvailable ? 'local' : 'global');
|
||||
const src = $computed({ get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin), set: (x) => saveSrc(x) });
|
||||
|
||||
watch ($$(src), () => {
|
||||
watch($$(src), () => {
|
||||
queue = 0;
|
||||
queueUpdated(queue);
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
globalEvents.on('showEl', (showEl_receive) => {
|
||||
globalEvents.on('showEl', (showEl_receive) => {
|
||||
showEl = showEl_receive;
|
||||
});
|
||||
});
|
||||
|
||||
function queueUpdated(q: number): void {
|
||||
queue = q;
|
||||
globalEvents.emit('queueUpdated', q);
|
||||
globalEvents.emit('queueUpdated', q);
|
||||
}
|
||||
|
||||
function top(): void {
|
||||
|
@ -146,10 +147,15 @@ async function chooseChannel(ev: MouseEvent): Promise<void> {
|
|||
os.popupMenu(items, ev.currentTarget ?? ev.target);
|
||||
}
|
||||
|
||||
function saveSrc(newSrc: 'home' | 'local' | 'media' | 'social' | 'cat' | 'global'): void {
|
||||
function saveSrc(newSrc: 'home' | 'local' | 'media' | 'social' | 'cat' | 'global' | `list:${string}`): void {
|
||||
let userList = null;
|
||||
if (newSrc.startsWith('userList:')) {
|
||||
const id = newSrc.substring('userList:'.length);
|
||||
userList = defaultStore.reactiveState.pinnedUserLists.value.find(l => l.id === id);
|
||||
}
|
||||
defaultStore.set('tl', {
|
||||
...defaultStore.state.tl,
|
||||
src: newSrc,
|
||||
userList,
|
||||
});
|
||||
srcWhenNotSignin = newSrc;
|
||||
}
|
||||
|
@ -198,53 +204,57 @@ const headerActions = $computed(() => [{
|
|||
const friendlyEnableNotifications = computed(defaultStore.makeGetterSetter('friendlyEnableNotifications'));
|
||||
const friendlyEnableWidgets = computed(defaultStore.makeGetterSetter('friendlyEnableWidgets'));
|
||||
|
||||
const headerTabs = $computed(() => [
|
||||
...(defaultStore.state.enableHomeTimeline ? [{
|
||||
key: 'home',
|
||||
title: i18n.ts._timelines.home,
|
||||
icon: 'ti ti-home',
|
||||
iconOnly: true,
|
||||
}] : []), ...(isLocalTimelineAvailable && defaultStore.state.enableLocalTimeline ? [{
|
||||
key: 'local',
|
||||
title: i18n.ts._timelines.local,
|
||||
icon: 'ti ti-planet',
|
||||
iconOnly: true,
|
||||
}, ...(isMediaTimelineAvailable && defaultStore.state.enableMediaTimeline ? [{
|
||||
key: 'media',
|
||||
title: i18n.ts._timelines.media,
|
||||
icon: 'ti ti-photo',
|
||||
iconOnly: true,
|
||||
}] : []), ...(defaultStore.state.enableSocialTimeline ? [{
|
||||
key: 'social',
|
||||
title: i18n.ts._timelines.social,
|
||||
icon: 'ti ti-rocket',
|
||||
iconOnly: true,
|
||||
}] : []), ...(isCatTimelineAvailable && defaultStore.state.enableCatTimeline ? [{
|
||||
key: 'cat',
|
||||
title: i18n.ts._timelines.cat,
|
||||
icon: 'ti ti-cat',
|
||||
iconOnly: true,
|
||||
}] : [])] : []), ...(isGlobalTimelineAvailable && defaultStore.state.enableGlobalTimeline ? [{
|
||||
key: 'global',
|
||||
title: i18n.ts._timelines.global,
|
||||
icon: 'ti ti-world',
|
||||
iconOnly: true,
|
||||
}] : []), ...(defaultStore.state.enableListTimeline ? [{
|
||||
icon: 'ti ti-list',
|
||||
title: i18n.ts.lists,
|
||||
iconOnly: true,
|
||||
onClick: chooseList,
|
||||
}] : []), ...(defaultStore.state.enableAntennaTimeline ? [{
|
||||
icon: 'ti ti-antenna',
|
||||
title: i18n.ts.antennas,
|
||||
iconOnly: true,
|
||||
onClick: chooseAntenna,
|
||||
}] : []), ...(defaultStore.state.enableChannelTimeline ? [{
|
||||
icon: 'ti ti-device-tv',
|
||||
title: i18n.ts.channel,
|
||||
iconOnly: true,
|
||||
onClick: chooseChannel,
|
||||
}] : [])] as Tab[]);
|
||||
const headerTabs = $computed(() => [...(defaultStore.reactiveState.pinnedUserLists.value.map(l => ({
|
||||
key: 'list:' + l.id,
|
||||
title: l.name,
|
||||
icon: 'ti ti-star',
|
||||
iconOnly: true,
|
||||
}))), ...(defaultStore.state.enableHomeTimeline ? [{
|
||||
key: 'home',
|
||||
title: i18n.ts._timelines.home,
|
||||
icon: 'ti ti-home',
|
||||
iconOnly: true,
|
||||
}] : []), ...(isLocalTimelineAvailable && defaultStore.state.enableLocalTimeline ? [{
|
||||
key: 'local',
|
||||
title: i18n.ts._timelines.local,
|
||||
icon: 'ti ti-planet',
|
||||
iconOnly: true,
|
||||
}, ...(isMediaTimelineAvailable && defaultStore.state.enableMediaTimeline ? [{
|
||||
key: 'media',
|
||||
title: i18n.ts._timelines.media,
|
||||
icon: 'ti ti-photo',
|
||||
iconOnly: true,
|
||||
}] : []), ...(defaultStore.state.enableSocialTimeline ? [{
|
||||
key: 'social',
|
||||
title: i18n.ts._timelines.social,
|
||||
icon: 'ti ti-rocket',
|
||||
iconOnly: true,
|
||||
}] : []), ...(isCatTimelineAvailable && defaultStore.state.enableCatTimeline ? [{
|
||||
key: 'cat',
|
||||
title: i18n.ts._timelines.cat,
|
||||
icon: 'ti ti-cat',
|
||||
iconOnly: true,
|
||||
}] : [])] : []), ...(isGlobalTimelineAvailable && defaultStore.state.enableGlobalTimeline ? [{
|
||||
key: 'global',
|
||||
title: i18n.ts._timelines.global,
|
||||
icon: 'ti ti-world',
|
||||
iconOnly: true,
|
||||
}] : []), ...(defaultStore.state.enableListTimeline ? [{
|
||||
icon: 'ti ti-list',
|
||||
title: i18n.ts.lists,
|
||||
iconOnly: true,
|
||||
onClick: chooseList,
|
||||
}] : []), ...(defaultStore.state.enableAntennaTimeline ? [{
|
||||
icon: 'ti ti-antenna',
|
||||
title: i18n.ts.antennas,
|
||||
iconOnly: true,
|
||||
onClick: chooseAntenna,
|
||||
}] : []), ...(defaultStore.state.enableChannelTimeline ? [{
|
||||
icon: 'ti ti-device-tv',
|
||||
title: i18n.ts.channel,
|
||||
iconOnly: true,
|
||||
onClick: chooseChannel,
|
||||
}] : [])] as Tab[]);
|
||||
|
||||
const headerTabsWhenNotLogin = $computed(() => [
|
||||
...(isLocalTimelineAvailable ? [{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import { markRaw, ref } from 'vue';
|
||||
import Misskey from 'cherrypick-js';
|
||||
import * as Misskey from 'cherrypick-js';
|
||||
import { Storage } from './pizzax';
|
||||
|
||||
interface PostFormAction {
|
||||
|
@ -188,10 +188,14 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
tl: {
|
||||
where: 'deviceAccount',
|
||||
default: {
|
||||
src: 'home' as 'home' | 'local' | 'social' | 'global',
|
||||
arg: null,
|
||||
src: 'home' as 'home' | 'local' | 'social' | 'global' | `list:${string}`,
|
||||
userList: null as Misskey.entities.UserList | null,
|
||||
},
|
||||
},
|
||||
pinnedUserLists: {
|
||||
where: 'deviceAccount',
|
||||
default: [] as Misskey.entities.UserList[],
|
||||
},
|
||||
|
||||
overridedDeviceKind: {
|
||||
where: 'device',
|
||||
|
|
|
@ -64,6 +64,7 @@ module.exports = {
|
|||
'object-curly-spacing': ['error', 'always'],
|
||||
'space-infix-ops': ['error'],
|
||||
'space-before-blocks': ['error', 'always'],
|
||||
'@typescript-eslint/func-call-spacing': ['error', 'never'],
|
||||
'@typescript-eslint/no-explicit-any': ['warn'],
|
||||
'@typescript-eslint/no-unused-vars': ['warn'],
|
||||
'@typescript-eslint/no-unnecessary-condition': ['warn'],
|
||||
|
|
Loading…
Reference in a new issue