1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2025-01-19 08:13:14 +09:00

Merge pull request #12202 from misskey-dev/misskey

This commit is contained in:
NoriDev 2023-10-31 17:41:11 +09:00
commit d6ae56f511
2 changed files with 51 additions and 45 deletions

View File

@ -12,16 +12,16 @@ SPDX-License-Identifier: AGPL-3.0-only
<div v-if="!thin_ && narrow && props.displayMyAvatar && $i && !isFriendly" class="_button" :class="$style.buttonsLeft" @click="openAccountMenu">
<MkAvatar v-vibrate="ColdDeviceStorage.get('vibrateSystem') ? 5 : ''" :class="$style.avatar" :user="$i"/>
</div>
<div v-else-if="!thin_ && narrow && !hideTitle && canBack" style="width: 42px;"/>
<div v-if="!thin_ && (actions && actions.length === 2) && isFriendly" :class="$style.buttonsLeft" style="min-width: initial;">
<div v-if="!narrow && canBack" style="width: 42px;"/>
<div style="width: 42px;"/>
<div v-else-if="!thin_ && narrow && !hideTitle && canBack" :class="$style.buttonsLeft"/>
<div v-if="!thin_ && (actions && actions.length > 1) && isFriendly" :class="$style.buttonsLeft" style="min-width: initial; margin-right: initial;">
<div v-if="!narrow && canBack" style="width: 50px; margin-right: 8px;"/>
<div style="width: 34px;"/>
</div>
<div v-if="!thin_ && !narrow && (actions && actions.length === 2) && !isFriendly && mainRouter.currentRoute.value.name === 'index'" :class="$style.buttonsLeft" style="margin-right: auto;">
<div v-if="!thin_ && !narrow && (actions && actions.length > 1) && !isFriendly && mainRouter.currentRoute.value.name === 'index'" :class="$style.buttonsLeft" style="margin-right: auto;">
<div style="width: 84px;"/>
</div>
<div v-if="!thin_ && narrow && (actions && actions.length === 2) && !isFriendly && mainRouter.currentRoute.value.name !== 'index'" :class="$style.buttonsLeft">
<div style="width: 42px;"/>
<div v-if="!thin_ && narrow && (actions && actions.length > 1) && !isFriendly && mainRouter.currentRoute.value.name !== 'index'">
<div style="width: 34px;"/>
</div>
<template v-if="metadata">

View File

@ -224,45 +224,51 @@ async function reloadAsk() {
} else globalEvents.emit('hasRequireRefresh', true);
}
const headerActions = $computed(() => [
...[deviceKind === 'desktop' ? {
icon: 'ti ti-refresh',
text: i18n.ts.reload,
handler: () => {
tlComponent.reloadTimeline();
const headerActions = $computed(() => {
const tmp = [
{
icon: 'ti ti-dots',
text: i18n.ts.options,
handler: (ev) => {
os.popupMenu([{
type: 'switch',
text: i18n.ts.friendlyEnableNotifications,
ref: $$(friendlyEnableNotifications),
}, {
type: 'switch',
text: i18n.ts.friendlyEnableWidgets,
ref: $$(friendlyEnableWidgets),
}, {
type: 'switch',
text: i18n.ts.showRenotes,
ref: $$(withRenotes),
}, src === 'local' || src === 'social' ? {
type: 'switch',
text: i18n.ts.showRepliesToOthersInTimeline,
ref: $$(withReplies),
} : undefined, {
type: 'switch',
text: i18n.ts.fileAttachedOnly,
ref: $$(onlyFiles),
}, {
type: 'switch',
text: i18n.ts.showCatOnly,
ref: $$(onlyCats),
}], ev.currentTarget ?? ev.target);
},
},
} : {}], {
icon: 'ti ti-dots',
text: i18n.ts.options,
handler: (ev) => {
os.popupMenu([{
type: 'switch',
text: i18n.ts.friendlyEnableNotifications,
ref: $$(friendlyEnableNotifications),
}, {
type: 'switch',
text: i18n.ts.friendlyEnableWidgets,
ref: $$(friendlyEnableWidgets),
}, {
type: 'switch',
text: i18n.ts.showRenotes,
ref: $$(withRenotes),
}, src === 'local' || src === 'social' ? {
type: 'switch',
text: i18n.ts.showRepliesToOthersInTimeline,
ref: $$(withReplies),
} : undefined, {
type: 'switch',
text: i18n.ts.fileAttachedOnly,
ref: $$(onlyFiles),
}, {
type: 'switch',
text: i18n.ts.showCatOnly,
ref: $$(onlyCats),
}], ev.currentTarget ?? ev.target);
},
},
]);
];
if (deviceKind === 'desktop') {
tmp.unshift({
icon: 'ti ti-refresh',
text: i18n.ts.reload,
handler: (ev: Event) => {
tlComponent.reloadTimeline();
},
});
}
return tmp;
});
const headerTabs = $computed(() => [...(defaultStore.reactiveState.pinnedUserLists.value.map(l => ({
key: 'list:' + l.id,