mirror of
https://github.com/immich-app/immich.git
synced 2026-07-07 04:57:05 -07:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c1c1fa0b0a |
@@ -163,26 +163,19 @@
|
||||
"description": "Filter by distance to a coordinate",
|
||||
"properties": {
|
||||
"latitude": {
|
||||
"type": "number",
|
||||
"type": "string",
|
||||
"title": "Latitude",
|
||||
"description": "GPS latitude of a coordinate which the asset must be close to",
|
||||
"minimum": -90,
|
||||
"maximum": 90,
|
||||
"precision": 0.000001
|
||||
"description": "GPS latitude of a coordinate which the asset must be close to"
|
||||
},
|
||||
"longitude": {
|
||||
"type": "number",
|
||||
"type": "string",
|
||||
"title": "Longitude",
|
||||
"description": "GPS longitude of a coordinate which the asset must be close to",
|
||||
"minimum": -180,
|
||||
"maximum": 180,
|
||||
"precision": 0.000001
|
||||
"description": "GPS longitude of a coordinate which the asset must be close to"
|
||||
},
|
||||
"radius": {
|
||||
"type": "number",
|
||||
"title": "Maximum distance",
|
||||
"description": "How close in kilometres the asset must be to the given point",
|
||||
"minimum": 0
|
||||
"description": "How close in kilometres the asset must be to the given point"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,10 +96,10 @@ const methods = wrapper<Manifest>({
|
||||
return { workflow: { continue: false } };
|
||||
}
|
||||
|
||||
const configLat = config.coordinate?.latitude;
|
||||
const configLon = config.coordinate?.longitude;
|
||||
const configLat = Number.parseFloat(config.coordinate?.latitude ?? '');
|
||||
const configLon = Number.parseFloat(config.coordinate?.longitude ?? '');
|
||||
|
||||
if (configLat === undefined || configLon === undefined) {
|
||||
if (Number.isNaN(configLat) || Number.isNaN(configLat)) {
|
||||
return { workflow: { continue: true } };
|
||||
}
|
||||
|
||||
|
||||
@@ -12,9 +12,6 @@ const JsonSchemaPropertySchema = z
|
||||
description: z.string().describe('Description'),
|
||||
default: z.any().optional().describe('Default value'),
|
||||
enum: z.array(z.string()).optional().describe('Valid choices for enum types'),
|
||||
minimum: z.number().optional().describe('Minimum value for number types'),
|
||||
maximum: z.number().optional().describe('Maximum value for number types'),
|
||||
precision: z.number().default(1).optional().describe('Smallest interval (granularity) for number types'),
|
||||
array: z.boolean().optional().describe('Type is an array type'),
|
||||
required: z.array(z.string()).optional().describe('A list of required properties'),
|
||||
uiHint: z
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
</Field>
|
||||
{:else if schema.type === 'number'}
|
||||
<Field {label} {description}>
|
||||
<NumberInput bind:value={getNumber, setValue} step={schema.precision} min={schema.minimum} max={schema.maximum} />
|
||||
<NumberInput bind:value={getNumber, setValue} />
|
||||
</Field>
|
||||
{:else if schema.type === 'string'}
|
||||
<Field {label} {description}>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { lang } from '$lib/stores/preferences.store';
|
||||
import { langs } from '$lib/utils/i18n';
|
||||
|
||||
class LanguageManager {
|
||||
constructor() {
|
||||
init() {
|
||||
eventManager.on({
|
||||
AppInit: () => lang.subscribe((lang) => this.setLanguage(lang)),
|
||||
});
|
||||
|
||||
@@ -93,9 +93,6 @@ export type JSONSchemaProperty = {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
default?: any;
|
||||
enum?: string[];
|
||||
minimum?: number;
|
||||
maximum?: number;
|
||||
precision?: number;
|
||||
array?: boolean;
|
||||
properties?: Record<string, JSONSchemaProperty>;
|
||||
required?: string[];
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { commandPaletteManager } from '@immich/ui';
|
||||
import { goto } from '$app/navigation';
|
||||
import { languageManager } from '$lib/managers/language-manager.svelte';
|
||||
import { serverConfigManager } from '$lib/managers/server-config-manager.svelte';
|
||||
import { maintenanceCreateUrl, maintenanceReturnUrl, maintenanceShouldRedirect } from '$lib/utils/maintenance';
|
||||
import { init } from '$lib/utils/server';
|
||||
@@ -23,6 +24,7 @@ export const load = (async ({ fetch, url }) => {
|
||||
}
|
||||
|
||||
commandPaletteManager.enable();
|
||||
languageManager.init();
|
||||
|
||||
return {
|
||||
error,
|
||||
|
||||
Reference in New Issue
Block a user