forked from akanyan/STARTLINER
fix: some more polish
This commit is contained in:
@ -88,7 +88,9 @@ const data: ComputedRef<Datum[]> = computed(() => {
|
||||
return res;
|
||||
});
|
||||
|
||||
const counter = ref(0);
|
||||
const context = ref({
|
||||
index: 0,
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
[standardOngeki, systemProcessing, lever, server, finaleOngeki] =
|
||||
@ -127,7 +129,8 @@ onMounted(async () => {
|
||||
});
|
||||
|
||||
const exitLabel = computed(() => {
|
||||
return props.firstTime === true && counter.value < data.value.length - 1
|
||||
return props.firstTime === true &&
|
||||
context.value.index < data.value.length - 1
|
||||
? 'Skip'
|
||||
: 'Close';
|
||||
});
|
||||
@ -144,13 +147,14 @@ const exitLabel = computed(() => {
|
||||
: `${game ? prettyPrint(game) : '<game>'} help`
|
||||
"
|
||||
:style="{ width: '760px', scale: client.scaleValue }"
|
||||
v-on:show="() => (context.index = 0)"
|
||||
>
|
||||
<Carousel
|
||||
:value="data"
|
||||
:num-visible="1"
|
||||
:num-scroll="1"
|
||||
:page="counter"
|
||||
v-on:update:page="(p) => (counter = p)"
|
||||
:context="context"
|
||||
v-on:update:page="(p) => (context.index = p)"
|
||||
>
|
||||
<template #item="slotProps">
|
||||
<div class="md-container markdown">
|
||||
@ -172,10 +176,10 @@ const exitLabel = computed(() => {
|
||||
</Carousel>
|
||||
<div style="width: 100%; text-align: center">
|
||||
<Button
|
||||
v-if="counter < data.length - 1"
|
||||
v-if="context.index < data.length - 1"
|
||||
class="m-auto mr-4"
|
||||
label="Next"
|
||||
@click="() => (counter += 1)"
|
||||
@click="() => (context.index += 1)"
|
||||
/>
|
||||
<Button
|
||||
class="m-auto"
|
||||
|
@ -114,6 +114,8 @@ const menuItems = computed(() => {
|
||||
icon: 'pi pi-exclamation-circle',
|
||||
command: async () => await startline(true, false),
|
||||
},
|
||||
];
|
||||
let baseTail = [
|
||||
{
|
||||
label: t('start.button.help'),
|
||||
icon: 'pi pi-question-circle',
|
||||
@ -137,7 +139,7 @@ const menuItems = computed(() => {
|
||||
];
|
||||
}
|
||||
if (prf.current.meta.game === 'chunithm') {
|
||||
return base;
|
||||
return [...base, ...baseTail];
|
||||
}
|
||||
if (prf.current.meta.game === 'ongeki') {
|
||||
return [
|
||||
@ -152,6 +154,7 @@ const menuItems = computed(() => {
|
||||
icon: 'pi pi-trash',
|
||||
command: async () => await invoke('clear_cache'),
|
||||
},
|
||||
...baseTail,
|
||||
];
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user