mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 17:25:11 +03:00
refactor: app init event (#17937)
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
import { langs } from '$lib/constants';
|
||||
import { eventManager } from '$lib/managers/event-manager.svelte';
|
||||
import { lang } from '$lib/stores/preferences.store';
|
||||
|
||||
class LanguageManager {
|
||||
constructor() {
|
||||
eventManager.on('app.init', () => lang.subscribe((lang) => this.setLanguage(lang)));
|
||||
}
|
||||
|
||||
rtl = $state(false);
|
||||
|
||||
setLanguage(code: string) {
|
||||
|
||||
Reference in New Issue
Block a user