diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 00000000..5e32e7e6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Zergling_man, from fedora.email + +pkgname=thedesk +_pkgname=TheDesk +pkgver=24.2.0 +_electronversion=22 +pkgrel=2 +pkgdesc="Mastodon Client for PC, Zergling_man's pleroma-focused fork." +arch=("x86_64") +url="https://thedesk.top/" +license=('GPL3') +conflicts=("${pkgname%-bin}") +depends=("npm") +makedepends=("npm") +optdeps=('hicolor-icon-theme') + +source=("git+http://precious.harpy.faith/Zergling_man/TheDesk.git") +sha256sums=('SKIP') + +build() +{ + cd ${srcdir}/${_pkgname}/app + npm run build + npm run construct +} + +package() +{ + cd ${pkgdir} + install -d opt/${_pkgname}/ usr/share/icons/hicolor usr/share/applications/ usr/share/licenses/thedesk/ usr/bin/ + cd ${srcdir}/${_pkgname} + mv thedesk ${pkgdir}/usr/bin/ + chmod 555 ${pkgdir}/usr/bin/thedesk + mv thedesk.desktop ${pkgdir}/usr/share/applications/ + mv LICENSE ${pkgdir}/usr/share/licenses/thedesk/ + cd app/img/icons/ + sizes=($(ls | grep -Eo '[0-9x]+')) + for size in ${sizes[@]}; do + install -d ${pkgdir}/usr/share/icons/hicolor/$size/apps/ + mv icon-$size.png ${pkgdir}/usr/share/icons/hicolor/$size/apps/desk.png + done + cd .. + rm -d icons + cd ${srcdir} + cp -r ${_pkgname} ${pkgdir}/opt/ +} \ No newline at end of file diff --git a/app/main/system.js b/app/main/system.js index 7697af46..5f210a76 100644 --- a/app/main/system.js +++ b/app/main/system.js @@ -346,5 +346,12 @@ function system(mainWindow, dir, lang, dirname) { } }) }) + function trust_insecure(event, webContents, url, error, certificate, callback) + { + if (url.startsWith('^')) // TODO: Load this from a conf file/option for each account, whatever. + { event.preventDefault(); callback(true)} + else { callback(false) } + } + //app.on('certificate-error',trust_insecure) } exports.system = system diff --git a/thedesk b/thedesk new file mode 100755 index 00000000..983fa7ed --- /dev/null +++ b/thedesk @@ -0,0 +1,3 @@ +#!/bin/sh +cd /opt/TheDesk/app +npm run dev:run diff --git a/thedesk.desktop b/thedesk.desktop new file mode 100644 index 00000000..47029fa1 --- /dev/null +++ b/thedesk.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=TheDesk +GenericName=Multi-column, multi-account fedi client +Exec=thedesk +Icon=desk +Terminal=false +Categories=Network;Electron;SocialMedia; +Keywords=toot;mastodon;social;network;post;pleroma;misskey; +X-Purism-FormFactor=Workstation;