diff --git a/Website/modules/Search.tsx b/Website/modules/Search.tsx index 8fa0bb3..050e1e9 100644 --- a/Website/modules/Search.tsx +++ b/Website/modules/Search.tsx @@ -127,7 +127,7 @@ export default function Search({apiUri, jobInterval, closeSearch} : {apiUri: str : selectedConnector.supportedLanguages.map(language => )} - + Close Search
diff --git a/Website/modules/Settings.tsx b/Website/modules/Settings.tsx index 7a3f492..df8a09c 100644 --- a/Website/modules/Settings.tsx +++ b/Website/modules/Settings.tsx @@ -1,7 +1,7 @@ import IFrontendSettings from "./interfaces/IFrontendSettings"; import '../styles/settings.css'; import '../styles/react-toggle.css'; -import React, {LegacyRef, MutableRefObject, Ref, RefObject, useEffect, useRef, useState} from "react"; +import React, {useEffect, useRef, useState} from "react"; import INotificationConnector, {NotificationConnectorItem} from "./interfaces/INotificationConnector"; import NotificationConnectorFunctions from "./NotificationConnectorFunctions"; import ILocalLibrary, {LocalLibraryItem} from "./interfaces/ILocalLibrary"; @@ -61,13 +61,13 @@ export default function Settings({ backendConnected, apiUri, frontendSettings, s Close Settings setShowSettings(false)}/>
- +
- +

ApiUri

setFrontendSettings({...frontendSettings, apiUri:e.currentTarget.value})} id="ApiUri" />
- +

Default Job-Interval

setFrontendSettings({...frontendSettings, jobInterval: new Date(e.currentTarget.valueAsNumber-60*60*1000) ?? frontendSettings.jobInterval})}/>
@@ -121,6 +121,18 @@ export default function Settings({ backendConnected, apiUri, frontendSettings, s .finally(() => setLoadingBackend(false)); }} />
+
+

User Agent

+ { + if(backendSettings === null) + return; + setLoadingBackend(true); + BackendSettings.UpdateUserAgent(apiUri, e.currentTarget.value) + .then(() => setBackendSettings({...backendSettings, userAgent: e.currentTarget.value})) + .finally(() => setLoadingBackend(false)); + }} /> +

Request Limits:

@@ -142,24 +154,16 @@ export default function Settings({ backendConnected, apiUri, frontendSettings, s ChangeRequestLimit(RequestType.MangaCover, e.currentTarget.valueAsNumber)} />
-
- - { - if(backendSettings === null) - return; - setLoadingBackend(true); - BackendSettings.UpdateUserAgent(apiUri, e.currentTarget.value) - .then(() => setBackendSettings({...backendSettings, userAgent: e.currentTarget.value})) - .finally(() => setLoadingBackend(false)); - }} /> +
+

Notification Connectors:

+ {notificationConnectors.map(c => )} + +
+
+

Local Libraries:

+ {localLibraries.map(l => )} +
-

Notification Connectors:

- {notificationConnectors.map(c => )} - -

Local Libraries:

