2023-07-27 14:31:52 +09:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2020-02-09 22:25:32 +09:00
|
|
|
<template>
|
2023-01-01 09:45:27 +09:00
|
|
|
<div :class="$style.container">
|
|
|
|
<div :class="$style.title">
|
2023-05-08 17:29:19 +09:00
|
|
|
<div :class="$style.titleText"><i class="ti ti-info-circle"></i> {{ i18n.ts._timelineTutorial.title }}</div>
|
2022-12-18 01:59:59 +09:00
|
|
|
<div :class="$style.step">
|
|
|
|
<button class="_button" :class="$style.stepArrow" :disabled="tutorial === 0" @click="tutorial--">
|
2022-12-19 19:01:30 +09:00
|
|
|
<i class="ti ti-chevron-left"></i>
|
2022-12-18 01:59:59 +09:00
|
|
|
</button>
|
|
|
|
<span :class="$style.stepNumber">{{ tutorial + 1 }} / {{ tutorialsNumber }}</span>
|
|
|
|
<button class="_button" :class="$style.stepArrow" :disabled="tutorial === tutorialsNumber - 1" @click="tutorial++">
|
2022-12-19 19:01:30 +09:00
|
|
|
<i class="ti ti-chevron-right"></i>
|
2022-12-18 01:59:59 +09:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-05-08 17:29:19 +09:00
|
|
|
|
2023-01-01 09:45:27 +09:00
|
|
|
<div v-if="tutorial === 0" :class="$style.body">
|
2023-05-08 17:29:19 +09:00
|
|
|
<div>{{ i18n.t('_timelineTutorial.step1_1', { name: instance.name ?? host }) }}</div>
|
|
|
|
<div>{{ i18n.t('_timelineTutorial.step1_2', { name: instance.name ?? host }) }}</div>
|
2020-02-09 22:25:32 +09:00
|
|
|
</div>
|
2023-01-01 09:45:27 +09:00
|
|
|
<div v-else-if="tutorial === 1" :class="$style.body">
|
2023-05-08 17:29:19 +09:00
|
|
|
<div>{{ i18n.ts._timelineTutorial.step2_1 }}</div>
|
|
|
|
<div>{{ i18n.t('_timelineTutorial.step2_2', { name: instance.name ?? host }) }}</div>
|
2020-02-09 22:25:32 +09:00
|
|
|
</div>
|
2023-01-01 09:45:27 +09:00
|
|
|
<div v-else-if="tutorial === 2" :class="$style.body">
|
2023-05-08 17:29:19 +09:00
|
|
|
<div>{{ i18n.ts._timelineTutorial.step3_1 }}</div>
|
|
|
|
<div>{{ i18n.ts._timelineTutorial.step3_2 }}</div>
|
2020-02-09 22:25:32 +09:00
|
|
|
</div>
|
2023-01-01 09:45:27 +09:00
|
|
|
<div v-else-if="tutorial === 3" :class="$style.body">
|
2023-05-08 17:29:19 +09:00
|
|
|
<div>{{ i18n.ts._timelineTutorial.step4_1 }}</div>
|
|
|
|
<div>{{ i18n.ts._timelineTutorial.step4_2 }}</div>
|
2022-12-18 01:59:59 +09:00
|
|
|
</div>
|
2020-02-09 22:25:32 +09:00
|
|
|
|
2023-01-01 09:45:27 +09:00
|
|
|
<div :class="$style.footer">
|
2022-12-18 01:59:59 +09:00
|
|
|
<template v-if="tutorial === tutorialsNumber - 1">
|
2023-05-08 17:29:19 +09:00
|
|
|
<MkButton :class="$style.footerItem" primary rounded gradate @click="tutorial = -1">{{ i18n.ts.done }} <i class="ti ti-check"></i></MkButton>
|
2022-12-18 01:59:59 +09:00
|
|
|
</template>
|
|
|
|
<template v-else>
|
2023-05-08 17:29:19 +09:00
|
|
|
<MkButton :class="$style.footerItem" primary rounded gradate @click="tutorial++">{{ i18n.ts.next }} <i class="ti ti-arrow-right"></i></MkButton>
|
2022-12-18 01:59:59 +09:00
|
|
|
</template>
|
2020-02-09 22:25:32 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-01-13 02:36:51 +09:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { computed } from 'vue';
|
2022-09-06 18:21:49 +09:00
|
|
|
import MkButton from '@/components/MkButton.vue';
|
2022-01-13 02:36:51 +09:00
|
|
|
import { defaultStore } from '@/store';
|
2022-07-20 22:24:26 +09:00
|
|
|
import { i18n } from '@/i18n';
|
2023-05-08 17:29:19 +09:00
|
|
|
import { instance } from '@/instance';
|
|
|
|
import { host } from '@/config';
|
2020-02-09 22:25:32 +09:00
|
|
|
|
2023-05-08 17:29:19 +09:00
|
|
|
const tutorialsNumber = 4;
|
2022-12-18 01:59:59 +09:00
|
|
|
|
2022-01-13 02:36:51 +09:00
|
|
|
const tutorial = computed({
|
2023-05-08 17:29:19 +09:00
|
|
|
get() { return defaultStore.reactiveState.timelineTutorial.value || 0; },
|
|
|
|
set(value) { defaultStore.set('timelineTutorial', value); },
|
2020-02-09 22:25:32 +09:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2022-12-18 01:59:59 +09:00
|
|
|
<style lang="scss" module>
|
|
|
|
.small {
|
|
|
|
opacity: 0.7;
|
|
|
|
}
|
2020-02-09 22:25:32 +09:00
|
|
|
|
2023-01-01 09:45:27 +09:00
|
|
|
.container {
|
|
|
|
border: solid 2px var(--accent);
|
|
|
|
}
|
|
|
|
|
2022-12-18 01:59:59 +09:00
|
|
|
.title {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
2023-01-01 09:45:27 +09:00
|
|
|
padding: 22px 32px;
|
|
|
|
font-weight: bold;
|
2020-02-09 22:25:32 +09:00
|
|
|
|
2022-12-18 01:59:59 +09:00
|
|
|
&Text {
|
|
|
|
margin: 4px 0;
|
|
|
|
padding-right: 4px;
|
|
|
|
}
|
|
|
|
}
|
2020-02-09 22:25:32 +09:00
|
|
|
|
2022-12-18 01:59:59 +09:00
|
|
|
.step {
|
|
|
|
margin-left: auto;
|
2020-02-09 22:25:32 +09:00
|
|
|
|
2022-12-18 01:59:59 +09:00
|
|
|
&Arrow {
|
|
|
|
padding: 4px;
|
|
|
|
&:disabled {
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
&:first-child {
|
|
|
|
padding-right: 8px;
|
|
|
|
}
|
|
|
|
&:last-child {
|
|
|
|
padding-left: 8px;
|
|
|
|
}
|
|
|
|
}
|
2020-02-09 22:25:32 +09:00
|
|
|
|
2022-12-18 01:59:59 +09:00
|
|
|
&Number {
|
|
|
|
font-weight: normal;
|
|
|
|
margin: 4px;
|
|
|
|
}
|
|
|
|
}
|
2020-02-09 22:25:32 +09:00
|
|
|
|
2023-01-01 09:45:27 +09:00
|
|
|
.body {
|
|
|
|
padding: 0 32px;
|
|
|
|
}
|
|
|
|
|
2022-12-18 01:59:59 +09:00
|
|
|
.footer {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
flex-direction: row;
|
|
|
|
justify-content: right;
|
2023-01-01 09:45:27 +09:00
|
|
|
padding: 22px 32px;
|
2020-02-09 22:25:32 +09:00
|
|
|
|
2022-12-18 01:59:59 +09:00
|
|
|
&Item {
|
|
|
|
margin: 4px;
|
2020-02-09 22:25:32 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|