This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<pn-page-card>
|
||||
<template #title>
|
||||
{{ $t(type + '__title') }}
|
||||
{{ $t(title) }}
|
||||
</template>
|
||||
<pn-scroll-list>
|
||||
<markdown-viewver
|
||||
class="q-pa-md"
|
||||
:locale
|
||||
:documentName = "getDocumentName()"
|
||||
:documentName
|
||||
/>
|
||||
</pn-scroll-list>
|
||||
</pn-page-card>
|
||||
@@ -18,22 +18,15 @@
|
||||
import { useSettingsStore } from 'stores/settings'
|
||||
import MarkdownViewver from 'components/MarkdownViewver.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
type: 'terms_of_use' | 'privacy' | 'consent'
|
||||
defineProps<{
|
||||
title: string
|
||||
documentName: string
|
||||
}>()
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
const DEFAULT_LOCALE = 'ru'
|
||||
const locale = ref('ru')
|
||||
|
||||
const getDocumentName = () =>{
|
||||
switch(props.type) {
|
||||
case 'terms_of_use': return 'Terms_of_use'
|
||||
case 'privacy': return 'Privacy-Policy'
|
||||
case 'consent': return 'Consent_to_Personal_Data_Processing'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const parseLocale = (locale: string) => locale.split(/[-_]/)[0] || DEFAULT_LOCALE
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user