enhance(frontend): デッキのカラムからリロードできる機能を追加 (misskey-dev#12274) (MisskeyIO#220)
Co-authored-by: samunohito <46447427+sam-osamu@users.noreply.github.com>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user