mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 11:27:31 -07:00
add reload
This commit is contained in:
parent
77cfb03b1c
commit
ff8d8ae73c
2 changed files with 17 additions and 7 deletions
|
@ -24,7 +24,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div class="yrolvcoq" :style="{ background: pageMetadata?.value?.bg }">
|
<div class="yrolvcoq" :style="{ background: pageMetadata?.value?.bg }">
|
||||||
<RouterView :router="router" />
|
<RouterView :key="reloadCount" :router="router" />
|
||||||
</div>
|
</div>
|
||||||
</XWindow>
|
</XWindow>
|
||||||
</template>
|
</template>
|
||||||
|
@ -78,15 +78,21 @@ const buttonsLeft = $computed(() => {
|
||||||
});
|
});
|
||||||
const buttonsRight = $computed(() => {
|
const buttonsRight = $computed(() => {
|
||||||
const buttons = [
|
const buttons = [
|
||||||
{
|
{
|
||||||
icon: "ph-arrows-out-simple ph-bold ph-lg",
|
icon: 'ph-arrow-clockwise ph-bold ph-lg',
|
||||||
title: i18n.ts.showInPage,
|
title: i18n.ts.reload,
|
||||||
onClick: expand,
|
onClick: reload,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
icon: "ph-arrows-out-simple ph-bold ph-lg",
|
||||||
|
title: i18n.ts.showInPage,
|
||||||
|
onClick: expand,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
return buttons;
|
return buttons;
|
||||||
});
|
});
|
||||||
|
let reloadCount = $ref(0);
|
||||||
|
|
||||||
router.addListener("push", (ctx) => {
|
router.addListener("push", (ctx) => {
|
||||||
history.push({ path: ctx.path, key: ctx.key });
|
history.push({ path: ctx.path, key: ctx.key });
|
||||||
|
@ -140,6 +146,10 @@ function back() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function reload() {
|
||||||
|
reloadCount++;
|
||||||
|
}
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
windowEl.close();
|
windowEl.close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
</FormSlot>
|
</FormSlot>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<MkButton inline @click="addItem"><i class="ph-plus ph-bold ph-lg"></i> {{ i18n.ts.addItem }}</MkButton>
|
<MkButton inline @click="addItem"><i class="ph-plus ph-bold ph-lg"></i> {{ i18n.ts.addItem }}</MkButton>
|
||||||
<MkButton inline danger @click="reset"><i class="ph-arrows-clockwise ph-bold ph-lg"></i> {{ i18n.ts.default }}</MkButton>
|
<MkButton inline danger @click="reset"><i class="ph-arrow-clockwise ph-bold ph-lg"></i> {{ i18n.ts.default }}</MkButton>
|
||||||
<MkButton inline primary class="save" @click="save"><i class="ph-floppy-disk ph-bold ph-lg"></i> {{ i18n.ts.save }}</MkButton>
|
<MkButton inline primary class="save" @click="save"><i class="ph-floppy-disk ph-bold ph-lg"></i> {{ i18n.ts.save }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue