mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-06-12 06:47:53 +02:00
Reimplemented Library and Notification connectors
Added Test and Rest API calls, API side will need to be updated. Separated out CSS files for future expansion.
This commit is contained in:
@ -3,7 +3,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Tranga</title>
|
||||
<link id='pagestyle' rel="stylesheet" href="styles/style_default.css">
|
||||
<link id='basestyle' rel="stylesheet" href="styles/base.css">
|
||||
<link id='librarystyle' rel="stylesheet" href="styles/style_default.css">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
@ -56,11 +57,83 @@
|
||||
<blur-background id="blurBackgroundSettingsPopup" onclick="
|
||||
settingsPopup.style.display = 'none';"></blur-background>
|
||||
<popup-window>
|
||||
<titlebar>
|
||||
<border-bar>
|
||||
<popup-title>Settings</popup-title>
|
||||
<popup-close onclick="settingsPopup.style.display = 'none'">×</popup-close>
|
||||
</titlebar>
|
||||
</border-bar>
|
||||
<popup-content>
|
||||
|
||||
<div class="popup-section">
|
||||
TRANGA
|
||||
</div>
|
||||
|
||||
<div class="popup-section">
|
||||
MANGA SOURCES
|
||||
</div>
|
||||
|
||||
<div class="popup-section">
|
||||
LIBRARY CONNECTORS
|
||||
<div class="section-content">
|
||||
<div class="section-item">
|
||||
<span class="title"><img src='connector-icons/komga.svg'>Komga<connector-configured id="komgaConfigured"></connector-configured></span>
|
||||
<label for="komgaUrl"></label><input placeholder="URL" id="komgaUrl" type="text">
|
||||
<label for="komgaUsername"></label><input placeholder="Username" id="komgaUsername" type="text">
|
||||
<label for="komgaPassword"></label><input placeholder="Password" id="komgaPassword" type="password">
|
||||
<div class="section-buttons-container">
|
||||
<span onclick="TestKomga(komgaUrl.value, utf8_to_b64(`${komgaUsername.value}:${komgaPassword.value}`))" class='section-button' id="test-connector">Test</span>
|
||||
<span onclick="ClearKomga()" class='section-button' id="reset">Reset</span>
|
||||
<span onclick="UpdateKomga(komgaUrl.value, utf8_to_b64(`${komgaUsername.value}:${komgaPassword.value}`))" class='section-button'>Apply</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section-item">
|
||||
<span class="title"><img src='connector-icons/kavita.png'>Kavita<connector-configured id="kavitaConfigured"></connector-configured></span>
|
||||
<label for="kavitaUrl"></label><input placeholder="URL" id="kavitaUrl" type="text">
|
||||
<label for="kavitaUsername"></label><input placeholder="Username" id="kavitaUsername" type="text">
|
||||
<label for="kavitaPassword"></label><input placeholder="Password" id="kavitaPassword" type="password">
|
||||
<div class="section-buttons-container">
|
||||
<span onclick="TestKavita(kavitaUrl.value, kavitaUsername.value, kavitaPassword.value)" class='section-button' id="test-connector">Test</span>
|
||||
<span onclick="ClearKavita()" class='section-button' id="reset">Reset</span>
|
||||
<span onclick="UpdateKavita(kavitaUrl.value, kavitaUsername.value, kavitaPassword.value)" class='section-button'>Apply</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="popup-section">
|
||||
NOTIFICATION CONNECTORS
|
||||
<div class="section-content">
|
||||
<div class="section-item">
|
||||
<span class="title"><img src='connector-icons/gotify-logo.png'>Gotify<connector-configured id="gotifyConfigured"></connector-configured></span>
|
||||
<label for="gotifyUrl"></label><input placeholder="URL" id="gotifyUrl" type="text">
|
||||
<label for="gotifyAppToken"></label><input placeholder="App-Token" id="gotifyAppToken" type="text">
|
||||
<div class="section-buttons-container">
|
||||
<span onclick="TestGotify(gotifyUrl.value, gotifyAppToken.value)" class='section-button' id="test-connector">Test</span>
|
||||
<span onclick="ClearGotify()" class='section-button' id="reset">Reset</span>
|
||||
<span onclick="UpdateGotify(gotifyUrl.value, gotifyAppToken.value)" class='section-button'>Apply</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section-item">
|
||||
<span class="title"><img src='connector-icons/lunasea.png'>LunaSea<connector-configured id="lunaseaConfigured"></connector-configured></span>
|
||||
<label for="lunaseaWebhook"></label><input placeholder="device/:id or user/:id" id="lunaseaWebhook" type="text">
|
||||
<div class="section-buttons-container">
|
||||
<span onclick="TestLunaSea(lunaseaWebhook.value);" class='section-button' id="test-connector">Test</span>
|
||||
<span onclick="ClearLunasea()" class='section-button' id="reset">Reset</span>
|
||||
<span onclick="UpdateLunaSea(lunaseaWebhook.value);" class='section-button'>Apply</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section-item">
|
||||
<span class="title"><img src='connector-icons/ntfy.svg'>Ntfy<connector-configured id="ntfyConfigured"></connector-configured></span>
|
||||
<label for="ntfyEndpoint"></label><input placeholder="URL" id="ntfyEndpoint" type="text">
|
||||
<label for="ntfyAuth"></label><input placeholder="Auth" id="ntfyAuth" type="text">
|
||||
<div class="section-buttons-container">
|
||||
<span onclick="TestNtfy(ntfyEndpoint.value, ntfyAuth.value);" class='section-button' id="test-connector">Test</span>
|
||||
<span onclick="ClearNtfy()" class='section-button' id="reset">Reset</span>
|
||||
<span onclick="UpdateNtfy(ntfyEndpoint.value, ntfyAuth.value);" class='section-button'>Apply</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p class="title">Download Location:</p>
|
||||
<span id="downloadLocation"></span>
|
||||
@ -69,37 +142,6 @@
|
||||
<p class="title">API-URI</p>
|
||||
<label for="settingApiUri"></label><input placeholder="https://" type="text" id="settingApiUri">
|
||||
</div>
|
||||
<div>
|
||||
<span class="title">Komga</span>
|
||||
<div>Configured: <span id="komgaConfigured">✅❌</span></div>
|
||||
<label for="komgaUrl"></label><input placeholder="URL" id="komgaUrl" type="text">
|
||||
<label for="komgaUsername"></label><input placeholder="Username" id="komgaUsername" type="text">
|
||||
<label for="komgaPassword"></label><input placeholder="Password" id="komgaPassword" type="password">
|
||||
</div>
|
||||
<div>
|
||||
<span class="title">Kavita</span>
|
||||
<div>Configured: <span id="kavitaConfigured">✅❌</span></div>
|
||||
<label for="kavitaUrl"></label><input placeholder="URL" id="kavitaUrl" type="text">
|
||||
<label for="kavitaUsername"></label><input placeholder="Username" id="kavitaUsername" type="text">
|
||||
<label for="kavitaPassword"></label><input placeholder="Password" id="kavitaPassword" type="password">
|
||||
</div>
|
||||
<div>
|
||||
<span class="title">Gotify</span>
|
||||
<div>Configured: <span id="gotifyConfigured">✅❌</span></div>
|
||||
<label for="gotifyUrl"></label><input placeholder="URL" id="gotifyUrl" type="text">
|
||||
<label for="gotifyAppToken"></label><input placeholder="App-Token" id="gotifyAppToken" type="text">
|
||||
</div>
|
||||
<div>
|
||||
<span class="title">LunaSea</span>
|
||||
<div>Configured: <span id="lunaseaConfigured">✅❌</span></div>
|
||||
<label for="lunaseaWebhook"></label><input placeholder="device/:id or user/:id" id="lunaseaWebhook" type="text">
|
||||
</div>
|
||||
<div>
|
||||
<span class="title">Ntfy</span>
|
||||
<div>Configured: <span id="ntfyConfigured">✅❌</span></div>
|
||||
<label for="ntfyEndpoint"></label><input placeholder="URL" id="ntfyEndpoint" type="text">
|
||||
<label for="ntfyAuth"></label><input placeholder="Auth" id="ntfyAuth" type="text">
|
||||
</div>
|
||||
<div>
|
||||
<span class="title">UserAgent</span><br />
|
||||
<label for="userAgent"></label><input style="width: 400px" placeholder="UserAgent" id="userAgent" type="text">
|
||||
@ -108,13 +150,14 @@
|
||||
<input type="checkbox" id="mangaHoverCheckbox" name="css-style" value="style_mangahover.css" onclick="updateCSS()">
|
||||
<label for="css-style"> Show manga titles and sources on hover</label><br>
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="Refresh Library Metadata" style="width: fit-content;"onclick="RefreshLibraryMetadata()">
|
||||
</div>
|
||||
</popup-content>
|
||||
<titlebar>
|
||||
<apply-settings onclick="UpdateSettings()">Apply Settings</apply-settings>
|
||||
</titlebar>
|
||||
<border-bar>
|
||||
<div class="button-container">
|
||||
<border-bar-button onclick="RefreshLibraryMetadata()">Refresh Library Metadata</border-bar-button>
|
||||
<border-bar-button class="primary" onclick="UpdateSettings()">Apply Settings</border-bar-button>
|
||||
</div>
|
||||
</border-bar>
|
||||
|
||||
</popup-window>
|
||||
</popup>
|
||||
|
||||
|
Reference in New Issue
Block a user