Download web/src/helpers/data.js from Jack698/velo: direct link, hf CLI and curl.
- Browser
- Download file 2.09 kB
-
https://huggingface.co/spaces/Jack698/velo/resolve/main/web/src/helpers/data.js
- Command line
-
hf download hf://spaces/Jack698/velo/web/src/helpers/data.js
-
curl -L -o data.js https://huggingface.co/spaces/Jack698/velo/resolve/main/web/src/helpers/data.js
2.09 kB
| /* | |
| Copyright (c) 2025 Tethys Plex | |
| This file is part of Veloera. | |
| This program is free software: you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation, either version 3 of the License, or | |
| (at your option) any later version. | |
| This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | |
| You should have received a copy of the GNU General Public License | |
| along with this program. If not, see <https://www.gnu.org/licenses/>. | |
| */ | |
| export function setStatusData(data) { | |
| localStorage.setItem('status', JSON.stringify(data)); | |
| localStorage.setItem('system_name', data.system_name); | |
| localStorage.setItem('logo', data.logo); | |
| localStorage.setItem('footer_html', data.footer_html); | |
| localStorage.setItem('quota_per_unit', data.quota_per_unit); | |
| localStorage.setItem('display_in_currency', data.display_in_currency); | |
| localStorage.setItem('enable_drawing', data.enable_drawing); | |
| localStorage.setItem('enable_task', data.enable_task); | |
| localStorage.setItem('enable_data_export', data.enable_data_export); | |
| localStorage.setItem('chats', JSON.stringify(data.chats)); | |
| localStorage.setItem( | |
| 'data_export_default_time', | |
| data.data_export_default_time, | |
| ); | |
| localStorage.setItem( | |
| 'default_collapse_sidebar', | |
| data.default_collapse_sidebar, | |
| ); | |
| localStorage.setItem('mj_notify_enabled', data.mj_notify_enabled); | |
| if (data.chat_link) { | |
| // localStorage.setItem('chat_link', data.chat_link); | |
| } else { | |
| localStorage.removeItem('chat_link'); | |
| } | |
| if (data.chat_link2) { | |
| // localStorage.setItem('chat_link2', data.chat_link2); | |
| } else { | |
| localStorage.removeItem('chat_link2'); | |
| } | |
| if (data.docs_link) { | |
| localStorage.setItem('docs_link', data.docs_link); | |
| } else { | |
| localStorage.removeItem('docs_link'); | |
| } | |
| } | |
| export function setUserData(data) { | |
| localStorage.setItem('user', JSON.stringify(data)); | |
| } | |