Format file

This commit is contained in:
Nicola Benaglia 2025-04-12 18:19:21 +02:00
parent 9b675f470d
commit 52c733f48a

View File

@ -1,185 +1,195 @@
import { atom, selectorFamily } from 'recoil'; import { atom, selectorFamily } from 'recoil';
export const sortablePinnedAppsAtom = atom({ export const sortablePinnedAppsAtom = atom({
key: 'sortablePinnedAppsFromAtom', key: 'sortablePinnedAppsFromAtom',
default: [{ default: [
name: 'Q-Tube', {
service: 'APP' name: 'Q-Tube',
}, { service: 'APP',
name: 'Q-Mail', },
service: 'APP' {
}, { name: 'Q-Mail',
name: 'Q-Share', service: 'APP',
service: 'APP' },
}, { {
name: 'Q-Fund', name: 'Q-Share',
service: 'APP' service: 'APP',
}, { },
name: 'Q-Shop', {
service: 'APP' name: 'Q-Fund',
}, service: 'APP',
{ },
name: 'Q-Trade', {
service: 'APP' name: 'Q-Shop',
}, service: 'APP',
{ },
name: 'Q-Support', {
service: 'APP' name: 'Q-Trade',
}, service: 'APP',
{ },
name: 'Q-Manager', {
service: 'APP' name: 'Q-Support',
}, service: 'APP',
{ },
name: 'Q-Blog', {
service: 'APP' name: 'Q-Manager',
}, service: 'APP',
{ },
name: 'Q-Mintership', {
service: 'APP' name: 'Q-Blog',
}, service: 'APP',
{ },
name: 'Q-Wallets', {
service: 'APP' name: 'Q-Mintership',
}, service: 'APP',
{ },
name: 'Q-Search', {
service: 'APP' name: 'Q-Wallets',
}, service: 'APP',
], },
{
name: 'Q-Search',
service: 'APP',
},
],
}); });
export const canSaveSettingToQdnAtom = atom({ export const canSaveSettingToQdnAtom = atom({
key: 'canSaveSettingToQdnAtom', key: 'canSaveSettingToQdnAtom',
default: false, default: false,
}); });
export const settingsQDNLastUpdatedAtom = atom({ export const settingsQDNLastUpdatedAtom = atom({
key: 'settingsQDNLastUpdatedAtom', key: 'settingsQDNLastUpdatedAtom',
default: -100, default: -100,
}); });
export const settingsLocalLastUpdatedAtom = atom({ export const settingsLocalLastUpdatedAtom = atom({
key: 'settingsLocalLastUpdatedAtom', key: 'settingsLocalLastUpdatedAtom',
default: 0, default: 0,
}); });
export const oldPinnedAppsAtom = atom({ export const oldPinnedAppsAtom = atom({
key: 'oldPinnedAppsAtom', key: 'oldPinnedAppsAtom',
default: [], default: [],
});
export const isUsingImportExportSettingsAtom = atom({
key: 'isUsingImportExportSettingsAtom',
default: null,
}); });
export const isUsingImportExportSettingsAtom = atom({
key: 'isUsingImportExportSettingsAtom',
default: null,
});
export const fullScreenAtom = atom({ export const fullScreenAtom = atom({
key: 'fullScreenAtom', key: 'fullScreenAtom',
default: false, default: false,
}); });
export const hasSettingsChangedAtom = atom({ export const hasSettingsChangedAtom = atom({
key: 'hasSettingsChangedAtom', key: 'hasSettingsChangedAtom',
default: false, default: false,
}); });
export const navigationControllerAtom = atom({ export const navigationControllerAtom = atom({
key: 'navigationControllerAtom', key: 'navigationControllerAtom',
default: {}, default: {},
}); });
export const enabledDevModeAtom = atom({ export const enabledDevModeAtom = atom({
key: 'enabledDevModeAtom', key: 'enabledDevModeAtom',
default: false, default: false,
}); });
export const myGroupsWhereIAmAdminAtom = atom({ export const myGroupsWhereIAmAdminAtom = atom({
key: 'myGroupsWhereIAmAdminAtom', key: 'myGroupsWhereIAmAdminAtom',
default: [], default: [],
}); });
export const promotionTimeIntervalAtom = atom({ export const promotionTimeIntervalAtom = atom({
key: 'promotionTimeIntervalAtom', key: 'promotionTimeIntervalAtom',
default: 0, default: 0,
}); });
export const promotionsAtom = atom({ export const promotionsAtom = atom({
key: 'promotionsAtom', key: 'promotionsAtom',
default: [], default: [],
}); });
export const resourceDownloadControllerAtom = atom({ export const resourceDownloadControllerAtom = atom({
key: 'resourceDownloadControllerAtom', key: 'resourceDownloadControllerAtom',
default: {}, default: {},
}); });
export const resourceKeySelector = selectorFamily({ export const resourceKeySelector = selectorFamily({
key: 'resourceKeySelector', key: 'resourceKeySelector',
get: (key) => ({ get }) => { get:
const resources = get(resourceDownloadControllerAtom); (key) =>
return resources[key] || null; // Return the value for the key or null if not found ({ get }) => {
}, const resources = get(resourceDownloadControllerAtom);
return resources[key] || null; // Return the value for the key or null if not found
},
}); });
export const blobControllerAtom = atom({ export const blobControllerAtom = atom({
key: 'blobControllerAtom', key: 'blobControllerAtom',
default: {}, default: {},
}); });
export const blobKeySelector = selectorFamily({ export const blobKeySelector = selectorFamily({
key: 'blobKeySelector', key: 'blobKeySelector',
get: (key) => ({ get }) => { get:
const blobs = get(blobControllerAtom); (key) =>
return blobs[key] || null; // Return the value for the key or null if not found ({ get }) => {
}, const blobs = get(blobControllerAtom);
return blobs[key] || null; // Return the value for the key or null if not found
},
}); });
export const selectedGroupIdAtom = atom({ export const selectedGroupIdAtom = atom({
key: 'selectedGroupIdAtom', key: 'selectedGroupIdAtom',
default: null, default: null,
}); });
export const addressInfoControllerAtom = atom({ export const addressInfoControllerAtom = atom({
key: 'addressInfoControllerAtom', key: 'addressInfoControllerAtom',
default: {}, default: {},
}); });
export const addressInfoKeySelector = selectorFamily({ export const addressInfoKeySelector = selectorFamily({
key: 'addressInfoKeySelector', key: 'addressInfoKeySelector',
get: (key) => ({ get }) => { get:
const userInfo = get(addressInfoControllerAtom); (key) =>
return userInfo[key] || null; // Return the value for the key or null if not found ({ get }) => {
}, const userInfo = get(addressInfoControllerAtom);
return userInfo[key] || null; // Return the value for the key or null if not found
},
}); });
export const isDisabledEditorEnterAtom = atom({ export const isDisabledEditorEnterAtom = atom({
key: 'isDisabledEditorEnterAtom', key: 'isDisabledEditorEnterAtom',
default: false, default: false,
}); });
export const qMailLastEnteredTimestampAtom = atom({ export const qMailLastEnteredTimestampAtom = atom({
key: 'qMailLastEnteredTimestampAtom', key: 'qMailLastEnteredTimestampAtom',
default: null, default: null,
}); });
export const lastPaymentSeenTimestampAtom = atom<null | number>({ export const lastPaymentSeenTimestampAtom = atom<null | number>({
key: 'lastPaymentSeenTimestampAtom', key: 'lastPaymentSeenTimestampAtom',
default: null, default: null,
}); });
export const mailsAtom = atom({ export const mailsAtom = atom({
key: 'mailsAtom', key: 'mailsAtom',
default: [], default: [],
}); });
export const groupsPropertiesAtom = atom({ export const groupsPropertiesAtom = atom({
key: 'groupsPropertiesAtom', key: 'groupsPropertiesAtom',
default: {}, default: {},
}); });
export const isOpenBlockedModalAtom = atom({ export const isOpenBlockedModalAtom = atom({
key: 'isOpenBlockedModalAtom', key: 'isOpenBlockedModalAtom',
default: false, default: false,
}); });