summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-02-22 17:43:10 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-02-22 17:43:10 +0900
commit3157d81e95724b260f2b86c2e3c8ce38201228d7 (patch)
tree06b9e31053f2113865db8160adbcbbf063e7e20f /packages/frontend/src/components
parentMFMのDOM ParserをJSDOMからhappy-domに変更する (#10016) (diff)
downloadmisskey-3157d81e95724b260f2b86c2e3c8ce38201228d7.tar.gz
misskey-3157d81e95724b260f2b86c2e3c8ce38201228d7.tar.bz2
misskey-3157d81e95724b260f2b86c2e3c8ce38201228d7.zip
enhance(client): make possible to reload page of window
Resolve #10007
Diffstat (limited to 'packages/frontend/src/components')
-rw-r--r--packages/frontend/src/components/MkPageWindow.vue11
1 files changed, 10 insertions, 1 deletions
diff --git a/packages/frontend/src/components/MkPageWindow.vue b/packages/frontend/src/components/MkPageWindow.vue
index 98115dd424..02ce58451d 100644
--- a/packages/frontend/src/components/MkPageWindow.vue
+++ b/packages/frontend/src/components/MkPageWindow.vue
@@ -18,7 +18,7 @@
</template>
<div :class="$style.root" :style="{ background: pageMetadata?.value?.bg }" style="container-type: inline-size;">
- <RouterView :router="router"/>
+ <RouterView :key="reloadCount" :router="router"/>
</div>
</MkWindow>
</template>
@@ -67,6 +67,10 @@ const buttonsLeft = $computed(() => {
});
const buttonsRight = $computed(() => {
const buttons = [{
+ icon: 'ti ti-reload',
+ title: i18n.ts.reload,
+ onClick: reload,
+ }, {
icon: 'ti ti-player-eject',
title: i18n.ts.showInPage,
onClick: expand,
@@ -74,6 +78,7 @@ const buttonsRight = $computed(() => {
return buttons;
});
+let reloadCount = $ref(0);
router.addListener('push', ctx => {
history.push({ path: ctx.path, key: ctx.key });
@@ -115,6 +120,10 @@ function back() {
router.replace(history[history.length - 1].path, history[history.length - 1].key);
}
+function reload() {
+ reloadCount++;
+}
+
function close() {
windowEl.close();
}