summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmegaRogue2023-08-26 19:14:58 +0200
committerOmegaRogue2023-08-26 19:14:58 +0200
commit61a3837a83afd7243541691c78019bd80938e0a2 (patch)
tree72aafa28ce17dc18f32f0f9162f6b9c63c9e95ac
parentd90d79436f84f9998eb2ce20176903a20dbf02ad (diff)
downloadaur-61a3837a83afd7243541691c78019bd80938e0a2.tar.gz
Apply pull request from source
Apply pull request https://github.com/theripper93/fvtt-player-client/pull/3
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD9
-rw-r--r--fvtt-desktop-client2
-rw-r--r--improve-button.patch64
4 files changed, 75 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9b926940f62a..0ed5cc79ca9f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = fvtt-player-client
pkgdesc = Foundry VTT Desktop Client
pkgver = 1.3.1
- pkgrel = 5
+ pkgrel = 7
url = https://github.com/theripper93/fvtt-player-client
arch = x86_64
license = MIT
@@ -15,8 +15,10 @@ pkgbase = fvtt-player-client
source = fvtt-player-client-1.3.1.tar.gz::https://github.com/theripper93/fvtt-player-client/archive/1.3.1.tar.gz
source = fvtt-desktop-client.desktop
source = fvtt-desktop-client
+ source = improve-button.patch
sha256sums = 3f867ade10d9168e6fd8fa4ef557471132e1cb49ed4ab5e13fd3433a8484603e
sha256sums = f23835dbdc669c2915ba44c650973a00c9606912c421fc36ff72092658df8b4a
- sha256sums = 1f4f21048dca93f23054363a4cd30aa0ad9cac21ca1f690f9cf43fad4b8106c8
+ sha256sums = db5c0491dad5e13a153b488a7a08229d8002a82b5471d26a0c98da285ed6fd9b
+ sha256sums = 4357ab2161a20fa6db1241eea2b3b8ab2db1cf30256c2ec47a7af5385e362ed8
pkgname = fvtt-player-client
diff --git a/PKGBUILD b/PKGBUILD
index be6e3adeeda4..d3527ad664dc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: OmegaRogue <omegarogue@omegavoid.codes>
pkgname=fvtt-player-client
pkgver=1.3.1
-pkgrel=5
+pkgrel=7
pkgdesc='Foundry VTT Desktop Client'
arch=('x86_64')
url='https://github.com/theripper93/fvtt-player-client'
@@ -11,12 +11,15 @@ makedepends=('git' 'yarn' 'npm' 'electron-builder')
provides=('fvtt-player-client')
source=("$pkgname-$pkgver.tar.gz::https://github.com/theripper93/${pkgname}/archive/${pkgver}.tar.gz"
fvtt-desktop-client.desktop
- fvtt-desktop-client)
+ fvtt-desktop-client
+ improve-button.patch)
sha256sums=('3f867ade10d9168e6fd8fa4ef557471132e1cb49ed4ab5e13fd3433a8484603e'
'f23835dbdc669c2915ba44c650973a00c9606912c421fc36ff72092658df8b4a'
- '1f4f21048dca93f23054363a4cd30aa0ad9cac21ca1f690f9cf43fad4b8106c8')
+ 'db5c0491dad5e13a153b488a7a08229d8002a82b5471d26a0c98da285ed6fd9b'
+ '4357ab2161a20fa6db1241eea2b3b8ab2db1cf30256c2ec47a7af5385e362ed8')
prepare() {
cd "$pkgname-$pkgver"
+ patch --binary -p1 -i "$srcdir/improve-button.patch"
yarn install
}
diff --git a/fvtt-desktop-client b/fvtt-desktop-client
index 79e50bbff97a..ed72828fa3f6 100644
--- a/fvtt-desktop-client
+++ b/fvtt-desktop-client
@@ -1,2 +1,2 @@
#!/bin/sh
-/usr/lib/fvtt-desktop-client/vtt-desktop-client
+/usr/lib/fvtt-desktop-client/vtt-desktop-client "$@"
diff --git a/improve-button.patch b/improve-button.patch
new file mode 100644
index 000000000000..4f61dcad3ec5
--- /dev/null
+++ b/improve-button.patch
@@ -0,0 +1,64 @@
+diff --git a/renderer.js b/renderer.js
+index 7e222fd..c45f689 100644
+--- a/renderer.js
++++ b/renderer.js
+@@ -30,13 +30,11 @@ async function createGameList() {
+ gameListJson.forEach((game) => {
+ const li = document.createElement("li");
+ li.classList.add("game-item");
+- li.innerHTML = `<div class="game-title-bar"><a>${game.name}</a> <button data-game-id="${game.id}" class="configure-game"><i class="fa-solid fa-gear"></i></button><div>`;
+- li.querySelector("a").onmousedown = (e) => {
+- if (e.button === 0) {
+- window.api.send("open-game", game.id ?? game.name);
+- window.location.href = game.url;
+- }
+- };
++ li.innerHTML = `<div class="game-title-bar"><button class="game-button"><a>${game.name}</a></button> <button data-game-id="${game.id}" class="configure-game"><i class="fa-solid fa-gear"/></button></div>`;
++ li.querySelector(".game-button").addEventListener("click", (e) => {
++ window.api.send("open-game", game.id ?? game.name);
++ window.location.href = game.url;
++ });
+ ul.appendChild(li);
+ li.querySelector(".configure-game").addEventListener("click", (e) => {
+ e.target.closest(".game-item").querySelector(".user-configuration").classList.toggle("hidden");
+diff --git a/style.css b/style.css
+index e9c941c..eaf9d66 100644
+--- a/style.css
++++ b/style.css
+@@ -91,7 +91,6 @@ button:hover {
+ justify-content: center;
+ align-items: center;
+ margin: 0.5rem 0;
+- padding: 0.5rem;
+ background-color: transparent;
+ border: 2px solid var(--color-text-primary);
+ color: var(--color-text-primary);
+@@ -127,6 +126,18 @@ button:hover {
+ transition: all 0.3s ease-in-out;
+ }
+
++.game-button {
++ cursor: pointer;
++ flex-grow: 1;
++ text-align: left;
++ border: none;
++ padding: 0.5rem;
++ margin: 0;
++}
++.game-button:hover {
++ border: none;
++}
++
+ .game-title-bar{
+ display: flex;
+ width: 100%;
+@@ -140,8 +151,7 @@ button:hover {
+ font-size: 1rem;
+ font-weight: 700;
+ padding: 0.2rem;
+- margin: 0;
+- margin-left: auto;
++ margin: 0 0.5rem 0 auto;
+ transition: all 0.3s ease-in-out;
+ cursor: pointer;
+ }