kopia-ui: 0.20.0 -> 0.20.1 (#414529)

This commit is contained in:
Aleksana 2025-06-09 23:31:10 +08:00 committed by GitHub
commit a349954d22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 51 additions and 30 deletions

View File

@ -1,42 +1,63 @@
diff --git a/public/utils.js b/public/utils.js
index 3cd38b63..54152694 100644
index c5963e41..30f72965 100644
--- a/public/utils.js
+++ b/public/utils.js
@@ -17,7 +17,7 @@ const osShortName = function () {
@@ -17,7 +17,7 @@ const osShortName = (function () {
export function iconsPath() {
if (!app.isPackaged) {
- return path.join(__dirname, "..", "resources", osShortName, "icons");
+ return path.join(__dirname, "..", "..", "icons");
}
if (!app.isPackaged) {
- return path.join(__dirname, "..", "resources", osShortName, "icons");
+ return path.join(__dirname, "..", "..", "icons");
}
return path.join(process.resourcesPath, "icons");
@@ -25,26 +25,14 @@ export function iconsPath() {
return path.join(process.resourcesPath, "icons");
@@ -25,47 +25,14 @@ export function iconsPath() {
export function publicPath() {
if (!app.isPackaged) {
- return path.join(__dirname, "..", "public");
+ return path.join(__dirname, "..", "..", "public");
}
if (!app.isPackaged) {
- return path.join(__dirname, "..", "public");
+ return path.join(__dirname, "..", "..", "public");
}
return process.resourcesPath;
return process.resourcesPath;
}
export function defaultServerBinary() {
- if (!app.isPackaged) {
- return {
- "mac": path.join(__dirname, "..", "..", "dist", "kopia_darwin_amd64", "kopia"),
- "win": path.join(__dirname, "..", "..", "dist", "kopia_windows_amd64", "kopia.exe"),
- "linux": path.join(__dirname, "..", "..", "dist", "kopia_linux_amd64", "kopia"),
- }[osShortName]
- }
-
- if (!app.isPackaged) {
- return {
- "mac": path.join(process.resourcesPath, "server", "kopia"),
- "win": path.join(process.resourcesPath, "server", "kopia.exe"),
- "linux": path.join(process.resourcesPath, "server", "kopia"),
- }[osShortName]
+ return "KOPIA"
- mac: path.join(
- __dirname,
- "..",
- "..",
- "dist",
- "kopia_darwin_amd64",
- "kopia",
- ),
- win: path.join(
- __dirname,
- "..",
- "..",
- "dist",
- "kopia_windows_amd64",
- "kopia.exe",
- ),
- linux: path.join(
- __dirname,
- "..",
- "..",
- "dist",
- "kopia_linux_amd64",
- "kopia",
- ),
- }[osShortName];
- }
-
- return {
- mac: path.join(process.resourcesPath, "server", "kopia"),
- win: path.join(process.resourcesPath, "server", "kopia.exe"),
- linux: path.join(process.resourcesPath, "server", "kopia"),
- }[osShortName];
+ return "KOPIA";
}
export function selectByOS(x) {
return x[osShortName]
return x[osShortName];

View File

@ -10,12 +10,12 @@
kopia,
}:
let
version = "0.20.0";
version = "0.20.1";
src = fetchFromGitHub {
owner = "kopia";
repo = "kopia";
tag = "v${version}";
hash = "sha256-AM9Mpy+9ZCvEtFtzYC87vqCNpLxO+yWVd4th9DDQ2QI=";
hash = "sha256-hKtrHv7MQjA/AQ/frjP2tPT6zqVPPGnBxYuhWtUgIl0=";
};
in
buildNpmPackage {
@ -24,7 +24,7 @@ buildNpmPackage {
sourceRoot = "${src.name}/app";
npmDepsHash = "sha256-FXPfZnqpuI6NgHk81HEJ7Hj8xCpXD0BKJgFeQ/Oce04=";
npmDepsHash = "sha256-5gXM5aLsUsJhxbt6IKY4Sg4SBI9ATe248K1TyZThg/0=";
makeCacheWritable = true;
nativeBuildInputs = [