1
1
mirror of https://github.com/neosubhamoy/neodlp.git synced 2026-03-22 16:05:50 +05:30

refactor: use global flatpak detection

This commit is contained in:
2026-02-27 21:21:11 +05:30
Verified
parent 6e76747f06
commit 7a7f6705d4
8 changed files with 59 additions and 21 deletions

View File

@@ -1,4 +1,4 @@
import { BasePathsStore, CurrentVideoMetadataStore, DownloadActionStatesStore, DownloaderPageStatesStore, DownloadStatesStore, KvPairsStatesStore, LibraryPageStatesStore, LogsStore, SettingsPageStatesStore } from '@/types/store';
import { BasePathsStore, CurrentVideoMetadataStore, DownloadActionStatesStore, DownloaderPageStatesStore, DownloadStatesStore, EnvironmentStore, KvPairsStatesStore, LibraryPageStatesStore, LogsStore, SettingsPageStatesStore } from '@/types/store';
import { create } from 'zustand';
export const useBasePathsStore = create<BasePathsStore>((set) => ({
@@ -352,3 +352,12 @@ export const useLogsStore = create<LogsStore>((set) => ({
addLog: (log) => set((state) => ({ logs: [...state.logs, log] })),
clearLogs: () => set(() => ({ logs: [] }))
}));
export const useEnvironmentStore = create<EnvironmentStore>((set) => ({
isFlatpak: false,
isAppimage: false,
appDirPath: null,
setIsFlatpak: (isFlatpak) => set(() => ({ isFlatpak })),
setIsAppimage: (isAppimage) => set(() => ({ isAppimage })),
setAppDirPath: (path) => set(() => ({ appDirPath: path }))
}));