- {localLibraries.map(l => )} -
: null diff --git a/Website/modules/interfaces/IManga.tsx b/Website/modules/interfaces/IManga.tsx index ed02e7d..a69ad78 100644 --- a/Website/modules/interfaces/IManga.tsx +++ b/Website/modules/interfaces/IManga.tsx @@ -115,8 +115,8 @@ export function MangaItem({apiUri, mangaId, children} : {apiUri: string, mangaId setSettingThreshold(true); MangaFunctions.SetIgnoreThreshold(apiUri, mangaId, e.currentTarget.valueAsNumber).finally(()=>setSettingThreshold(false)); }} /> - - out of {latestChapterAvailable ? latestChapterAvailable.chapterNumber : } + + out of {latestChapterAvailable ? latestChapterAvailable.chapterNumber : } {children ? children.map(c => { if(c instanceof Element) diff --git a/Website/modules/interfaces/INotificationConnector.tsx b/Website/modules/interfaces/INotificationConnector.tsx index 271e104..4f9854a 100644 --- a/Website/modules/interfaces/INotificationConnector.tsx +++ b/Website/modules/interfaces/INotificationConnector.tsx @@ -74,7 +74,7 @@ function DefaultItem({apiUri, notificationConnector}:{apiUri: string, notificati disabled={notificationConnector != null} onChange={(e)=> setInfo({...info, body: e.currentTarget.value})} /> {notificationConnector != null ? null : ( -

Explanation Text

+

Formatting placeholders: "%title" and "%text" can be placed in url, header-values and body and will be replaced when notifications are sent

)}
{headerElements} @@ -93,7 +93,7 @@ function DefaultItem({apiUri, notificationConnector}:{apiUri: string, notificati NotificationConnectorFunctions.CreateNotificationConnector(apiUri, info) .finally(() => setLoading(false)); }}>Add - +
} diff --git a/Website/modules/interfaces/records/IGotifyRecord.tsx b/Website/modules/interfaces/records/IGotifyRecord.tsx index ee50e44..9f5f86b 100644 --- a/Website/modules/interfaces/records/IGotifyRecord.tsx +++ b/Website/modules/interfaces/records/IGotifyRecord.tsx @@ -45,7 +45,7 @@ export function GotifyItem ({apiUri} : {apiUri: string}) : ReactElement{ NotificationConnectorFunctions.CreateGotify(apiUri, record) .finally(() => setLoading(false)); }}>Add - + ; } \ No newline at end of file diff --git a/Website/modules/interfaces/records/ILunaseaRecord.tsx b/Website/modules/interfaces/records/ILunaseaRecord.tsx index d128e29..8bc2272 100644 --- a/Website/modules/interfaces/records/ILunaseaRecord.tsx +++ b/Website/modules/interfaces/records/ILunaseaRecord.tsx @@ -30,7 +30,7 @@ export function LunaseaItem ({apiUri} : {apiUri: string}) : ReactElement{ NotificationConnectorFunctions.CreateLunasea(apiUri, record) .finally(() => setLoading(false)); }}>Add - + ; } \ No newline at end of file diff --git a/Website/modules/interfaces/records/INtfyRecord.tsx b/Website/modules/interfaces/records/INtfyRecord.tsx index 5b4dd26..bbf68c3 100644 --- a/Website/modules/interfaces/records/INtfyRecord.tsx +++ b/Website/modules/interfaces/records/INtfyRecord.tsx @@ -56,7 +56,7 @@ export function NtfyItem ({apiUri} : {apiUri: string}) : ReactElement{ NotificationConnectorFunctions.CreateNtfy(apiUri, info) .finally(() => setLoading(false)); }}>Add - + ; } \ No newline at end of file diff --git a/Website/styles/loader.css b/Website/styles/loader.css index 4e39b09..c324cb9 100644 --- a/Website/styles/loader.css +++ b/Website/styles/loader.css @@ -12,6 +12,7 @@ span[is-loading="loading"] { position: fixed; background-color: var(--secondary-color); background-blend-mode: lighten; + margin: 25vh calc(sin(70)*(50% - 40px)); } span[is-loading="loading"]:before, diff --git a/Website/styles/settings.css b/Website/styles/settings.css index 9c72663..090bd57 100644 --- a/Website/styles/settings.css +++ b/Website/styles/settings.css @@ -16,16 +16,33 @@ #SettingsPopUpBody { display: flex; - flex-direction: column; + flex-flow: row wrap; justify-content: flex-start; } #SettingsPopUpBody > * { - margin: 5px auto; + margin: 5px 2px; border: 1px solid var(--primary-color); - padding: 5px; - width: calc(100% - 10px); border-radius: 5px; + padding: 0 5px; + max-width: calc(100% - 10px); + min-width: calc(30% - 10px); + flex-grow: 1; + flex-basis: 0; +} + +#SettingsPopUpBody > * > .LocalLibraryFunctions, #SettingsPopUpBody > * > div > .NotificationConnectorItem { + border: 1px solid var(--primary-color); + border-left: 0; + border-right: 0; + border-radius: 5px; + margin: 5px -5px -1px -5px; + padding: 5px; +} + +#SettingsPopUpBody > *:has(.NotificationConnectorItem) { + width: 100%; + flex-basis: 100%; } #SettingsPopUpBody label {