Добавление настроек и их функциональности
Some checks failed
ci/woodpecker/manual/woodpecker Pipeline failed

This commit is contained in:
test 2025-07-04 15:07:41 +05:00
parent 4257864b3d
commit ee350c1852
23 changed files with 368 additions and 91 deletions

View file

@ -1,10 +1,25 @@
export const networkSettings = [
import {useIpStore} from "../../ipStore";
import {NetworkService} from "../../../api/request";
const createNetworkSettings = () => {
const { ipAddress } = useIpStore.getState();
return [
{
id: 'clean-network',
type: 'button',
label: 'Очистить данные сессии',
sectionId: 'Точки доступа',
defaultValue: 'Очистить',
action: async ()=>{
try {
const res = await NetworkService.clearNetwork(ipAddress);
console.log(res);
}catch (e){
console.error(e);
alert('Данные не были удалены: '+ e)
}
},
},
{
id: 'export-network',
@ -13,4 +28,7 @@ export const networkSettings = [
sectionId: 'Точки доступа',
defaultValue: 'Экспортировать',
},
] as const;
] as const;
};
export const networkSettings = createNetworkSettings();