mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-24 14:06:44 -06:00
fix: headerActionにPC以外で空のボタンが出てしまうバグの修正 (#12202)
* headerActionにPC以外で空のボタンが出てしまうバグの修正 * fix eslint
This commit is contained in:
parent
7c692283ad
commit
e2f34e3db6
1 changed files with 34 additions and 28 deletions
|
@ -140,36 +140,42 @@ function focus(): void {
|
|||
tlComponent.focus();
|
||||
}
|
||||
|
||||
const headerActions = $computed(() => [
|
||||
...[deviceKind === 'desktop' ? {
|
||||
icon: 'ti ti-refresh',
|
||||
text: i18n.ts.reload,
|
||||
handler: (ev) => {
|
||||
console.log('called');
|
||||
tlComponent.reloadTimeline();
|
||||
},
|
||||
} : {}], {
|
||||
icon: 'ti ti-dots',
|
||||
text: i18n.ts.options,
|
||||
handler: (ev) => {
|
||||
os.popupMenu([{
|
||||
type: 'switch',
|
||||
text: i18n.ts.showRenotes,
|
||||
icon: 'ti ti-repeat',
|
||||
ref: $$(withRenotes),
|
||||
}, src === 'local' || src === 'social' ? {
|
||||
type: 'switch',
|
||||
text: i18n.ts.showRepliesToOthersInTimeline,
|
||||
ref: $$(withReplies),
|
||||
} : undefined, {
|
||||
type: 'switch',
|
||||
text: i18n.ts.fileAttachedOnly,
|
||||
icon: 'ti ti-photo',
|
||||
ref: $$(onlyFiles),
|
||||
}], ev.currentTarget ?? ev.target);
|
||||
const headerActions = $computed(() => {
|
||||
const tmp = [
|
||||
{
|
||||
icon: 'ti ti-dots',
|
||||
text: i18n.ts.options,
|
||||
handler: (ev) => {
|
||||
os.popupMenu([{
|
||||
type: 'switch',
|
||||
text: i18n.ts.showRenotes,
|
||||
icon: 'ti ti-repeat',
|
||||
ref: $$(withRenotes),
|
||||
}, src === 'local' || src === 'social' ? {
|
||||
type: 'switch',
|
||||
text: i18n.ts.showRepliesToOthersInTimeline,
|
||||
ref: $$(withReplies),
|
||||
} : 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 => ({
|
||||
key: 'list:' + l.id,
|
||||
|
|
Loading…
Reference in a new issue