From 8676eb6dc3f7f132010cf1afcb447c91fb0f9802 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Thu, 19 Jan 2023 18:08:00 +0000 Subject: [PATCH] change attach and detach icons Signed-off-by: Arthur Lu --- images/actions/attach.svg | 14 +------------- images/actions/detach.svg | 14 +------------- scripts/config.js | 3 ++- scripts/utils.js | 4 ++++ 4 files changed, 8 insertions(+), 27 deletions(-) diff --git a/images/actions/attach.svg b/images/actions/attach.svg index a4ff573..f848fb8 100644 --- a/images/actions/attach.svg +++ b/images/actions/attach.svg @@ -1,13 +1 @@ - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/images/actions/detach.svg b/images/actions/detach.svg index 38ec92b..15190d7 100644 --- a/images/actions/detach.svg +++ b/images/actions/detach.svg @@ -1,13 +1 @@ - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/scripts/config.js b/scripts/config.js index 3d98cc5..9ac9658 100644 --- a/scripts/config.js +++ b/scripts/config.js @@ -1,4 +1,4 @@ -import {request, goToPage, getURIData} from "./utils.js"; +import {request, goToPage, getURIData, reload} from "./utils.js"; window.addEventListener("DOMContentLoaded", init); @@ -142,6 +142,7 @@ async function addDiskLine (fieldset, busPrefix, busName, device, disk) { action.src = `images/actions/${element}-${active}.svg`; action.title = `${element.charAt(0).toUpperCase()}${element.slice(1)} Disk`; } + action.id = `${busPrefix}${device}` actionDiv.append(action); }); field.append(actionDiv); diff --git a/scripts/utils.js b/scripts/utils.js index f2279b9..5c880d5 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -90,4 +90,8 @@ export function getURIData () { export function deleteAllCookies () { document.cookie.split(";").forEach(function(c) { document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/;domain=.tronnet.net;"); }); +} + +export function reload () { + window.location.reload(); } \ No newline at end of file