[BETA] Added Source Switching & Fixed Extensions Filter

This commit is contained in:
Youwes09
2026-02-21 15:06:00 -06:00
parent d7750e2dfd
commit 0e896e69ab
3 changed files with 30 additions and 8 deletions
+6 -1
View File
@@ -25,11 +25,14 @@
- Full manga reader with keyboard navigation - Full manga reader with keyboard navigation
- Chapter download queue - Chapter download queue
- Extension and source management - Extension and source management
- Source migration with read progress transfer
- Cross-source search
- Reading history tracking - Reading history tracking
## Requirements ## Requirements
[Suwayomi-Server](https://github.com/Suwayomi/Suwayomi-Server) must be running at `http://127.0.0.1:4567`. [Suwayomi-Server](https://github.com/Suwayomi/Suwayomi-Server) must be running at `http://127.0.0.1:4567`.
> Note: The application does also launch the server on start-up by itself, so only the package is required on path.
## Installation ## Installation
@@ -59,9 +62,11 @@ nix build
```bash ```bash
nix develop nix develop
pnpm install pnpm install
pnpm tauri dev pnpm tauri:dev
``` ```
> `tauri:dev` uses `src-tauri/tauri.dev.conf.json` to set the Vite dev server URL, keeping the release build config clean for `nix build`.
## Stack ## Stack
| | | | | |
+23 -6
View File
@@ -51,13 +51,30 @@
gsettings-desktop-schemas gsettings-desktop-schemas
]; ];
# Frontend (Vite/TypeScript) built as a separate derivation. # Only rebuild the frontend when files that actually affect the output change.
# Update `hash` whenever pnpm-lock.yaml changes: # Changing flake.nix, README.md, src-tauri/*, etc. won't invalidate the cache.
# nix build .#frontend 2>&1 | grep "got:" frontendSrc = lib.cleanSourceWith {
src = ./.;
filter = path: type:
let base = builtins.baseNameOf path;
in
(lib.hasInfix "/src" path)
|| base == "index.html"
|| base == "package.json"
|| base == "pnpm-lock.yaml"
|| base == "tsconfig.json"
|| base == "tsconfig.node.json"
|| base == "vite.config.ts"
|| base == "postcss.config.js"
|| base == "postcss.config.cjs"
|| base == "tailwind.config.js"
|| base == "tailwind.config.ts";
};
frontend = pkgs.stdenv.mkDerivation { frontend = pkgs.stdenv.mkDerivation {
pname = "moku-frontend"; pname = "moku-frontend";
version = "0.1.0"; version = "0.1.0";
src = lib.cleanSource ./.; src = frontendSrc;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
nodejs_22 nodejs_22
@@ -68,7 +85,7 @@
pnpmDeps = pkgs.fetchPnpmDeps { pnpmDeps = pkgs.fetchPnpmDeps {
pname = "moku-frontend"; pname = "moku-frontend";
version = "0.1.0"; version = "0.1.0";
src = lib.cleanSource ./.; src = frontendSrc;
fetcherVersion = 1; fetcherVersion = 1;
hash = "sha256-2Hdzsjwbb+CKiRn/nGHwLeysKvpvEhd5C213YgWmOSU="; hash = "sha256-2Hdzsjwbb+CKiRn/nGHwLeysKvpvEhd5C213YgWmOSU=";
}; };
@@ -152,7 +169,7 @@
export XDG_DATA_DIRS="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}''${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}" export XDG_DATA_DIRS="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}''${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}"
echo "Moku dev shell" echo "Moku dev shell"
echo " pnpm install && pnpm tauri dev" echo " pnpm install && pnpm tauri:dev"
''; '';
}; };
+1 -1
View File
@@ -486,7 +486,7 @@ export default function SeriesDetail() {
manga={manga} manga={manga}
currentChapters={chapters} currentChapters={chapters}
onClose={() => setMigrateOpen(false)} onClose={() => setMigrateOpen(false)}
onMigrated={(newManga) => { onMigrated={(newManga: Manga) => {
setMigrateOpen(false); setMigrateOpen(false);
setActiveManga(newManga); setActiveManga(newManga);
}} }}