Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from AzuraCast:main #66

Merged
merged 7 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/components/Account/ApiKeyModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,13 @@ import {useAxios} from "~/vendor/axios";
import Modal from "~/components/Common/Modal.vue";
import {ModalTemplateRef, useHasModal} from "~/functions/useHasModal.ts";
import {ComponentExposed} from "vue-component-type-helpers";
import {HasRelistEmit} from "~/functions/useBaseEditModal.ts";

const props = defineProps<{
createUrl: string,
}>();

const emit = defineEmits(['relist']);
const emit = defineEmits<HasRelistEmit>();

const error = ref(null);
const newKey = ref(null);
Expand Down
4 changes: 2 additions & 2 deletions frontend/components/Account/ChangePasswordModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ import {useVuelidateOnForm} from "~/functions/useVuelidateOnForm";
import {ref} from "vue";
import {useAxios} from "~/vendor/axios";
import {useTranslate} from "~/vendor/gettext";
import {ModalFormTemplateRef} from "~/functions/useBaseEditModal.ts";
import {HasRelistEmit, ModalFormTemplateRef} from "~/functions/useBaseEditModal.ts";
import {getApiUrl} from "~/router.ts";

const emit = defineEmits(['relist']);
const emit = defineEmits<HasRelistEmit>();

const changePasswordUrl = getApiUrl('/frontend/account/password');

Expand Down
3 changes: 2 additions & 1 deletion frontend/components/Account/PasskeyModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ import {ModalTemplateRef, useHasModal} from "~/functions/useHasModal.ts";
import FormMarkup from "~/components/Form/FormMarkup.vue";
import {getApiUrl} from "~/router.ts";
import useWebAuthn from "~/functions/useWebAuthn.ts";
import {HasRelistEmit} from "~/functions/useBaseEditModal.ts";

const emit = defineEmits(['relist']);
const emit = defineEmits<HasRelistEmit>();

const registerWebAuthnUrl = getApiUrl('/frontend/account/webauthn/register');

Expand Down
4 changes: 2 additions & 2 deletions frontend/components/Account/TwoFactorModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ import {ref} from "vue";
import {useResettableRef} from "~/functions/useResettableRef";
import {useNotify} from "~/functions/useNotify";
import {useAxios} from "~/vendor/axios";
import {ModalFormTemplateRef} from "~/functions/useBaseEditModal.ts";
import {HasRelistEmit, ModalFormTemplateRef} from "~/functions/useBaseEditModal.ts";
import QrCode from "~/components/Account/QrCode.vue";
import {useHasModal} from "~/functions/useHasModal.ts";

const props = defineProps<{
twoFactorUrl: string,
}>();

const emit = defineEmits(['relist']);
const emit = defineEmits<HasRelistEmit>();

const loading = ref(true);
const error = ref(null);
Expand Down
12 changes: 6 additions & 6 deletions frontend/components/Admin/Backups/ConfigureModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
:field="v$.backup_time_code"
:label="$gettext('Scheduled Backup Time')"
>
<template #default="slotProps">
<template #default="{id, model, fieldClass}">
<time-code
:id="slotProps.id"
v-model="slotProps.field.$model"
:class="slotProps.class"
:id="id"
v-model="model.$model"
:class="fieldClass"
/>
</template>
</form-group-field>
Expand Down Expand Up @@ -91,15 +91,15 @@ import {useNotify} from "~/functions/useNotify";
import {useVuelidateOnForm} from "~/functions/useVuelidateOnForm";
import FormGroupMultiCheck from "~/components/Form/FormGroupMultiCheck.vue";
import FormGroupSelect from "~/components/Form/FormGroupSelect.vue";
import {ModalFormTemplateRef} from "~/functions/useBaseEditModal.ts";
import {HasRelistEmit, ModalFormTemplateRef} from "~/functions/useBaseEditModal.ts";
import {useHasModal} from "~/functions/useHasModal.ts";

const props = defineProps<{
settingsUrl: string,
storageLocations: Record<number, string>,
}>();

const emit = defineEmits(['relist']);
const emit = defineEmits<HasRelistEmit>();

const loading = ref(true);

Expand Down
3 changes: 2 additions & 1 deletion frontend/components/Admin/Backups/RunBackupModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,14 @@ import {useVuelidateOnForm} from "~/functions/useVuelidateOnForm";
import Modal from "~/components/Common/Modal.vue";
import FormGroupSelect from "~/components/Form/FormGroupSelect.vue";
import {ModalTemplateRef, useHasModal} from "~/functions/useHasModal.ts";
import {HasRelistEmit} from "~/functions/useBaseEditModal.ts";

const props = defineProps<{
runBackupUrl: string,
storageLocations: Record<number, string>,
}>();

const emit = defineEmits(['relist']);
const emit = defineEmits<HasRelistEmit>();

