diff --git a/CHANGELOG.md b/CHANGELOG.md
index 218aedc..2b384c5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,4 +2,5 @@
> **Note** : This is an unstable release
- feat(web): Add new About page (#258) by @prayag17
- feat(web): Allow managing servers from settings dialog by @prayag17
- - feat(search): Add Episode to search by @prayag17
\ No newline at end of file
+ - feat(search): Add Episode to search by @prayag17
+ - feat(settings-server): Add a refretch button by @prayag17
\ No newline at end of file
diff --git a/src/components/settings/index.tsx b/src/components/settings/index.tsx
index fbaf7e8..2714c2b 100644
--- a/src/components/settings/index.tsx
+++ b/src/components/settings/index.tsx
@@ -8,6 +8,7 @@ import {
Fab,
FormControlLabel,
IconButton,
+ LinearProgress,
Link,
Skeleton,
Switch,
@@ -19,7 +20,7 @@ import {
withStyles,
} from "@mui/material";
import { AnimatePresence, motion, transform } from "framer-motion";
-import React, { useState } from "react";
+import React, { useEffect, useState } from "react";
import useSettingsStore, {
setSettingsDialogOpen,
setSettingsTabValue,
@@ -154,9 +155,12 @@ const Settings = () => {
if (bestServer) {
setServer(bestServer.systemInfo.Id, bestServer);
setAddServerDialog(false);
- enqueueSnackbar("Client added successfully", {
- variant: "success",
- });
+ enqueueSnackbar(
+ "Client added successfully. You might need to refresh client list.",
+ {
+ variant: "success",
+ },
+ );
}
},
onError: (err) => {
@@ -587,28 +591,38 @@ const Settings = () => {
);
})}
-
- setAddServerDialog(true)}
- style={{
- position: "absolute",
- bottom: "20px",
- right: "20px",
- }}
- >
-
+ serversOnDisk.refetch()}
+ size="medium"
+ color="info"
+ disabled={serversOnDisk.isFetching}
>
- add_circle
-
- Add server
-
+
+ autorenew
+
+
+ setAddServerDialog(true)}
+ >
+
+ add_circle
+
+ Add server
+
+
)}
diff --git a/src/components/settings/settings.module.scss b/src/components/settings/settings.module.scss
index 8ace15c..9c296f7 100644
--- a/src/components/settings/settings.module.scss
+++ b/src/components/settings/settings.module.scss
@@ -19,7 +19,7 @@
& .material-symbols-rounded{
justify-self: center !important;
}
-
+
}
&-scroll{
overflow-y: auto;
@@ -80,7 +80,7 @@
padding: 0 !important;
margin: 0 0 0.4em 0!important;
}
-
+
//serverList
&-server{
&-container{
@@ -90,40 +90,49 @@
align-items: center;
padding-bottom: 4.6em;
}
-
+
display: grid;
- grid-template-columns: 3.4em 1fr auto;
- justify-items: start;
- align-items: center;
- gap: 0.8em;
+ grid-template-columns: 3.4em 1fr auto;
+ justify-items: start;
+ align-items: center;
+ gap: 0.8em;
background: rgb(0 0 0 / 0.3);
padding: 1em;
width: 100%;
border-radius: $border-radius-default;
-
+
&-icon {
- font-size: 3.4em !important;
- font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 10, "opsz" 40;
-
- }
- &-info {
- display: flex;
- flex-direction: column;
- // width: 100%;
+ font-size: 3.4em !important;
+ font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 10, "opsz" 40;
+ }
+ &-info {
+ display: flex;
+ flex-direction: column;
+ // width: 100%;
&-version {
display: flex;
align-items: center;
gap:0.4em;
}
- }
- &-buttons {
- display: flex;
- flex-direction: row;
- gap: 0.5em;
- // width: 100%;
- overflow: hidden;
- }
-
+ }
+ &-buttons {
+ display: flex;
+ flex-direction: row;
+ gap: 0.5em;
+ // width: 100%;
+ overflow: hidden;
+ }
+
+ &-fab-container {
+ display: flex;
+ position: absolute;
+ bottom: 14px;
+ right: 14px;
+ align-items: center;
+ justify-content: center;
+ gap: 0.8em;
+ }
+
// Dialog
&-add {
display: flex;
@@ -135,6 +144,5 @@
}
.Mui-selected .material-symbols-rounded{
- font-variation-settings: "FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40;
-
+ font-variation-settings: "FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40;
}
\ No newline at end of file
diff --git a/src/styles/global.scss b/src/styles/global.scss
index ae464c7..58e5d52 100644
--- a/src/styles/global.scss
+++ b/src/styles/global.scss
@@ -199,6 +199,19 @@ h1 {
}
}
+.animate-rotate{
+ animation: rotation linear 1s infinite;
+}
+
+@keyframes rotation {
+ 0%{
+ transform: rotate(0deg);
+ }
+ 100%{
+ transform: rotate(360deg);
+ }
+}
+
@keyframes iconAnimation {
0% {
opacity: 1;