mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
pr feedback
This commit is contained in:
parent
7e433d6194
commit
e6f18531eb
@ -1,7 +1,7 @@
|
|||||||
import overpass from '$lib/assets/fonts/overpass/Overpass.ttf?url';
|
import overpass from '$lib/assets/fonts/overpass/Overpass.ttf?url';
|
||||||
import overpassMono from '$lib/assets/fonts/overpass/OverpassMono.ttf?url';
|
import overpassMono from '$lib/assets/fonts/overpass/OverpassMono.ttf?url';
|
||||||
import { transpileFile } from '$lib/utils';
|
import { transpileFile } from '$lib/utils/app-utils';
|
||||||
import fouc from '$lib/utils/fouc?raw';
|
import fouc from '$lib/utils/app?raw';
|
||||||
import theme from '$lib/utils/theme?raw';
|
import theme from '$lib/utils/theme?raw';
|
||||||
import type { Handle } from '@sveltejs/kit';
|
import type { Handle } from '@sveltejs/kit';
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ import { mdiCogRefreshOutline, mdiDatabaseRefreshOutline, mdiHeadSyncOutline, md
|
|||||||
import { sortBy } from 'lodash-es';
|
import { sortBy } from 'lodash-es';
|
||||||
import { init, register, t } from 'svelte-i18n';
|
import { init, register, t } from 'svelte-i18n';
|
||||||
import { derived, get } from 'svelte/store';
|
import { derived, get } from 'svelte/store';
|
||||||
import { ModuleKind, transpileModule } from 'typescript';
|
|
||||||
|
|
||||||
interface DownloadRequestOptions<T = unknown> {
|
interface DownloadRequestOptions<T = unknown> {
|
||||||
method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
||||||
@ -338,10 +337,3 @@ export const suggestDuplicateByFileSize = (assets: AssetResponseDto[]): AssetRes
|
|||||||
|
|
||||||
// eslint-disable-next-line unicorn/prefer-code-point
|
// eslint-disable-next-line unicorn/prefer-code-point
|
||||||
export const decodeBase64 = (data: string) => Uint8Array.from(atob(data), (c) => c.charCodeAt(0));
|
export const decodeBase64 = (data: string) => Uint8Array.from(atob(data), (c) => c.charCodeAt(0));
|
||||||
|
|
||||||
export const transpileFile = (content: string) => {
|
|
||||||
const result = transpileModule(content, {
|
|
||||||
compilerOptions: { module: ModuleKind.ES2020, removeComments: true },
|
|
||||||
});
|
|
||||||
return result.outputText;
|
|
||||||
};
|
|
||||||
|
8
web/src/lib/utils/app-utils.ts
Normal file
8
web/src/lib/utils/app-utils.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { ModuleKind, transpileModule } from 'typescript';
|
||||||
|
|
||||||
|
export const transpileFile = (content: string) => {
|
||||||
|
const result = transpileModule(content, {
|
||||||
|
compilerOptions: { module: ModuleKind.ES2020, removeComments: true },
|
||||||
|
});
|
||||||
|
return result.outputText;
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user