mirror of
https://github.com/immich-app/immich.git
synced 2026-01-25 13:17:21 -05:00
* feat: ProcessRepository#createSpawnDuplexStream
* test: write tests for ProcessRepository#createSpawnDuplexStream
* feat: StorageRepository#createGzip,createGunzip,createPlainReadStream
* feat: backups util (args, create, restore, progress)
* feat: wait on maintenance operation lock on boot
* chore: use backup util from backup.service.ts
test: update backup.service.ts tests with new util
* feat: list/delete backups (maintenance services)
* chore: open api
fix: missing action in cli.service.ts
* chore: add missing repositories to MaintenanceModule
* refactor: move logSecret into module init
* feat: initialise StorageCore in maintenance mode
* feat: authenticate websocket requests in maintenance mode
* test: add mock for new storage fns
* feat: add MaintenanceEphemeralStateRepository
refactor: cache the secret in memory
* test: update service worker tests
* feat: add external maintenance mode status
* feat: synchronised status, restore db action
* test: backup restore service tests
* refactor: DRY end maintenance
* feat: list and delete backup routes
* feat: start action on boot
* fix: should set status on restore end
* refactor: add maintenanceStore to hold writables
* feat: sync status to web app
* feat: web impl.
* test: various utils for testings
* test: web e2e tests
* test: e2e maintenance spec
* test: update cli spec
* chore: e2e lint
* chore: lint fixes
* chore: lint fixes
* feat: start restore flow route
* test: update e2e tests
* chore: remove neon lights on maintenance action pages
* fix: use 'startRestoreFlow' on onboarding page
* chore: ignore any library folder in `docker/`
* fix: load status on boot
* feat: upload backups
* refactor: permit any .sql(.gz) to be listed/restored
* feat: download backups from list
* fix: permit uploading just .sql files
* feat: restore just .sql files
* fix: don't show backups list if logged out
* feat: system integrity check in restore flow
* test: not providing failed backups in API anymore
* test: util should also not try to use failedBackups
* fix: actually assign inputStream
* test: correct test backup prep.
* fix: ensure task is defined to show error
* test: fix docker cp command
* test: update e2e web spec to select next button
* test: update e2e api tests
* test: refactor timeouts
* chore: remove `showDelete` from maint. settings
* chore: lint
* chore: lint
* fix: make sure backups are correctly sorted for clean up
* test: update service spec
* test: adjust e2e timeout
* test: increase web timeouts for ci
* chore: move gitignore changes
* chore: additional filename validation
* refactor: better typings for integrity API
* feat: higher accuracy progress tracking
* chore: delay lock retry
* refactor: remove old maintenance settings
* refactor: clean up tailwind classes
* refactor: use while loop rather than recursive calls
* test: update service specs
* chore: check canParse too
* chore: lint
* fix: logic error causing infinite loop
* refactor: use <ProgressBar /> from ui library
* fix: create or overwrite file
* chore: i18n pass, update progress bar
* fix: wrong translation string
* chore: update colour variables
* test: update web test for new maint. page
* chore: format, fix key
* test: update tests to be more linter complaint & use new routines
* chore: update onClick -> onAction, title -> breadcrumbs
* fix: use wrench icon in admin settings sidebar
* chore: add translation strings to accordion
* chore: lint
* refactor: move maintenance worker init into service
* refactor: `maintenanceStatus` -> `getMaintenanceStatus`
refactor: `integrityCheck` -> `detectPriorInstall`
chore: add `v2.4.0` version
refactor: `/backups/list` -> `/backups`
refactor: use sendFile in download route
refactor: use separate backups permissions
chore: correct descriptions
refactor: permit handler that doesn't return promise for sendfile
* refactor: move status impl into service
refactor: add active flag to maintenance status
* refactor: split into database backup controller
* test: split api e2e tests and passing
* fix: move end button into authed default maint page
* fix: also show in restore flow
* fix: import getMaintenanceStatus
* test: split web e2e tests
* refactor: ensure detect install is consistently named
* chore: ensure admin for detect install while out of maint.
* refactor: remove state repository
* test: update maint. worker service spec
* test: split backup service spec
* refactor: rename db backup routes
* refactor: instead of param, allow bulk backup deletion
* test: update sdk use in e2e test
* test: correct deleteBackup call
* fix: correct type for serverinstall response dto
* chore: validate filename for deletion
* test: wip
* test: backups no longer take path param
* refactor: scope util to database-backups instead of backups
* fix: update worker controller with new route
* chore: use new admin page actions
* chore: remove stray comment
* test: rename outdated test
* refactor: getter pattern for maintenance secret
* refactor: `createSpawnDuplexStream` -> `spawnDuplexStream`
* refactor: prefer `Object.assign`
* refactor: remove useless try {} block
* refactor: prefer `type Props`
refactor: prefer arrow function
* refactor: use luxon API for minutesAgo
* chore: remove change to gitignore
* refactor: prefer `type Props`
* refactor: remove async from onMount
* refactor: use luxon toRelative for relative time
* refactor: duplicate logic check
* chore: open api
* refactor: begin moving code into web//services
* refactor: don't use template string with $t
* test: use dialog role to match prompt
* refactor: split actions into flow/restore
* test: fix action value
* refactor: move more service calls into web//services
* chore: should void fn return
* chore: bump 2.4.0 to 2.5.0 in controller
* chore: bump 2.4.0 to 2.5.0 in controller
* refactor: use events for web//services
* chore: open api
* chore: open api
* refactor: don't await returned promise
* refactor: remove redundant check
* refactor: add `type: command` to actions
* refactor: split backup entries into own component
* refactor: split restore flow into separate components
* refactor(web): split BackupDelete event
* chore: stylings
* chore: stylings
* fix: don't log query failure on first boot
* feat: support pg_dumpall backups
* feat: display information about each backup
* chore: i18n
* feat: rollback to restore point on migrations failure
* feat: health check after restore
* chore: format
* refactor: split health check into separate function
* refactor: split health into repository
test: write tests covering rollbacks
* fix: omit 'health' requirement from createDbBackup
* test(e2e): rollback test
* fix: wrap text in backup entry
* fix: don't shrink context menu button
* fix: correct CREATE DB syntax for postgres
* test: rename backups generated by test
* feat: add filesize to backup response dto
* feat: restore list
* feat: ui work
* fix: e2e test
* fix: e2e test
* pr feedback
* pr feedback
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
Co-authored-by: Jason Rasmussen <jason@rasm.me>
406 lines
17 KiB
TypeScript
406 lines
17 KiB
TypeScript
export const UUID_REGEX = /^[\dA-Fa-f]{8}(?:\b-[\dA-Fa-f]{4}){3}\b-[\dA-Fa-f]{12}$/;
|
|
|
|
export enum AssetAction {
|
|
ARCHIVE = 'archive',
|
|
UNARCHIVE = 'unarchive',
|
|
TRASH = 'trash',
|
|
DELETE = 'delete',
|
|
RESTORE = 'restore',
|
|
ADD = 'add',
|
|
ADD_TO_ALBUM = 'add-to-album',
|
|
STACK = 'stack',
|
|
UNSTACK = 'unstack',
|
|
KEEP_THIS_DELETE_OTHERS = 'keep-this-delete-others',
|
|
SET_STACK_PRIMARY_ASSET = 'set-stack-primary-asset',
|
|
REMOVE_ASSET_FROM_STACK = 'remove-asset-from-stack',
|
|
SET_VISIBILITY_LOCKED = 'set-visibility-locked',
|
|
SET_VISIBILITY_TIMELINE = 'set-visibility-timeline',
|
|
SET_PERSON_FEATURED_PHOTO = 'set-person-featured-photo',
|
|
RATING = 'rating',
|
|
}
|
|
|
|
export type SharedLinkTab = 'all' | 'album' | 'individual';
|
|
|
|
export enum ProjectionType {
|
|
EQUIRECTANGULAR = 'EQUIRECTANGULAR',
|
|
CUBEMAP = 'CUBEMAP',
|
|
CUBESTRIP = 'CUBESTRIP',
|
|
EQUIRECTANGULAR_STEREO = 'EQUIRECTANGULAR_STEREO',
|
|
CUBEMAP_STEREO = 'CUBEMAP_STEREO',
|
|
CUBESTRIP_STEREO = 'CUBESTRIP_STEREO',
|
|
CYLINDER = 'CYLINDER',
|
|
NONE = 'NONE',
|
|
}
|
|
|
|
export const dateFormats = {
|
|
album: <Intl.DateTimeFormatOptions>{
|
|
month: 'short',
|
|
day: 'numeric',
|
|
year: 'numeric',
|
|
},
|
|
settings: <Intl.DateTimeFormatOptions>{
|
|
month: 'short',
|
|
day: 'numeric',
|
|
year: 'numeric',
|
|
},
|
|
};
|
|
|
|
export enum QueryParameter {
|
|
ACTION = 'action',
|
|
ID = 'id',
|
|
IS_OPEN = 'isOpen',
|
|
OPEN_SETTING = 'openSetting',
|
|
PREVIOUS_ROUTE = 'previousRoute',
|
|
QUERY = 'query',
|
|
SEARCHED_PEOPLE = 'searchedPeople',
|
|
SMART_SEARCH = 'smartSearch',
|
|
PAGE = 'page',
|
|
PATH = 'path',
|
|
}
|
|
|
|
export enum SessionStorageKey {
|
|
INFINITE_SCROLL_PAGE = 'infiniteScrollPage',
|
|
SCROLL_POSITION = 'scrollPosition',
|
|
}
|
|
|
|
// TODO split into user settings vs system settings
|
|
export enum OpenQueryParam {
|
|
OAUTH = 'oauth',
|
|
JOB = 'job',
|
|
STORAGE_TEMPLATE = 'storage-template',
|
|
NOTIFICATIONS = 'notifications',
|
|
PURCHASE_SETTINGS = 'user-purchase-settings',
|
|
}
|
|
|
|
export const maximumLengthSearchPeople = 1000;
|
|
|
|
// time to load the map before displaying the loading spinner
|
|
export const timeToLoadTheMap: number = 100;
|
|
|
|
export const timeBeforeShowLoadingSpinner: number = 100;
|
|
|
|
export const timeDebounceOnSearch: number = 300;
|
|
|
|
// should be the same values as the ones in the app.html
|
|
export enum Theme {
|
|
LIGHT = 'light',
|
|
DARK = 'dark',
|
|
}
|
|
|
|
export const fallbackLocale = {
|
|
code: 'en-US',
|
|
name: 'English (US)',
|
|
};
|
|
|
|
export enum QueryType {
|
|
SMART = 'smart',
|
|
METADATA = 'metadata',
|
|
DESCRIPTION = 'description',
|
|
OCR = 'ocr',
|
|
}
|
|
|
|
export const validQueryTypes = new Set([QueryType.SMART, QueryType.METADATA, QueryType.DESCRIPTION, QueryType.OCR]);
|
|
|
|
export const locales = [
|
|
{ code: 'af-ZA', name: 'Afrikaans (South Africa)' },
|
|
{ code: 'sq-AL', name: 'Albanian (Albania)' },
|
|
{ code: 'ar-DZ', name: 'Arabic (Algeria)' },
|
|
{ code: 'ar-BH', name: 'Arabic (Bahrain)' },
|
|
{ code: 'ar-EG', name: 'Arabic (Egypt)' },
|
|
{ code: 'ar-IQ', name: 'Arabic (Iraq)' },
|
|
{ code: 'ar-JO', name: 'Arabic (Jordan)' },
|
|
{ code: 'ar-KW', name: 'Arabic (Kuwait)' },
|
|
{ code: 'ar-LB', name: 'Arabic (Lebanon)' },
|
|
{ code: 'ar-LY', name: 'Arabic (Libya)' },
|
|
{ code: 'ar-MA', name: 'Arabic (Morocco)' },
|
|
{ code: 'ar-OM', name: 'Arabic (Oman)' },
|
|
{ code: 'ar-QA', name: 'Arabic (Qatar)' },
|
|
{ code: 'ar-SA', name: 'Arabic (Saudi Arabia)' },
|
|
{ code: 'ar-SY', name: 'Arabic (Syria)' },
|
|
{ code: 'ar-TN', name: 'Arabic (Tunisia)' },
|
|
{ code: 'ar-AE', name: 'Arabic (United Arab Emirates)' },
|
|
{ code: 'ar-YE', name: 'Arabic (Yemen)' },
|
|
{ code: 'hy-AM', name: 'Armenian (Armenia)' },
|
|
{ code: 'az-AZ', name: 'Azerbaijani (Azerbaijan)' },
|
|
{ code: 'eu-ES', name: 'Basque (Spain)' },
|
|
{ code: 'be-BY', name: 'Belarusian (Belarus)' },
|
|
{ code: 'bn-IN', name: 'Bengali (India)' },
|
|
{ code: 'bs-BA', name: 'Bosnian (Bosnia and Herzegovina)' },
|
|
{ code: 'bg-BG', name: 'Bulgarian (Bulgaria)' },
|
|
{ code: 'ca-ES', name: 'Catalan (Spain)' },
|
|
{ code: 'zh-CN', name: 'Chinese (China)' },
|
|
{ code: 'zh-HK', name: 'Chinese (Hong Kong SAR China)' },
|
|
{ code: 'zh-MO', name: 'Chinese (Macao SAR China)' },
|
|
{ code: 'zh-SG', name: 'Chinese (Singapore)' },
|
|
{ code: 'zh-TW', name: 'Chinese (Taiwan)' },
|
|
{ code: 'hr-HR', name: 'Croatian (Croatia)' },
|
|
{ code: 'cs-CZ', name: 'Czech (Czech Republic)' },
|
|
{ code: 'da-DK', name: 'Danish (Denmark)' },
|
|
{ code: 'nl-BE', name: 'Dutch (Belgium)' },
|
|
{ code: 'nl-NL', name: 'Dutch (Netherlands)' },
|
|
{ code: 'en-AU', name: 'English (Australia)' },
|
|
{ code: 'en-BZ', name: 'English (Belize)' },
|
|
{ code: 'en-CA', name: 'English (Canada)' },
|
|
{ code: 'en-IE', name: 'English (Ireland)' },
|
|
{ code: 'en-JM', name: 'English (Jamaica)' },
|
|
{ code: 'en-NZ', name: 'English (New Zealand)' },
|
|
{ code: 'en-PH', name: 'English (Philippines)' },
|
|
{ code: 'en-ZA', name: 'English (South Africa)' },
|
|
{ code: 'en-TT', name: 'English (Trinidad and Tobago)' },
|
|
{ code: 'en-VI', name: 'English (U.S. Virgin Islands)' },
|
|
{ code: 'en-GB', name: 'English (United Kingdom)' },
|
|
{ code: 'en-US', name: 'English (United States)' },
|
|
{ code: 'en-ZW', name: 'English (Zimbabwe)' },
|
|
{ code: 'et-EE', name: 'Estonian (Estonia)' },
|
|
{ code: 'fo-FO', name: 'Faroese (Faroe Islands)' },
|
|
{ code: 'fi-FI', name: 'Finnish (Finland)' },
|
|
{ code: 'fr-BE', name: 'French (Belgium)' },
|
|
{ code: 'fr-CA', name: 'French (Canada)' },
|
|
{ code: 'fr-FR', name: 'French (France)' },
|
|
{ code: 'fr-LU', name: 'French (Luxembourg)' },
|
|
{ code: 'fr-MC', name: 'French (Monaco)' },
|
|
{ code: 'fr-CH', name: 'French (Switzerland)' },
|
|
{ code: 'gl-ES', name: 'Galician (Spain)' },
|
|
{ code: 'ka-GE', name: 'Georgian (Georgia)' },
|
|
{ code: 'de-AT', name: 'German (Austria)' },
|
|
{ code: 'de-DE', name: 'German (Germany)' },
|
|
{ code: 'de-LI', name: 'German (Liechtenstein)' },
|
|
{ code: 'de-LU', name: 'German (Luxembourg)' },
|
|
{ code: 'de-CH', name: 'German (Switzerland)' },
|
|
{ code: 'el-GR', name: 'Greek (Greece)' },
|
|
{ code: 'gu-IN', name: 'Gujarati (India)' },
|
|
{ code: 'he-IL', name: 'Hebrew (Israel)' },
|
|
{ code: 'hi-IN', name: 'Hindi (India)' },
|
|
{ code: 'hu-HU', name: 'Hungarian (Hungary)' },
|
|
{ code: 'is-IS', name: 'Icelandic (Iceland)' },
|
|
{ code: 'id-ID', name: 'Indonesian (Indonesia)' },
|
|
{ code: 'it-IT', name: 'Italian (Italy)' },
|
|
{ code: 'it-CH', name: 'Italian (Switzerland)' },
|
|
{ code: 'ja-JP', name: 'Japanese (Japan)' },
|
|
{ code: 'kn-IN', name: 'Kannada (India)' },
|
|
{ code: 'kk-KZ', name: 'Kazakh (Kazakhstan)' },
|
|
{ code: 'kok-IN', name: 'Konkani (India)' },
|
|
{ code: 'ko-KR', name: 'Korean (South Korea)' },
|
|
{ code: 'lv-LV', name: 'Latvian (Latvia)' },
|
|
{ code: 'lt-LT', name: 'Lithuanian (Lithuania)' },
|
|
{ code: 'mk-MK', name: 'Macedonian (Macedonia)' },
|
|
{ code: 'ms-BN', name: 'Malay (Brunei)' },
|
|
{ code: 'ms-MY', name: 'Malay (Malaysia)' },
|
|
{ code: 'ml-IN', name: 'Malayalam (India)' },
|
|
{ code: 'mt-MT', name: 'Maltese (Malta)' },
|
|
{ code: 'mr-IN', name: 'Marathi (India)' },
|
|
{ code: 'mn-MN', name: 'Mongolian (Mongolia)' },
|
|
{ code: 'se-NO', name: 'Northern Sami (Norway)' },
|
|
{ code: 'nb-NO', name: 'Norwegian Bokmål (Norway)' },
|
|
{ code: 'nn-NO', name: 'Norwegian Nynorsk (Norway)' },
|
|
{ code: 'fa-IR', name: 'Persian (Iran)' },
|
|
{ code: 'pl-PL', name: 'Polish (Poland)' },
|
|
{ code: 'pt-BR', name: 'Portuguese (Brazil)' },
|
|
{ code: 'pt-PT', name: 'Portuguese (Portugal)' },
|
|
{ code: 'pa-IN', name: 'Punjabi (India)' },
|
|
{ code: 'ro-RO', name: 'Romanian (Romania)' },
|
|
{ code: 'ru-RU', name: 'Russian (Russia)' },
|
|
{ code: 'sr-BA', name: 'Serbian (Bosnia and Herzegovina)' },
|
|
{ code: 'sr-CS', name: 'Serbian (Serbia And Montenegro)' },
|
|
{ code: 'sk-SK', name: 'Slovak (Slovakia)' },
|
|
{ code: 'sl-SI', name: 'Slovenian (Slovenia)' },
|
|
{ code: 'es-AR', name: 'Spanish (Argentina)' },
|
|
{ code: 'es-BO', name: 'Spanish (Bolivia)' },
|
|
{ code: 'es-CL', name: 'Spanish (Chile)' },
|
|
{ code: 'es-CO', name: 'Spanish (Colombia)' },
|
|
{ code: 'es-CR', name: 'Spanish (Costa Rica)' },
|
|
{ code: 'es-DO', name: 'Spanish (Dominican Republic)' },
|
|
{ code: 'es-EC', name: 'Spanish (Ecuador)' },
|
|
{ code: 'es-SV', name: 'Spanish (El Salvador)' },
|
|
{ code: 'es-GT', name: 'Spanish (Guatemala)' },
|
|
{ code: 'es-HN', name: 'Spanish (Honduras)' },
|
|
{ code: 'es-MX', name: 'Spanish (Mexico)' },
|
|
{ code: 'es-NI', name: 'Spanish (Nicaragua)' },
|
|
{ code: 'es-PA', name: 'Spanish (Panama)' },
|
|
{ code: 'es-PY', name: 'Spanish (Paraguay)' },
|
|
{ code: 'es-PE', name: 'Spanish (Peru)' },
|
|
{ code: 'es-PR', name: 'Spanish (Puerto Rico)' },
|
|
{ code: 'es-ES', name: 'Spanish (Spain)' },
|
|
{ code: 'es-UY', name: 'Spanish (Uruguay)' },
|
|
{ code: 'es-VE', name: 'Spanish (Venezuela)' },
|
|
{ code: 'sw-KE', name: 'Swahili (Kenya)' },
|
|
{ code: 'sv-FI', name: 'Swedish (Finland)' },
|
|
{ code: 'sv-SE', name: 'Swedish (Sweden)' },
|
|
{ code: 'te-IN', name: 'Telugu (India)' },
|
|
{ code: 'th-TH', name: 'Thai (Thailand)' },
|
|
{ code: 'tn-ZA', name: 'Tswana (South Africa)' },
|
|
{ code: 'tr-TR', name: 'Turkish (Turkey)' },
|
|
{ code: 'uk-UA', name: 'Ukrainian (Ukraine)' },
|
|
{ code: 'uz-UZ', name: 'Uzbek (Uzbekistan)' },
|
|
{ code: 'vi-VN', name: 'Vietnamese (Vietnam)' },
|
|
{ code: 'cy-GB', name: 'Welsh (United Kingdom)' },
|
|
{ code: 'xh-ZA', name: 'Xhosa (South Africa)' },
|
|
{ code: 'zu-ZA', name: 'Zulu (South Africa)' },
|
|
];
|
|
|
|
interface Lang {
|
|
name: string;
|
|
code: string;
|
|
loader: () => Promise<{ default: object }>;
|
|
rtl?: boolean;
|
|
weblateCode?: string;
|
|
}
|
|
|
|
export const defaultLang: Lang = { name: 'English', code: 'en', loader: () => import('$i18n/en.json') };
|
|
|
|
export const langs: Lang[] = [
|
|
{ name: 'Afrikaans', code: 'af', loader: () => import('$i18n/af.json') },
|
|
{ name: 'Arabic', code: 'ar', loader: () => import('$i18n/ar.json'), rtl: true },
|
|
{ name: 'Azerbaijani', code: 'az', loader: () => import('$i18n/az.json'), rtl: true },
|
|
{ name: 'Belarusian', code: 'be', loader: () => import('$i18n/be.json') },
|
|
{ name: 'Bulgarian', code: 'bg', loader: () => import('$i18n/bg.json') },
|
|
{ name: 'Bislama', code: 'bi', loader: () => import('$i18n/bi.json') },
|
|
{ name: 'Bengali', code: 'bn', loader: () => import('$i18n/bn.json') },
|
|
{ name: 'Breton', code: 'br', loader: () => import('$i18n/br.json') },
|
|
{ name: 'Catalan', code: 'ca', loader: () => import('$i18n/ca.json') },
|
|
{ name: 'Czech', code: 'cs', loader: () => import('$i18n/cs.json') },
|
|
{ name: 'Chuvash', code: 'cv', loader: () => import('$i18n/cv.json') },
|
|
{ name: 'Danish', code: 'da', loader: () => import('$i18n/da.json') },
|
|
{ name: 'German', code: 'de', loader: () => import('$i18n/de.json') },
|
|
{ name: 'German (Switzerland)', code: 'de-CH', weblateCode: 'de_CH', loader: () => import('$i18n/de_CH.json') },
|
|
defaultLang,
|
|
{ name: 'Greek', code: 'el', loader: () => import('$i18n/el.json') },
|
|
{ name: 'Esperanto', code: 'eo', loader: () => import('$i18n/eo.json') },
|
|
{ name: 'Spanish', code: 'es', loader: () => import('$i18n/es.json') },
|
|
{ name: 'Estonian', code: 'et', loader: () => import('$i18n/et.json') },
|
|
{ name: 'Basque', code: 'eu', loader: () => import('$i18n/eu.json') },
|
|
{ name: 'Persian', code: 'fa', loader: () => import('$i18n/fa.json'), rtl: true },
|
|
{ name: 'Finnish', code: 'fi', loader: () => import('$i18n/fi.json') },
|
|
{ name: 'Filipino', code: 'fil', loader: () => import('$i18n/fil.json') },
|
|
{ name: 'French', code: 'fr', loader: () => import('$i18n/fr.json') },
|
|
{ name: 'Irish', code: 'ga', loader: () => import('$i18n/ga.json') },
|
|
{ name: 'Galician', code: 'gl', loader: () => import('$i18n/gl.json') },
|
|
{ name: 'Alemannic', code: 'gsw', loader: () => import('$i18n/gsw.json') },
|
|
{ name: 'Gujarati', code: 'gu', loader: () => import('$i18n/gu.json') },
|
|
{ name: 'Hebrew', code: 'he', loader: () => import('$i18n/he.json'), rtl: true },
|
|
{ name: 'Hindi', code: 'hi', loader: () => import('$i18n/hi.json') },
|
|
{ name: 'Croatian', code: 'hr', loader: () => import('$i18n/hr.json') },
|
|
{ name: 'Hungarian', code: 'hu', loader: () => import('$i18n/hu.json') },
|
|
{ name: 'Armenian', code: 'hy', loader: () => import('$i18n/hy.json') },
|
|
{ name: 'Indonesian', code: 'id', loader: () => import('$i18n/id.json') },
|
|
{ name: 'Icelandic', code: 'is', loader: () => import('$i18n/is.json') },
|
|
{ name: 'Italian', code: 'it', loader: () => import('$i18n/it.json') },
|
|
{ name: 'Japanese', code: 'ja', loader: () => import('$i18n/ja.json') },
|
|
{ name: 'Georgian', code: 'ka', loader: () => import('$i18n/ka.json') },
|
|
{ name: 'Kazakh', code: 'kk', loader: () => import('$i18n/kk.json') },
|
|
{ name: 'Khmer (Central)', code: 'km', loader: () => import('$i18n/km.json') },
|
|
{ name: 'Kurdish (Northern)', code: 'kmr', loader: () => import('$i18n/kmr.json'), rtl: true },
|
|
{ name: 'Kannada', code: 'kn', loader: () => import('$i18n/kn.json') },
|
|
{ name: 'Korean', code: 'ko', loader: () => import('$i18n/ko.json') },
|
|
{ name: 'Luxembourgish', code: 'lb', loader: () => import('$i18n/lb.json') },
|
|
{ name: 'Lithuanian', code: 'lt', loader: () => import('$i18n/lt.json') },
|
|
{ name: 'Latvian', code: 'lv', loader: () => import('$i18n/lv.json') },
|
|
{ name: 'Malay (Pattani)', code: 'mfa', loader: () => import('$i18n/mfa.json') },
|
|
{ name: 'Macedonian', code: 'mk', loader: () => import('$i18n/mk.json') },
|
|
{ name: 'Malayalam', code: 'ml', loader: () => import('$i18n/ml.json') },
|
|
{ name: 'Mongolian', code: 'mn', loader: () => import('$i18n/mn.json') },
|
|
{ name: 'Marathi', code: 'mr', loader: () => import('$i18n/mr.json') },
|
|
{ name: 'Malay', code: 'ms', loader: () => import('$i18n/ms.json') },
|
|
{ name: 'Norwegian Bokmål', code: 'nb-NO', weblateCode: 'nb_NO', loader: () => import('$i18n/nb_NO.json') },
|
|
{ name: 'Dutch', code: 'nl', loader: () => import('$i18n/nl.json') },
|
|
{ name: 'Norwegian Nynorsk', code: 'nn', loader: () => import('$i18n/nn.json') },
|
|
{ name: 'Punjabi', code: 'pa', loader: () => import('$i18n/pa.json') },
|
|
{ name: 'Polish', code: 'pl', loader: () => import('$i18n/pl.json') },
|
|
{ name: 'Portuguese', code: 'pt', loader: () => import('$i18n/pt.json') },
|
|
{ name: 'Portuguese (Brazil) ', code: 'pt-BR', weblateCode: 'pt_BR', loader: () => import('$i18n/pt_BR.json') },
|
|
{ name: 'Romanian', code: 'ro', loader: () => import('$i18n/ro.json') },
|
|
{ name: 'Russian', code: 'ru', loader: () => import('$i18n/ru.json') },
|
|
{ name: 'Sinhala', code: 'si', loader: () => import('$i18n/si.json') },
|
|
{ name: 'Slovak', code: 'sk', loader: () => import('$i18n/sk.json') },
|
|
{ name: 'Slovenian', code: 'sl', loader: () => import('$i18n/sl.json') },
|
|
{ name: 'Albanian', code: 'sq', loader: () => import('$i18n/sq.json') },
|
|
{
|
|
name: 'Serbian (Cyrillic)',
|
|
code: 'sr-Cyrl',
|
|
weblateCode: 'sr_Cyrl',
|
|
loader: () => import('$i18n/sr_Cyrl.json'),
|
|
},
|
|
{ name: 'Serbian (Latin)', code: 'sr-Latn', weblateCode: 'sr_Latn', loader: () => import('$i18n/sr_Latn.json') },
|
|
{ name: 'Swedish', code: 'sv', loader: () => import('$i18n/sv.json') },
|
|
{ name: 'Tamil', code: 'ta', loader: () => import('$i18n/ta.json') },
|
|
{ name: 'Telugu', code: 'te', loader: () => import('$i18n/te.json') },
|
|
{ name: 'Thai', code: 'th', loader: () => import('$i18n/th.json') },
|
|
{ name: 'Turkish', code: 'tr', loader: () => import('$i18n/tr.json') },
|
|
{ name: 'Ukrainian', code: 'uk', loader: () => import('$i18n/uk.json') },
|
|
{ name: 'Urdu', code: 'ur', loader: () => import('$i18n/ur.json'), rtl: true },
|
|
{ name: 'Uzbek', code: 'uz', loader: () => import('$i18n/uz.json') },
|
|
{ name: 'Vietnamese', code: 'vi', loader: () => import('$i18n/vi.json') },
|
|
{ name: 'Cantonese (Traditional Han script)', code: 'yue_Hant', loader: () => import('$i18n/yue_Hant.json') },
|
|
{
|
|
name: 'Chinese (Traditional)',
|
|
code: 'zh-TW',
|
|
weblateCode: 'zh_Hant',
|
|
loader: () => import('$i18n/zh_Hant.json'),
|
|
},
|
|
{
|
|
name: 'Chinese (Simplified)',
|
|
code: 'zh-CN',
|
|
weblateCode: 'zh_SIMPLIFIED',
|
|
loader: () => import('$i18n/zh_SIMPLIFIED.json'),
|
|
},
|
|
{ name: 'Development (keys only)', code: 'dev', loader: () => Promise.resolve({ default: {} }) },
|
|
];
|
|
|
|
export enum ImmichProduct {
|
|
Client = 'immich-client',
|
|
Server = 'immich-server',
|
|
}
|
|
|
|
export enum SettingInputFieldType {
|
|
EMAIL = 'email',
|
|
TEXT = 'text',
|
|
NUMBER = 'number',
|
|
PASSWORD = 'password',
|
|
COLOR = 'color',
|
|
}
|
|
|
|
export const AlbumPageViewMode = {
|
|
SELECT_THUMBNAIL: 'select-thumbnail',
|
|
SELECT_ASSETS: 'select-assets',
|
|
VIEW: 'view',
|
|
OPTIONS: 'options',
|
|
};
|
|
|
|
export type AlbumPageViewMode =
|
|
| typeof AlbumPageViewMode.SELECT_THUMBNAIL
|
|
| typeof AlbumPageViewMode.SELECT_ASSETS
|
|
| typeof AlbumPageViewMode.VIEW
|
|
| typeof AlbumPageViewMode.OPTIONS;
|
|
|
|
export enum PersonPageViewMode {
|
|
VIEW_ASSETS = 'view-assets',
|
|
SELECT_PERSON = 'select-person',
|
|
MERGE_PEOPLE = 'merge-people',
|
|
UNASSIGN_ASSETS = 'unassign-faces',
|
|
}
|
|
|
|
export enum MediaType {
|
|
All = 'all',
|
|
Image = 'image',
|
|
Video = 'video',
|
|
}
|
|
|
|
export enum ProgressBarStatus {
|
|
Playing = 'playing',
|
|
Paused = 'paused',
|
|
}
|
|
|
|
export enum ToggleVisibility {
|
|
HIDE_ALL = 'hide-all',
|
|
HIDE_UNNANEMD = 'hide-unnamed',
|
|
SHOW_ALL = 'show-all',
|
|
}
|
|
|
|
export enum BackupFileStatus {
|
|
OK,
|
|
DifferentVersion,
|
|
UnknownVersion,
|
|
}
|
|
|
|
export const assetViewerFadeDuration: number = 150;
|