fix client

This commit is contained in:
syuilo 2022-06-20 19:49:51 +09:00 committed by Chloe Kudryavtsev
parent cb87d03fe9
commit 19cb1991b0
2 changed files with 194 additions and 192 deletions

View file

@ -1,4 +1,5 @@
<template><MkStickyContainer>
<template>
<MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="600" :margin-min="16" :margin-max="32">
<div v-if="instance" class="_formRoot">
@ -103,7 +104,8 @@
<FormLink :to="`https://${host}/manifest.json`" external style="margin-bottom: 8px;">manifest.json</FormLink>
</FormSection>
</div>
</MkSpacer></MkStickyContainer>
</MkSpacer>
</MkStickyContainer>
</template>
<script lang="ts" setup>
@ -169,7 +171,13 @@ function refreshMetadata() {
fetch();
const headerActions = $computed(() => []);
const headerActions = $computed(() => [{
text: `https://${props.host}`,
icon: 'fas fa-external-link-alt',
handler: () => {
window.open(`https://${props.host}`, '_blank');
},
}]);
const headerTabs = $computed(() => []);
@ -177,13 +185,6 @@ definePageMetadata({
title: props.host,
icon: 'fas fa-info-circle',
bg: 'var(--bg)',
actions: [{
text: `https://${props.host}`,
icon: 'fas fa-external-link-alt',
handler: () => {
window.open(`https://${props.host}`, '_blank');
},
}],
});
</script>

View file

@ -1,4 +1,5 @@
<template><MkStickyContainer>
<template>
<MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="700">
<div class="jqqmcavi">
@ -76,7 +77,8 @@
<MkTextarea v-model="script" class="_code"/>
</div>
</div>
</MkSpacer></MkStickyContainer>
</MkSpacer>
</MkStickyContainer>
</template>
<script lang="ts" setup>
@ -408,7 +410,27 @@ init();
const headerActions = $computed(() => []);
const headerTabs = $computed(() => []);
const headerTabs = $computed(() => [{
active: tab === 'settings',
title: i18n.ts._pages.pageSetting,
icon: 'fas fa-cog',
onClick: () => { tab = 'settings'; },
}, {
active: tab === 'contents',
title: i18n.ts._pages.contents,
icon: 'fas fa-sticky-note',
onClick: () => { tab = 'contents'; },
}, {
active: tab === 'variables',
title: i18n.ts._pages.variables,
icon: 'fas fa-magic',
onClick: () => { tab = 'variables'; },
}, {
active: tab === 'script',
title: i18n.ts.script,
icon: 'fas fa-code',
onClick: () => { tab = 'script'; },
}]);
definePageMetadata(computed(() => {
let title = i18n.ts._pages.newPage;
@ -422,27 +444,6 @@ definePageMetadata(computed(() => {
title: title,
icon: 'fas fa-pencil-alt',
bg: 'var(--bg)',
tabs: [{
active: tab === 'settings',
title: i18n.ts._pages.pageSetting,
icon: 'fas fa-cog',
onClick: () => { tab = 'settings'; },
}, {
active: tab === 'contents',
title: i18n.ts._pages.contents,
icon: 'fas fa-sticky-note',
onClick: () => { tab = 'contents'; },
}, {
active: tab === 'variables',
title: i18n.ts._pages.variables,
icon: 'fas fa-magic',
onClick: () => { tab = 'variables'; },
}, {
active: tab === 'script',
title: i18n.ts.script,
icon: 'fas fa-code',
onClick: () => { tab = 'script'; },
}],
};
}));
</script>