mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
fixing account storage config in mobil dashboard
This commit is contained in:
parent
726821e29e
commit
3fac7afe3d
@ -68,7 +68,8 @@ export function useDashboard(config, server, token) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const { keyType, accountStorage, domain, enableImage, enableAudio, enableVideo, transformSupported, allowUnsealed, pushSupported, enableIce, iceUrl, iceUsername, icePassword } = config;
|
const { keyType, accountStorage, domain, enableImage, enableAudio, enableVideo, transformSupported, allowUnsealed, pushSupported, enableIce, iceUrl, iceUsername, icePassword } = config;
|
||||||
updateState({ keyType, storage: accountStorage.toString(), domain, enableImage, enableAudio, enableVideo, transformSupported, allowUnsealed, pushSupported, enableIce, iceUrl, iceUsername, icePassword });
|
const storage = Math.ceil(accountStorage / 1073741824);
|
||||||
|
updateState({ keyType, storage: storage.toString(), domain, enableImage, enableAudio, enableVideo, transformSupported, allowUnsealed, pushSupported, enableIce, iceUrl, iceUsername, icePassword });
|
||||||
}, [config]);
|
}, [config]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -140,7 +141,8 @@ export function useDashboard(config, server, token) {
|
|||||||
},
|
},
|
||||||
saveConfig: async () => {
|
saveConfig: async () => {
|
||||||
const { storage, domain, keyType, enableImage, pushSupported, allowUnsealed, transformSupported, enableAudio, enableVideo, enableIce, iceUrl, iceUsername, icePassword } = state;
|
const { storage, domain, keyType, enableImage, pushSupported, allowUnsealed, transformSupported, enableAudio, enableVideo, enableIce, iceUrl, iceUsername, icePassword } = state;
|
||||||
const config = { accountStorage: Number(storage), domain, keyType, enableImage, pushSupported, allowUnsealed, transformSupported, enableAudio, enableVideo, enableIce, iceUrl, iceUsername, icePassword };
|
const accountStorage = Number(storage) * 1073741824;
|
||||||
|
const config = { accountStorage, domain, keyType, enableImage, pushSupported, allowUnsealed, transformSupported, enableAudio, enableVideo, enableIce, iceUrl, iceUsername, icePassword };
|
||||||
await setNodeConfig(server, token, config);
|
await setNodeConfig(server, token, config);
|
||||||
},
|
},
|
||||||
enableUser: async (accountId, enabled) => {
|
enableUser: async (accountId, enabled) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user