This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/views/list/settings/archive.vue

47 lines
946 B
Vue
Raw Normal View History

<template>
<modal
@close="$router.back()"
2022-11-18 16:54:14 +00:00
@submit="listStore.toggleArchiveList(list)"
>
<template #header>
<span>{{
list.isArchived
? $t('list.archive.unarchive')
: $t('list.archive.archive')
}}</span>
</template>
<template #text>
<p>{{
list.isArchived
? $t('list.archive.unarchiveText')
: $t('list.archive.archiveText')
}}</p>
</template>
</modal>
</template>
2022-02-15 12:07:34 +00:00
<script lang="ts">
2022-06-23 01:08:35 +00:00
export default {name: 'list-setting-archive'}
2022-05-21 15:27:06 +00:00
</script>
<script setup lang="ts">
import {useI18n} from 'vue-i18n'
2022-09-24 13:20:40 +00:00
import {useTitle} from '@/composables/useTitle'
2022-10-05 12:41:07 +00:00
import {useList, useListStore} from '@/stores/lists'
import type {IList} from '@/modelTypes/IList'
const {listId} = defineProps<{
listId: IList['id']
}>()
2022-05-21 15:27:06 +00:00
const {t} = useI18n({useScope: 'global'})
2022-10-05 12:41:07 +00:00
const listStore = useListStore()
2022-10-05 12:41:07 +00:00
const {list} = useList(listId)
2022-05-21 15:27:06 +00:00
useTitle(() => t('list.archive.title', {list: list.value.title}))
</script>