Skip to content

Commit

Permalink
Fix client errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bkis committed Dec 23, 2024
1 parent 30382ef commit cb48017
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Tekst-Web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { prioritizedMetadataKeys, type AnyResourceCreate } from '@/api';
import { prioritizedMetadataKeys, type AnyResourceRead } from '@/api';
import DynamicInputControls from '@/forms/DynamicInputControls.vue';
import { resourceSettingsFormRules } from '@/forms/formRules';
import TranslationFormItem from '@/forms/TranslationFormItem.vue';
Expand All @@ -8,7 +8,7 @@ import { TranslateIcon } from '@/icons';
import { NDynamicInput, NFlex, NFormItem, NIcon, NInput, NSelect } from 'naive-ui';
import { computed, h } from 'vue';
const model = defineModel<AnyResourceCreate>({ required: true });
const model = defineModel<AnyResourceRead>({ required: true });
const metadataKeysOptions = computed(() =>
prioritizedMetadataKeys.map((k) => ({
Expand Down
17 changes: 8 additions & 9 deletions Tekst-Web/src/views/ResourceCreateView.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { POST, resourceTypes, type AnyResourceCreate } from '@/api';
import { POST, resourceTypes, type AnyResourceRead } from '@/api';
import HelpButtonWidget from '@/components/HelpButtonWidget.vue';
import ButtonShelf from '@/components/generic/ButtonShelf.vue';
import IconHeading from '@/components/generic/IconHeading.vue';
Expand Down Expand Up @@ -32,13 +32,12 @@ const auth = useAuthStore();
const resources = useResourcesStore();
const { pfData } = usePlatformData();
const availableResourceTypes = resourceTypes
.filter(
(rt) =>
auth.user?.isSuperuser || (pfData.value && !pfData.value.state.denyResourceTypes.includes(rt))
);
const availableResourceTypes = resourceTypes.filter(
(rt) =>
auth.user?.isSuperuser || (pfData.value && !pfData.value.state.denyResourceTypes.includes(rt))
);
const getInitialModel = (): AnyResourceCreate =>
const getInitialModel = (): AnyResourceRead =>
({
title: [{ locale: '*', translation: '' }],
textId: state.text?.id || '',
Expand All @@ -48,11 +47,11 @@ const getInitialModel = (): AnyResourceCreate =>
public: false,
proposed: false,
citation: undefined,
}) as AnyResourceCreate;
}) as AnyResourceRead;
const formRef = ref<FormInst | null>(null);
const loadingSave = ref(false);
const model = ref<AnyResourceCreate>(getInitialModel());
const model = ref<AnyResourceRead>(getInitialModel());
const resourceTypeOptions = availableResourceTypes.map((rt) => ({
label: () => $t(`resources.types.${rt}.label`),
Expand Down
16 changes: 8 additions & 8 deletions Tekst-Web/src/views/admin/AdminSystemSettingsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,13 @@ function resetForm() {
<n-tab-pane :tab="$t('resources.heading')" name="resources">
<!-- DENY RESOURCE TYPES -->
<n-form-item :label="$t('models.platformSettings.denyResourceTypes')">
<n-select
v-model:value="formModel.denyResourceTypes"
multiple
clearable
:options="resourceTypeOptions"
placeholder=""
/>
<n-select
v-model:value="formModel.denyResourceTypes"
multiple
clearable
:options="resourceTypeOptions"
placeholder=""
/>
</n-form-item>

<!-- ADDITIONAL FONTS -->
Expand Down Expand Up @@ -333,7 +333,7 @@ function resetForm() {
<template #label>
<n-flex align="center" :wrap="false">
{{ $t('models.platformSettings.oskModes') }}
<help-button-widget help-key="adminSystemSettingsOskModes" />
<help-button-widget help-key="adminSystemSettingsOskModes" />
</n-flex>
</template>
<n-dynamic-input
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/help/adminSystemSettingsResourceFonts.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Custom fonts for resources
## Additional fonts for resource contents

You can provide yourself and other users with the option to use alternative fonts for specific resources. This can be useful when the content of a resource uses a specific character set or diacritics that cannot be displayed by the default font for content. Please refer to the "Setup / Customization" guide in the main documentation to learn how set up custom fonts.

0 comments on commit cb48017

Please sign in to comment.