mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
[hack] Fix type mismatch TypeScript error
This commit is contained in:
parent
b278ae3d3d
commit
61d1054c8c
2 changed files with 9 additions and 3 deletions
|
@ -239,7 +239,7 @@ const UserEditPage: FunctionComponent = () => {
|
||||||
user.Policy.SyncPlayAccess = (page.querySelector('#selectSyncPlayAccess') as HTMLInputElement).value as SyncPlayUserAccessType;
|
user.Policy.SyncPlayAccess = (page.querySelector('#selectSyncPlayAccess') as HTMLInputElement).value as SyncPlayUserAccessType;
|
||||||
}
|
}
|
||||||
window.ApiClient.updateUser(user).then(function () {
|
window.ApiClient.updateUser(user).then(function () {
|
||||||
window.ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
window.ApiClient.updateUserPolicy(user.Id || '', user.Policy || {}).then(function () {
|
||||||
onSaveComplete();
|
onSaveComplete();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { AccessSchedule, UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client';
|
import { AccessSchedule, DynamicDayOfWeek, UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client';
|
||||||
import React, { FunctionComponent, useCallback, useEffect, useState, useRef } from 'react';
|
import React, { FunctionComponent, useCallback, useEffect, useState, useRef } from 'react';
|
||||||
import globalize from '../../scripts/globalize';
|
import globalize from '../../scripts/globalize';
|
||||||
import LibraryMenu from '../../scripts/libraryMenu';
|
import LibraryMenu from '../../scripts/libraryMenu';
|
||||||
|
@ -300,7 +300,13 @@ const UserParentalControl: FunctionComponent = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
(page.querySelector('.btnAddSchedule') as HTMLButtonElement).addEventListener('click', function () {
|
(page.querySelector('.btnAddSchedule') as HTMLButtonElement).addEventListener('click', function () {
|
||||||
showSchedulePopup({}, -1);
|
showSchedulePopup({
|
||||||
|
Id: 0,
|
||||||
|
UserId: '',
|
||||||
|
DayOfWeek: DynamicDayOfWeek.Sunday,
|
||||||
|
StartHour: 0,
|
||||||
|
EndHour: 0
|
||||||
|
}, -1);
|
||||||
});
|
});
|
||||||
|
|
||||||
(page.querySelector('.btnAddBlockedTag') as HTMLButtonElement).addEventListener('click', function () {
|
(page.querySelector('.btnAddBlockedTag') as HTMLButtonElement).addEventListener('click', function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue