refactor(web): use new open api client (#7097)

* refactor(web): use new open api client

* refactor: remove activity api

* refactor: trash, oauth, and partner apis

* refactor: job api

* refactor: face, library, system config

* refactor: user api

* refactor: album api
This commit is contained in:
Jason Rasmussen
2024-02-13 17:07:37 -05:00
committed by GitHub
parent 9b4a770b9d
commit 8fd94211c0
66 changed files with 593 additions and 850 deletions

View File

@@ -1,7 +1,12 @@
<script lang="ts">
import LoadingSpinner from '$lib/components/shared-components/loading-spinner.svelte';
import { AppRoute } from '$lib/constants';
import { user } from '$lib/stores/user.store';
import { api, type SystemConfigDto, type SystemConfigTemplateStorageOptionDto } from '@api';
import {
getStorageTemplateOptions,
type SystemConfigDto,
type SystemConfigTemplateStorageOptionDto,
} from '@immich/sdk';
import handlebar from 'handlebars';
import { isEqual } from 'lodash-es';
import * as luxon from 'luxon';
@@ -13,7 +18,6 @@
import SettingSwitch from '../setting-switch.svelte';
import SupportedDatetimePanel from './supported-datetime-panel.svelte';
import SupportedVariablesPanel from './supported-variables-panel.svelte';
import { AppRoute } from '$lib/constants';
export let savedConfig: SystemConfigDto;
export let defaultConfig: SystemConfigDto;
@@ -26,14 +30,11 @@
let selectedPreset = '';
const getTemplateOptions = async () => {
templateOptions = await api.systemConfigApi.getStorageTemplateOptions().then((res) => res.data);
templateOptions = await getStorageTemplateOptions();
selectedPreset = savedConfig.storageTemplate.template;
};
const getSupportDateTimeFormat = async () => {
const { data } = await api.systemConfigApi.getStorageTemplateOptions();
return data;
};
const getSupportDateTimeFormat = () => getStorageTemplateOptions();
$: parsedTemplate = () => {
try {