const logUrl = ref(null);
const error = ref(null);
Expand Down
18 changes: 9 additions & 9 deletions frontend/components/Admin/Branding/BrandingForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@
:label="$gettext('Custom CSS for Public Pages')"
:description="$gettext('This CSS will be applied to the station public pages and login page.')"
>
<template #default="slotProps">
<template #default="{id, model}">
<codemirror-textarea
:id="slotProps.id"
v-model="slotProps.field.$model"
:id="id"
v-model="model.$model"
mode="css"
/>
</template>
Expand All @@ -90,10 +90,10 @@
:label="$gettext('Custom JS for Public Pages')"
:description="$gettext('This javascript code will be applied to the station public pages and login page.')"
>
<template #default="slotProps">
<template #default="{id, model}">
<codemirror-textarea
:id="slotProps.id"
v-model="slotProps.field.$model"
:id="id"
v-model="model.$model"
mode="javascript"
/>
</template>
Expand All @@ -106,10 +106,10 @@
:label="$gettext('Custom CSS for Internal Pages')"
:description="$gettext('This CSS will be applied to the main management pages, like this one.')"
>
<template #default="slotProps">
<template #default="{id, model}">
<codemirror-textarea
:id="slotProps.id"
v-model="slotProps.field.$model"
:id="id"
v-model="model.$model"
mode="css"
/>
</template>
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/Admin/CustomFields.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import {getApiUrl} from "~/router";
import AddButton from "~/components/Common/AddButton.vue";

const props = defineProps<{
autoAssignTypes: object, // TODO
autoAssignTypes: Record<string, string>,
}>();

const listUrl = getApiUrl('/admin/custom_fields');
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/Admin/CustomFields/EditModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
import {useTranslate} from "~/vendor/gettext";

interface CustomFieldsEditModalProps extends BaseEditModalProps {
autoAssignTypes: object
autoAssignTypes: Record<string, string>
}

const props = defineProps<CustomFieldsEditModalProps>();
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/Admin/CustomFields/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {VuelidateRef} from "~/functions/useVuelidateOnForm.ts";

const props = defineProps<{
form: VuelidateRef,
autoAssignTypes: object, // TODO
autoAssignTypes: Record<string, string>
}>();

const {$gettext} = useTranslate();
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/Admin/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div class="row row-of-cards">
<div
v-for="panel in menuItems"
v-for="panel in menuItems.categories"
:key="panel.key"
class="col-sm-12 col-lg-4"
>
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/Admin/Index/NetworkStatsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const getNetworkInterfaceTableItems = (interfaceData) => {
const key = data[0];
let value: any = data[1];

if (isObject(value)) {
if (isObject(value) && "readable" in value) {
value = value.readable + '/s';
}

Expand Down
6 changes: 3 additions & 3 deletions frontend/components/Admin/Permissions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ import {getApiUrl} from "~/router";
import AddButton from "~/components/Common/AddButton.vue";

const props = defineProps<{
stations: Array<any>, // TODO
globalPermissions: Array<any>, // TODO
stationPermissions: Array<any>, // TODO
stations: Record<number, string>,
globalPermissions: Record<string, string>,
stationPermissions: Record<string, string>,
}>();

const listUrl = getApiUrl('/admin/roles');
Expand Down
6 changes: 3 additions & 3 deletions frontend/components/Admin/Permissions/EditModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ import {forEach, map} from 'lodash';
import Tabs from "~/components/Common/Tabs.vue";

interface PermissionsEditModalProps extends BaseEditModalProps {
stations: object,
globalPermissions: object,
stationPermissions: object
stations: Record<number, string>,
globalPermissions: Record<string, string>,
stationPermissions: Record<string, string>,
}

const props = defineProps<PermissionsEditModalProps>();
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/Admin/Permissions/Form/GlobalForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {VuelidateObject} from "~/functions/useVuelidateOnForm.ts";

const props = defineProps<{
form: VuelidateObject,
globalPermissions: object, // TODO
globalPermissions: Record<string, string>,
}>();

const globalPermissionOptions = computed(() => {
Expand Down
4 changes: 2 additions & 2 deletions frontend/components/Admin/Permissions/Form/StationForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ import {VuelidateObject} from "~/functions/useVuelidateOnForm.ts";

const props = defineProps<{
form: VuelidateObject,
stations: object, // TODO
stationPermissions: object, // TODO
stations: Record<number, string>,
stationPermissions: Record<string, string>,
}>();

const remainingStations = computed(() => {
Expand Down
9 changes: 6 additions & 3 deletions frontend/components/Admin/Permissions/Form/StationRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,14 @@ import {GenericForm} from "~/entities/Forms.ts";

const props = defineProps<{
row: GenericForm,
stations: object, // TODO,
stationPermissions: object, // TODO
stations: Record<number, string>,
stationPermissions: Record<string, string>,
}>();

const emit = defineEmits(['remove', 'update:row']);
const emit = defineEmits<{
(e: 'remove'): void,
(e: 'update:row', row: GenericForm): void
}>();

const form = useVModel(props, 'row', emit);

Expand Down
3 changes: 3 additions & 0 deletions frontend/components/Admin/Rsas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ import {useAxios} from "~/vendor/axios";
import Loading from "~/components/Common/Loading.vue";
import CardPage from "~/components/Common/CardPage.vue";
import {getApiUrl} from "~/router";
import {useDialog} from "~/functions/useDialog.ts";

const apiUrl = getApiUrl('/admin/rsas');
const licenseUrl = getApiUrl('/admin/rsas/license');
Expand Down Expand Up @@ -166,6 +167,8 @@ const relist = () => {
});
};

const {confirmDelete} = useDialog();

const doRemoveLicense = () => {
confirmDelete({
title: $gettext('Remove RSAS license key?'),
Expand Down
4 changes: 3 additions & 1 deletion frontend/components/Admin/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ const props = withDefaults(
}
);

const emit = defineEmits(['saved']);
const emit = defineEmits<{
(e: 'saved'): void
}>();

const {form, resetForm, v$, ifValid} = useVuelidateOnForm();

Expand Down
4 changes: 2 additions & 2 deletions frontend/components/Admin/Stations/CloneModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import {useTranslate} from "~/vendor/gettext";
import {useNotify} from "~/functions/useNotify";
import {useAxios} from "~/vendor/axios";
import {useVuelidateOnForm} from "~/functions/useVuelidateOnForm";
import {ModalFormTemplateRef} from "~/functions/useBaseEditModal.ts";
import {HasRelistEmit, ModalFormTemplateRef} from "~/functions/useBaseEditModal.ts";
import {useHasModal} from "~/functions/useHasModal.ts";

const emit = defineEmits(['relist']);
const emit = defineEmits<HasRelistEmit>();

const loading = ref(true);
const cloneUrl = ref(null);
Expand Down
5 changes: 3 additions & 2 deletions frontend/components/Admin/Stations/EditModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
:create-url="createUrl"
:edit-url="editUrl"
:is-edit-mode="isEditMode"
@error="close"
@error="hide"
@submitted="onSubmit"
@valid-update="onValidUpdate"
>
Expand Down Expand Up @@ -51,6 +51,7 @@ import {computed, ref} from "vue";
import {useTranslate} from "~/vendor/gettext";
import Modal from "~/components/Common/Modal.vue";
import {ModalTemplateRef, useHasModal} from "~/functions/useHasModal.ts";
import {HasRelistEmit} from "~/functions/useBaseEditModal.ts";

defineOptions({
inheritAttrs: false
Expand All @@ -62,7 +63,7 @@ interface StationEditModalProps extends StationFormParentProps {

const props = defineProps<StationEditModalProps>();

const emit = defineEmits(['relist']);
const emit = defineEmits<HasRelistEmit>();

const editUrl = ref(null);
const disableSaveButton = ref(true);
Expand Down
3 changes: 2 additions & 1 deletion frontend/components/Admin/Stations/Form/BackendForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,10 @@ import {FormTabEmits, FormTabProps, useVuelidateOnFormTab} from "~/functions/use
import {decimal, numeric, required} from "@vuelidate/validators";
import {useAzuraCast} from "~/vendor/azuracast";
import Tab from "~/components/Common/Tab.vue";
import {Station} from "~/entities/ApiInterfaces.ts";

interface StationBackendFormProps extends FormTabProps {
station: object, // TODO
station: Station,
isStereoToolInstalled: boolean
}

Expand Down
3 changes: 2 additions & 1 deletion frontend/components/Admin/Stations/Form/HlsForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ import {FormTabEmits, FormTabProps, useVuelidateOnFormTab} from "~/functions/use
import {numeric} from "@vuelidate/validators";
import {useAzuraCast} from "~/vendor/azuracast";
import Tab from "~/components/Common/Tab.vue";
import {Station} from "~/entities/ApiInterfaces.ts";

interface StationHlsFormProps extends FormTabProps {
station: object, // TODO
station: Station,
}

const props = defineProps<StationHlsFormProps>();
Expand Down
3 changes: 2 additions & 1 deletion frontend/components/Admin/Stations/Form/RequestsForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ import {computed} from "vue";
import {FormTabEmits, FormTabProps, useVuelidateOnFormTab} from "~/functions/useVuelidateOnFormTab";
import {numeric} from "@vuelidate/validators";
import Tab from "~/components/Common/Tab.vue";
import {Station} from "~/entities/ApiInterfaces.ts";

interface StationRequestsFormProps extends FormTabProps {
station: object, // TODO
station: Station,
}

const props = defineProps<StationRequestsFormProps>();
Expand Down
3 changes: 2 additions & 1 deletion frontend/components/Admin/Stations/Form/StreamersForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,10 @@ import {numeric} from "@vuelidate/validators";
import {useAzuraCast} from "~/vendor/azuracast";
import Tab from "~/components/Common/Tab.vue";
import BitrateOptions from "~/components/Common/BitrateOptions.vue";
import {Station} from "~/entities/ApiInterfaces.ts";

interface StationStreamersFormProps extends FormTabProps {
station: object, // TODO
station: Station,
}

const props = defineProps<StationStreamersFormProps>();
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/Admin/StereoTool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const {$gettext} = useTranslate();

const langInstalledVersion = computed(() => {
return $gettext(
'Stereo Tool version %{ version } is currently installed.',
'Stereo Tool version %{version} is currently installed.',
{
version: version.value
}
Expand Down
Loading
Loading