enhance(frontend): デッキのカラムからリロードできる機能を追加 (misskey-dev#12274) (MisskeyIO#220)

Co-authored-by: samunohito <46447427+sam-osamu@users.noreply.github.com>
This commit is contained in:
まっちゃとーにゅ
2023-11-07 22:51:08 +09:00
committed by GitHub
parent fe16916c72
commit 510c2b6808
10 changed files with 55 additions and 11 deletions

View File

@@ -57,6 +57,7 @@ const props = withDefaults(defineProps<{
isStacked?: boolean;
naked?: boolean;
menu?: MenuItem[];
refresher?: () => Promise<void>;
}>(), {
isStacked: false,
naked: false,
@@ -177,6 +178,18 @@ function getMenu() {
},
}];
if (props.refresher) {
items = [{
icon: 'ti ti-refresh',
text: i18n.ts.reload,
action: () => {
if (props.refresher) {
props.refresher();
}
},
}, ...items];
}
if (props.menu) {
items.unshift(null);
items = props.menu.concat(items);