diff --git a/frontend/vue/components/Admin/AuditLog.vue b/frontend/vue/components/Admin/AuditLog.vue index 8027e5430..fd4c8bf9c 100644 --- a/frontend/vue/components/Admin/AuditLog.vue +++ b/frontend/vue/components/Admin/AuditLog.vue @@ -87,6 +87,7 @@ import Icon from "~/components/Common/Icon"; import DataTable from "~/components/Common/DataTable"; import DateRangeDropdown from "~/components/Common/DateRangeDropdown"; import {DateTime} from 'luxon'; +import useAzuraCast from "~/vendor/azuracast"; export default { name: 'AdminAuditLog', @@ -135,8 +136,10 @@ export default { this.$refs.datatable.relist(); }, formatTimestamp(unix_timestamp) { + const {timeConfig} = useAzuraCast(); + return DateTime.fromSeconds(unix_timestamp).toLocaleString( - {...DateTime.DATETIME_SHORT, ...App.time_config} + {...DateTime.DATETIME_SHORT, timeConfig} ); } } diff --git a/frontend/vue/components/Admin/Backups.vue b/frontend/vue/components/Admin/Backups.vue index c6de09576..37fac5e87 100644 --- a/frontend/vue/components/Admin/Backups.vue +++ b/frontend/vue/components/Admin/Backups.vue @@ -116,6 +116,7 @@ import formatFileSize from "~/functions/formatFileSize"; import AdminBackupsConfigureModal from "~/components/Admin/Backups/ConfigureModal"; import AdminBackupsRunBackupModal from "~/components/Admin/Backups/RunBackupModal"; import EnabledBadge from "~/components/Common/Badges/EnabledBadge.vue"; +import useAzuraCast from "~/vendor/azuracast"; export default { name: 'AdminBackups', @@ -186,8 +187,10 @@ export default { return DateTime.fromSeconds(timestamp).toRelative(); }, toLocaleTime(timestamp) { + const {timeConfig} = useAzuraCast(); + return DateTime.fromSeconds(timestamp).toLocaleString( - {...DateTime.DATETIME_SHORT, ...App.time_config} + {...DateTime.DATETIME_SHORT, timeConfig} ); }, formatFileSize(size) { diff --git a/frontend/vue/components/Common/CodemirrorTextarea.vue b/frontend/vue/components/Common/CodemirrorTextarea.vue index 2d2fad48b..5e1744577 100644 --- a/frontend/vue/components/Common/CodemirrorTextarea.vue +++ b/frontend/vue/components/Common/CodemirrorTextarea.vue @@ -8,6 +8,7 @@ import {useVModel} from "@vueuse/core"; import {computed} from "vue"; import {css} from "@codemirror/lang-css"; import {javascript} from "@codemirror/lang-javascript"; +import useAzuraCast from "~/vendor/azuracast"; const props = defineProps({ modelValue: String, @@ -27,9 +28,10 @@ const lang = computed(() => { return null; }); +const {theme} = useAzuraCast(); + const dark = computed(() => { - console.log(App.theme); - return App.theme === 'dark'; + return theme === 'dark'; }) diff --git a/frontend/vue/components/Common/FlowUpload.vue b/frontend/vue/components/Common/FlowUpload.vue index c8c8c2e3f..0a039efd7 100644 --- a/frontend/vue/components/Common/FlowUpload.vue +++ b/frontend/vue/components/Common/FlowUpload.vue @@ -73,6 +73,7 @@ import Icon from './Icon'; import _ from 'lodash'; import {computed, onMounted, onUnmounted, reactive, ref} from "vue"; import Flow from "@flowjs/flow.js"; +import useAzuraCast from "~/vendor/azuracast"; const props = defineProps({ targetUrl: String, @@ -131,6 +132,8 @@ const files = reactive({ const file_browse_target = ref(); // Template Ref const file_drop_target = ref(); // Template Ref +const {apiCsrf} = useAzuraCast(); + onMounted(() => { let defaultConfig = { target: () => { @@ -139,7 +142,7 @@ onMounted(() => { singleFile: !props.allowMultiple, headers: { 'Accept': 'application/json', - 'X-API-CSRF': App.api_csrf + 'X-API-CSRF': apiCsrf }, withCredentials: true, allowDuplicateUploads: true, diff --git a/frontend/vue/components/Common/ScheduleView.vue b/frontend/vue/components/Common/ScheduleView.vue index 4a469cef6..99a46f3ff 100644 --- a/frontend/vue/components/Common/ScheduleView.vue +++ b/frontend/vue/components/Common/ScheduleView.vue @@ -9,6 +9,7 @@ import allLocales from '@fullcalendar/core/locales-all'; import luxon2Plugin from '@fullcalendar/luxon2'; import timeGridPlugin from '@fullcalendar/timegrid'; import {shallowRef} from "vue"; +import useAzuraCast from "~/vendor/azuracast"; const props = defineProps({ scheduleUrl: String, @@ -34,8 +35,10 @@ const onEventClick = (arg) => { emit('click', arg.event); }; +const {localeShort, timeConfig} = useAzuraCast(); + const calendarOptions = shallowRef({ - locale: App.locale_short, + locale: localeShort, locales: allLocales, plugins: [luxon2Plugin, timeGridPlugin], initialView: 'timeGridWeek', @@ -52,7 +55,7 @@ const calendarOptions = shallowRef({ views: { timeGridWeek: { slotLabelFormat: { - ...App.time_config, + ...timeConfig, hour: 'numeric', minute: '2-digit', omitZeroMinute: true, diff --git a/frontend/vue/components/InlinePlayer.vue b/frontend/vue/components/InlinePlayer.vue index 1f5334d08..35ea85cc9 100644 --- a/frontend/vue/components/InlinePlayer.vue +++ b/frontend/vue/components/InlinePlayer.vue @@ -22,7 +22,7 @@