fix: headerActionにPC以外で空のボタンが出てしまうバグの修正 (#12202)
* headerActionにPC以外で空のボタンが出てしまうバグの修正 * fix eslint
This commit is contained in:
parent
7c692283ad
commit
e2f34e3db6
|
@ -140,36 +140,42 @@ function focus(): void {
|
||||||
tlComponent.focus();
|
tlComponent.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
const headerActions = $computed(() => [
|
const headerActions = $computed(() => {
|
||||||
...[deviceKind === 'desktop' ? {
|
const tmp = [
|
||||||
icon: 'ti ti-refresh',
|
{
|
||||||
text: i18n.ts.reload,
|
icon: 'ti ti-dots',
|
||||||
handler: (ev) => {
|
text: i18n.ts.options,
|
||||||
console.log('called');
|
handler: (ev) => {
|
||||||
tlComponent.reloadTimeline();
|
os.popupMenu([{
|
||||||
},
|
type: 'switch',
|
||||||
} : {}], {
|
text: i18n.ts.showRenotes,
|
||||||
icon: 'ti ti-dots',
|
icon: 'ti ti-repeat',
|
||||||
text: i18n.ts.options,
|
ref: $$(withRenotes),
|
||||||
handler: (ev) => {
|
}, src === 'local' || src === 'social' ? {
|
||||||
os.popupMenu([{
|
type: 'switch',
|
||||||
type: 'switch',
|
text: i18n.ts.showRepliesToOthersInTimeline,
|
||||||
text: i18n.ts.showRenotes,
|
ref: $$(withReplies),
|
||||||
icon: 'ti ti-repeat',
|
} : undefined, {
|
||||||
ref: $$(withRenotes),
|
type: 'switch',
|
||||||
}, src === 'local' || src === 'social' ? {
|
text: i18n.ts.fileAttachedOnly,
|
||||||
type: 'switch',
|
icon: 'ti ti-photo',
|
||||||
text: i18n.ts.showRepliesToOthersInTimeline,
|
ref: $$(onlyFiles),
|
||||||
ref: $$(withReplies),
|
}], ev.currentTarget ?? ev.target);
|
||||||
} : undefined, {
|
},
|
||||||
type: 'switch',
|
|
||||||
text: i18n.ts.fileAttachedOnly,
|
|
||||||
icon: 'ti ti-photo',
|
|
||||||
ref: $$(onlyFiles),
|
|
||||||
}], ev.currentTarget ?? ev.target);
|
|
||||||
},
|
},
|
||||||
|
];
|
||||||
|
if (deviceKind === 'desktop') {
|
||||||
|
tmp.unshift({
|
||||||
|
icon: 'ti ti-refresh',
|
||||||
|
text: i18n.ts.reload,
|
||||||
|
handler: (ev: Event) => {
|
||||||
|
console.log('called');
|
||||||
|
tlComponent.reloadTimeline();
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
]);
|
return tmp;
|
||||||
|
});
|
||||||
|
|
||||||
const headerTabs = $computed(() => [...(defaultStore.reactiveState.pinnedUserLists.value.map(l => ({
|
const headerTabs = $computed(() => [...(defaultStore.reactiveState.pinnedUserLists.value.map(l => ({
|
||||||
key: 'list:' + l.id,
|
key: 'list:' + l.id,
|
||||||
|
|
Loading…
Reference in New Issue