fix
This commit is contained in:
parent
654f31bc83
commit
8683037677
|
@ -16,37 +16,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import XModalWindow from '@/components/MkModalWindow.vue';
|
||||||
import XCheatSheet from '@/pages/mfm-cheat-sheet.vue';
|
import XCheatSheet from '@/pages/mfm-cheat-sheet.vue';
|
||||||
import { defaultStore } from '@/store';
|
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { $i } from '@/account';
|
|
||||||
import { instance } from '@/instance';
|
|
||||||
|
|
||||||
const isLocalTimelineAvailable =
|
|
||||||
!instance.disableLocalTimeline ||
|
|
||||||
($i != null && ($i.isModerator || $i.isAdmin));
|
|
||||||
const isRecommendedTimelineAvailable =
|
|
||||||
!instance.disableRecommendedTimeline ||
|
|
||||||
($i != null && ($i.isModerator || $i.isAdmin));
|
|
||||||
const isGlobalTimelineAvailable =
|
|
||||||
!instance.disableGlobalTimeline ||
|
|
||||||
($i != null && ($i.isModerator || $i.isAdmin));
|
|
||||||
|
|
||||||
let timelines = ['home'];
|
|
||||||
|
|
||||||
if (isLocalTimelineAvailable) {
|
|
||||||
timelines.push('local');
|
|
||||||
}
|
|
||||||
if (isRecommendedTimelineAvailable) {
|
|
||||||
timelines.push('recommended');
|
|
||||||
}
|
|
||||||
if (isLocalTimelineAvailable) {
|
|
||||||
timelines.push('social');
|
|
||||||
}
|
|
||||||
if (isGlobalTimelineAvailable) {
|
|
||||||
timelines.push('global');
|
|
||||||
}
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'done'): void;
|
(ev: 'done'): void;
|
||||||
|
@ -55,13 +27,7 @@ const emit = defineEmits<{
|
||||||
|
|
||||||
const dialog = $ref<InstanceType<typeof XModalWindow>>();
|
const dialog = $ref<InstanceType<typeof XModalWindow>>();
|
||||||
|
|
||||||
const tutorial = computed({
|
|
||||||
get() { return defaultStore.reactiveState.tutorial.value || 0; },
|
|
||||||
set(value) { defaultStore.set('tutorial', value); },
|
|
||||||
});
|
|
||||||
|
|
||||||
function close(res) {
|
function close(res) {
|
||||||
tutorial.value = -1;
|
|
||||||
dialog.close();
|
dialog.close();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue