mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2024-11-16 17:07:36 +00: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;
|
||||
nettype: string;
|
||||
}
|
||||
|
||||
interface ApiResponse {
|
||||
status: string;
|
||||
message: string;
|
||||
data: null | object | object[];
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
|
|
|
@ -2,17 +2,10 @@
|
|||
import { invalidateAll, goto } from '$app/navigation';
|
||||
import { apiUri } from '$lib/utils/common';
|
||||
import { ProgressBar } from '@skeletonlabs/skeleton';
|
||||
|
||||
/** @type {import('./$types').PageData} */
|
||||
export let data;
|
||||
|
||||
/**
|
||||
* @typedef formResult
|
||||
* @type {object}
|
||||
* @property {string} status
|
||||
* @property {string} message
|
||||
* @property {null | object} data
|
||||
*/
|
||||
/** @type {formResult} */
|
||||
/** @type {ApiResponse} */
|
||||
export let formResult;
|
||||
|
||||
let isProcessing = false;
|
||||
|
@ -31,7 +24,6 @@
|
|||
isProcessing = false;
|
||||
|
||||
if (formResult.status === 'ok') {
|
||||
// rerun all `load` functions, following the successful update
|
||||
await invalidateAll();
|
||||
goto('/remote-nodes');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue