aboutsummaryrefslogtreecommitdiff
path: root/intimate
diff options
context:
space:
mode:
authorStarscouts <starscouts@equestria.dev>2024-07-14 14:28:01 +0200
committerStarscouts <starscouts@equestria.dev>2024-07-14 14:28:01 +0200
commit361fe53a7e8a48e42ac8d7f4c07f33bf4ed178e2 (patch)
treef559784cd9a076c27fa6cd904641176efec89a6a /intimate
parent1bbe60d3a237cfe99dc6d1a3aa14de542668dc6f (diff)
downloadfaunerie-361fe53a7e8a48e42ac8d7f4c07f33bf4ed178e2.tar.gz
faunerie-361fe53a7e8a48e42ac8d7f4c07f33bf4ed178e2.tar.bz2
faunerie-361fe53a7e8a48e42ac8d7f4c07f33bf4ed178e2.zip
Fixes for WindowsHEADmane
Diffstat (limited to 'intimate')
-rw-r--r--[-rwxr-xr-x]intimate/TODO.md0
-rw-r--r--[-rwxr-xr-x]intimate/bs5/bootstrap.bundle.min.js0
-rw-r--r--[-rwxr-xr-x]intimate/bs5/bootstrap.bundle.min.js.map0
-rw-r--r--[-rwxr-xr-x]intimate/bs5/bootstrap.min.css0
-rw-r--r--[-rwxr-xr-x]intimate/bs5/bootstrap.min.css.map0
-rw-r--r--[-rwxr-xr-x]intimate/build.sh3
-rw-r--r--[-rwxr-xr-x]intimate/default.toml0
-rw-r--r--[-rwxr-xr-x]intimate/fullscreen.html0
-rw-r--r--[-rwxr-xr-x]intimate/index.html1
-rw-r--r--[-rwxr-xr-x]intimate/index.js14
-rw-r--r--[-rwxr-xr-x]intimate/loader.svg0
-rw-r--r--[-rwxr-xr-x]intimate/package-lock.json0
-rw-r--r--[-rwxr-xr-x]intimate/package.json0
-rw-r--r--[-rwxr-xr-x]intimate/src/actions.js0
-rw-r--r--[-rwxr-xr-x]intimate/src/display.js0
-rw-r--r--[-rwxr-xr-x]intimate/src/fetcher.js1
-rw-r--r--[-rwxr-xr-x]intimate/src/keyboard.js0
17 files changed, 10 insertions, 9 deletions
diff --git a/intimate/TODO.md b/intimate/TODO.md
index 35bbf5f..35bbf5f 100755..100644
--- a/intimate/TODO.md
+++ b/intimate/TODO.md
diff --git a/intimate/bs5/bootstrap.bundle.min.js b/intimate/bs5/bootstrap.bundle.min.js
index d705b8d..d705b8d 100755..100644
--- a/intimate/bs5/bootstrap.bundle.min.js
+++ b/intimate/bs5/bootstrap.bundle.min.js
diff --git a/intimate/bs5/bootstrap.bundle.min.js.map b/intimate/bs5/bootstrap.bundle.min.js.map
index 17a1e03..17a1e03 100755..100644
--- a/intimate/bs5/bootstrap.bundle.min.js.map
+++ b/intimate/bs5/bootstrap.bundle.min.js.map
diff --git a/intimate/bs5/bootstrap.min.css b/intimate/bs5/bootstrap.min.css
index aac8bee..aac8bee 100755..100644
--- a/intimate/bs5/bootstrap.min.css
+++ b/intimate/bs5/bootstrap.min.css
diff --git a/intimate/bs5/bootstrap.min.css.map b/intimate/bs5/bootstrap.min.css.map
index e504478..e504478 100755..100644
--- a/intimate/bs5/bootstrap.min.css.map
+++ b/intimate/bs5/bootstrap.min.css.map
diff --git a/intimate/build.sh b/intimate/build.sh
index 3917ff6..6eaf025 100755..100644
--- a/intimate/build.sh
+++ b/intimate/build.sh
@@ -1,5 +1,2 @@
-#npx electron-packager . Intimate --overwrite --platform=darwin --arch=arm64 --icon=./logo/logo-round.ico --out=./build
npx electron-packager . Intimate --overwrite --platform=darwin --arch=arm64 --out=./build
npx electron-packager . Intimate --overwrite --platform=win32 --arch=x64 --out=./build
-/Library/Atomic/SDK/convert_darwin_arm64.sh ./build/Intimate-darwin-arm64/Intimate.app || /Volumes/Projects/atomic/converter/convert_darwin_arm64.sh ./build/Intimate-darwin-arm64/Intimate.app
-/Library/Atomic/SDK/convert_windows_x64.sh ./build/Intimate-win32-x64 || /Volumes/Projects/atomic/converter/convert_windows_x64.sh ./build/Intimate-win32-x64
diff --git a/intimate/default.toml b/intimate/default.toml
index 57d5d7d..57d5d7d 100755..100644
--- a/intimate/default.toml
+++ b/intimate/default.toml
diff --git a/intimate/fullscreen.html b/intimate/fullscreen.html
index 8e9f6d6..8e9f6d6 100755..100644
--- a/intimate/fullscreen.html
+++ b/intimate/fullscreen.html
diff --git a/intimate/index.html b/intimate/index.html
index aa8eac0..3fc0e32 100755..100644
--- a/intimate/index.html
+++ b/intimate/index.html
@@ -126,6 +126,7 @@
if (!config.modules.derpibooru['faunerie_cache']) return i;
if (!fs.existsSync(config.modules.derpibooru['faunerie_cache'] + "/images/" + i['sha512_hash'].substring(0, 1) + "/" + i['sha512_hash'].substring(0, 2) + "/" + i['sha512_hash'].substring(0, 3) + "/10" + i['id'] + ".bin")) return i;
i['view_url'] = "pbip://" + config.modules.derpibooru['faunerie_cache'] + "/images/" + i['sha512_hash'].substring(0, 1) + "/" + i['sha512_hash'].substring(0, 2) + "/" + i['sha512_hash'].substring(0, 3) + "/10" + i['id'] + ".bin";
+ if (process.platform === "win32") i['view_url'] = i['view_url'].replaceAll("\\", "/").replaceAll("pbip://", "pbip:///");
return i;
})[0]["view_url"];
diff --git a/intimate/index.js b/intimate/index.js
index 620398c..be295e3 100755..100644
--- a/intimate/index.js
+++ b/intimate/index.js
@@ -22,6 +22,10 @@ function createWindow () {
fullscreenable: false,
simpleFullscreen: true,
titleBarStyle: "hidden",
+ titleBarOverlay: {
+ color: "#21252977",
+ symbolColor: "#ffffff"
+ },
backgroundColor: "#212529",
autoHideMenuBar: true,
webPreferences: {
@@ -98,9 +102,11 @@ Menu.setApplicationMenu(menu);
app.whenReady().then(() => {
protocol.handle('pbip', async (req) => {
- const { pathname, searchParams } = new URL(req.url);
+ let { pathname, searchParams } = new URL(req.url);
let mime = searchParams.get("mime") ?? "application/octet-stream";
+ if (process.platform === "win32") pathname = pathname.substring(1);
+
const inflateRawSync = util.promisify(zlib.inflateRaw);
try {
@@ -140,11 +146,6 @@ app.on('window-all-closed', () => {
app.quit();
});
-app.on('before-quit', () => {
- try { if (mainWindow) mainWindow.close(); } catch (e) { console.error(e); }
- try { if (mainWindow) fullscreenWindow.close(); } catch (e) { console.error(e); }
-});
-
ipcMain.on('start', (_, prefs, config) => {
preferences = prefs;
globalConfig = config;
@@ -158,6 +159,7 @@ ipcMain.on('start', (_, prefs, config) => {
resizable: false,
maximizable: false,
minimizable: false,
+ autoHideMenuBar: true,
webPreferences: {
nodeIntegration: true,
contextIsolation: false
diff --git a/intimate/loader.svg b/intimate/loader.svg
index df4bd90..df4bd90 100755..100644
--- a/intimate/loader.svg
+++ b/intimate/loader.svg
diff --git a/intimate/package-lock.json b/intimate/package-lock.json
index 8409912..8409912 100755..100644
--- a/intimate/package-lock.json
+++ b/intimate/package-lock.json
diff --git a/intimate/package.json b/intimate/package.json
index 8bbd20a..8bbd20a 100755..100644
--- a/intimate/package.json
+++ b/intimate/package.json
diff --git a/intimate/src/actions.js b/intimate/src/actions.js
index 2590656..2590656 100755..100644
--- a/intimate/src/actions.js
+++ b/intimate/src/actions.js
diff --git a/intimate/src/display.js b/intimate/src/display.js
index 921cdee..921cdee 100755..100644
--- a/intimate/src/display.js
+++ b/intimate/src/display.js
diff --git a/intimate/src/fetcher.js b/intimate/src/fetcher.js
index 4375fe5..f5eb236 100755..100644
--- a/intimate/src/fetcher.js
+++ b/intimate/src/fetcher.js
@@ -99,6 +99,7 @@ async function slideshowMain() {
if (!config.modules.derpibooru['faunerie_cache']) return i;
if (!fs.existsSync(config.modules.derpibooru['faunerie_cache'] + "/images/" + i['sha512_hash'].substring(0, 1) + "/" + i['sha512_hash'].substring(0, 2) + "/" + i['sha512_hash'].substring(0, 3) + "/10" + i['id'] + ".bin")) return i;
i['view_url'] = "pbip://" + config.modules.derpibooru['faunerie_cache'] + "/images/" + i['sha512_hash'].substring(0, 1) + "/" + i['sha512_hash'].substring(0, 2) + "/" + i['sha512_hash'].substring(0, 3) + "/10" + i['id'] + ".bin";
+ if (process.platform === "win32") i['view_url'] = i['view_url'].replaceAll("\\", "/").replaceAll("pbip://", "pbip:///");
return i;
}));
window.displayQueue = window.displayQueue.sort(() => Math.random() - Math.random());
diff --git a/intimate/src/keyboard.js b/intimate/src/keyboard.js
index 26916bb..26916bb 100755..100644
--- a/intimate/src/keyboard.js
+++ b/intimate/src/keyboard.js