Chore: Fix Nix Build (Improper)

This commit is contained in:
Youwes09
2026-06-03 21:37:34 -05:00
parent db8a984270
commit 3e4d322fb7
24 changed files with 308 additions and 275 deletions
-22
View File
@@ -1,22 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<rect width="512" height="512" rx="112" ry="112" fill="#091209"/>
<g transform="translate(256,265) rotate(7) scale(0.098,-0.098) translate(-5000,-4800)" fill="#2d7a5f" stroke="none">
<path d="M4908 6615 c-597 -629 -935 -1264 -934 -1755 0 -508 195 -778 790
-1098 l194 -104 22 -114 c33 -164 76 -271 140 -347 80 -94 106 -62 77 94 -47
255 43 443 294 613 797 539 714 1392 -250 2551 -230 278 -224 275 -333 160z
m52 -945 c0 -472 -8 -850 -17 -850 -36 0 -693 703 -692 740 2 48 167 321 309
509 175 233 359 451 380 451 13 0 20 -304 20 -850z m183 775 c120 -126 357
-447 356 -482 0 -18 -47 -83 -105 -144 -57 -61 -151 -163 -208 -225 -151 -166
-146 -180 -146 406 0 286 7 520 16 520 9 0 48 -34 87 -75z m541 -750 c86 -150
196 -391 196 -430 0 -8 -25 -42 -55 -75 -31 -33 -149 -163 -264 -290 -339
-374 -480 -520 -501 -520 -13 0 -20 167 -20 465 l1 465 151 170 c83 94 193
217 244 275 122 138 137 135 248 -60z m-1098 -633 l374 -378 0 -462 c0 -254
-5 -462 -11 -462 -6 0 -55 23 -110 50 l-99 51 0 208 c0 259 -11 288 -176 457
-196 200 -188 199 -326 62 l-117 -116 -35 79 c-71 161 -39 569 64 816 42 100
20 116 436 -305z m1349 23 c109 -390 -87 -848 -475 -1111 -207 -139 -305 -262
-338 -420 -7 -31 -21 -56 -32 -56 -36 -1 -46 86 -48 405 l-2 313 123 137 c68
75 214 236 325 357 454 493 421 466 447 375z m-1292 -785 c12 -29 15 -118 7
-215 l-14 -166 -73 44 c-174 104 -403 341 -403 416 0 15 47 70 105 123 l104
98 127 -125 c70 -69 136 -147 147 -175z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

@@ -155,6 +155,9 @@
</button>
{/if}
</div>
<div class="s-row">
<div class="s-row-info"><span class="s-label">Platform</span><span class="s-desc">{platformService.platform}</span></div>
</div>
{#if onLatestVersion}
<div class="s-row">
<span class="s-desc" style="color:var(--accent-fg)">✓ You're on the latest version.</span>
+2
View File
@@ -4,6 +4,7 @@ import * as chapters from "./chapters";
import * as downloads from "./downloads";
import * as manga from "./manga";
import * as tracking from "./tracking";
import * as meta from "./meta";
let adapter: ServerAdapter;
@@ -21,6 +22,7 @@ export function clearPageCache(chapterId?: number): void {
}
export const requestManager = {
meta,
extensions,
chapters,
downloads,
+9
View File
@@ -0,0 +1,9 @@
import { getAdapter } from "$lib/request-manager";
export async function getAboutServer() {
return getAdapter().getAboutServer();
}
export async function getAboutWebUI() {
return getAdapter().getAboutWebUI();
}
+16
View File
@@ -14,6 +14,8 @@ import type {
SetSocksProxyInput,
SetFlareSolverrInput,
TrackRecordPatch,
AboutServer,
AboutWebUI,
} from '$lib/server-adapters/types'
import type { DownloadStatus } from '$lib/types/api'
import type { Manga, Chapter, Extension, Source, Tracker, TrackRecord, Category } from '$lib/types'
@@ -84,6 +86,10 @@ import {
TRACK_PROGRESS,
UPDATE_TRACK,
} from './tracking'
import {
GET_ABOUT_SERVER,
GET_ABOUT_WEBUI,
} from './meta'
import {
type GQLResponse,
mapManga,
@@ -205,6 +211,16 @@ export class SuwayomiAdapter implements ServerAdapter {
return json.data
}
async getAboutServer(): Promise<AboutServer> {
const data = await this.gql<{ aboutServer: AboutServer }>(GET_ABOUT_SERVER)
return data.aboutServer
}
async getAboutWebUI(): Promise<AboutWebUI> {
const data = await this.gql<{ aboutWebUI: AboutWebUI }>(GET_ABOUT_WEBUI)
return data.aboutWebUI
}
async getManga(id: string): Promise<Manga> {
const data = await this.gql<{ manga: Record<string, unknown> }>(GET_MANGA, { id: Number(id) })
return mapManga(data.manga)
+39
View File
@@ -0,0 +1,39 @@
export const GET_ABOUT_SERVER = `
query GetAboutServer {
aboutServer {
name version buildType buildTime github discord
}
}
`
export const GET_ABOUT_WEBUI = `
query GetAboutWebUI {
aboutWebUI {
channel tag updateTimestamp
}
}
`
export const CHECK_FOR_SERVER_UPDATES = `
query CheckForServerUpdates {
checkForServerUpdates {
channel tag url
}
}
`
export const GET_META = `
query GetMeta($key: String!) {
meta(key: $key) {
key value
}
}
`
export const GET_METAS = `
query GetMetas {
metas {
nodes { key value }
}
}
`
+18
View File
@@ -43,6 +43,21 @@ export interface Page {
imageData?: string
}
export interface AboutServer {
name: string
version: string
buildType: string
buildTime: number
github: string
discord: string
}
export interface AboutWebUI {
channel: string
tag: string
updateTimestamp: number
}
export interface DownloadItem {
chapterId: string
mangaId: string
@@ -140,6 +155,9 @@ export interface ServerAdapter {
setChapterMeta(chapterId: string, key: string, value: string): Promise<void>
deleteChapterMeta(chapterId: string, key: string): Promise<void>
getAboutServer(): Promise<AboutServer>
getAboutWebUI(): Promise<AboutWebUI>
getDownloads(): Promise<DownloadItem[]>
getDownloadStatus(): Promise<DownloadStatus>
enqueueDownload(chapterId: string): Promise<void>
+5 -4
View File
@@ -4,8 +4,8 @@ import { platformService } from '$lib/platform-service'
import { probeServer, loginBasic, loginUI } from '$lib/core/auth'
import { appState } from '$lib/state/app.svelte'
const MAX_ATTEMPTS = 15
const BG_MAX_ATTEMPTS = 60
const MAX_ATTEMPTS = 40
const BG_MAX_ATTEMPTS = 120
export const boot = $state({
failed: false,
@@ -70,6 +70,7 @@ export function startProbe(
authMode: 'NONE' | 'BASIC_AUTH' | 'UI_LOGIN' = 'NONE',
user = '',
pass = '',
initialDelay = 100,
) {
const gen = ++probeGeneration
boot.failed = false
@@ -89,10 +90,10 @@ export function startProbe(
if (result === 'auth_required') { handleAuthRequired(gen, authMode, user, pass); return }
if (tries >= MAX_ATTEMPTS) { boot.failed = true; appState.status = 'error'; startBackgroundProbe(gen, authMode, user, pass); return }
setTimeout(probe, Math.min(300 + tries * 150, 1500))
setTimeout(probe, Math.min(500 + tries * 200, 2000))
}
setTimeout(probe, 100)
setTimeout(probe, initialDelay)
}
function startBackgroundProbe(