mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2025-01-08 05:52:10 +07:00
Use app.d.ts for jsdoc
This commit is contained in:
parent
ef6d2a481f
commit
394f5654c6
2 changed files with 8 additions and 10 deletions
6
frontend/src/app.d.ts
vendored
6
frontend/src/app.d.ts
vendored
|
@ -22,6 +22,12 @@ declare global {
|
||||||
is_available: boolean;
|
is_available: boolean;
|
||||||
nettype: string;
|
nettype: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface ApiResponse {
|
||||||
|
status: string;
|
||||||
|
message: string;
|
||||||
|
data: null | object | object[];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export {};
|
export {};
|
||||||
|
|
|
@ -2,17 +2,10 @@
|
||||||
import { invalidateAll, goto } from '$app/navigation';
|
import { invalidateAll, goto } from '$app/navigation';
|
||||||
import { apiUri } from '$lib/utils/common';
|
import { apiUri } from '$lib/utils/common';
|
||||||
import { ProgressBar } from '@skeletonlabs/skeleton';
|
import { ProgressBar } from '@skeletonlabs/skeleton';
|
||||||
|
|
||||||
/** @type {import('./$types').PageData} */
|
/** @type {import('./$types').PageData} */
|
||||||
export let data;
|
export let data;
|
||||||
|
/** @type {ApiResponse} */
|
||||||
/**
|
|
||||||
* @typedef formResult
|
|
||||||
* @type {object}
|
|
||||||
* @property {string} status
|
|
||||||
* @property {string} message
|
|
||||||
* @property {null | object} data
|
|
||||||
*/
|
|
||||||
/** @type {formResult} */
|
|
||||||
export let formResult;
|
export let formResult;
|
||||||
|
|
||||||
let isProcessing = false;
|
let isProcessing = false;
|
||||||
|
@ -31,7 +24,6 @@
|
||||||
isProcessing = false;
|
isProcessing = false;
|
||||||
|
|
||||||
if (formResult.status === 'ok') {
|
if (formResult.status === 'ok') {
|
||||||
// rerun all `load` functions, following the successful update
|
|
||||||
await invalidateAll();
|
await invalidateAll();
|
||||||
goto('/remote-nodes');
|
goto('/remote-nodes');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue