diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..5cf4100 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: +pkgname=gwaleen-desktop-git +pkgver=0.1.0 +pkgrel=1 +pkgdesc="Description of your app" +arch=('x86_64' 'aarch64') +url="https://git.dzeio.com/aptatio/gwaleen-desktop" +# url="https://github.com//" +license=('MIT') +depends=('cairo' 'desktop-file-utils' 'gdk-pixbuf2' 'glib2' 'gtk3' 'hicolor-icon-theme' 'libsoup' 'pango' 'webkit2gtk-4.1') +makedepends=('git' 'openssl' 'appmenu-gtk-module' 'libappindicator-gtk3' 'librsvg' 'cargo' 'nodejs') +provides=('gwaleen-desktop') +# conflicts=('' 'gwaleen-desktop') +source=("git+${url}.git") +sha256sums=('SKIP') + +pkgver() { + cd gwaleen-desktop + ( set -o pipefail + git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)" + ) +} + +prepare() { + cd gwaleen-desktop + npm ci +} + +build() { + cd gwaleen-desktop + npx tauri build -b deb +} + +package() { + cp -a gwaleen-desktop/src-tauri/target/release/bundle/deb/gwaleen-desktop_${pkgver}_*/data/* "${pkgdir}" +} diff --git a/src/components/global/Button.astro b/src/components/global/Button.astro index df32aba..6d5014f 100644 --- a/src/components/global/Button.astro +++ b/src/components/global/Button.astro @@ -1,6 +1,5 @@ --- import Windows from './Button/Windows.astro' -import Default from './Button/Default.astro' import Linux from './Button/Linux.astro' import Platform from './Platform.astro' import type ButtonProps from './Button/Props' @@ -9,7 +8,6 @@ export interface Props extends ButtonProps {} --- - - - + Linux + Windows diff --git a/src/components/global/Button/Default.astro b/src/components/global/Button/Default.astro deleted file mode 100644 index 4cac5cb..0000000 --- a/src/components/global/Button/Default.astro +++ /dev/null @@ -1,35 +0,0 @@ ---- -import { objectOmit } from '@dzeio/object-util' -import type ButtonProps from './Props' - -export interface Props extends ButtonProps {} - -const classes = [ - "button", - {outline: Astro.props.outline}, - {ghost: Astro.props.ghost}, - Astro.props.class -] - ---- -{'href' in Astro.props && ( - - - -) || ( - -)} - - diff --git a/src/components/global/Button/Linux.astro b/src/components/global/Button/Linux.astro index 004917f..6b36381 100644 --- a/src/components/global/Button/Linux.astro +++ b/src/components/global/Button/Linux.astro @@ -24,6 +24,20 @@ const classes = [ diff --git a/src/components/global/Button/Windows.astro b/src/components/global/Button/Windows.astro index 4cac5cb..f747b24 100644 --- a/src/components/global/Button/Windows.astro +++ b/src/components/global/Button/Windows.astro @@ -24,12 +24,20 @@ const classes = [ diff --git a/src/components/global/Platform.astro b/src/components/global/Platform.astro index c4dbbf6..248ce1c 100644 --- a/src/components/global/Platform.astro +++ b/src/components/global/Platform.astro @@ -1,30 +1,13 @@ --- -type Platform = 'linux' | 'windows' | 'default' +import { getCurrentPlatform } from 'libs/TauriUtils' -const current = import.meta.env.TAURI_PLATFORM - -let platform: Platform = 'default' - -switch (current) { - case 'linux': - platform = 'linux' - break; - case 'windows': - platform = 'windows' - break; - default: - break; -} +let platform = getCurrentPlatform() --- {platform === 'linux' && ( )} -{platform === 'windows' && ( +{(platform === 'windows' || platform === 'default') && ( )} - -{platform === 'default' && ( - -)} diff --git a/src/libs/TauriUtils.ts b/src/libs/TauriUtils.ts index 008563a..6ee5d3c 100644 --- a/src/libs/TauriUtils.ts +++ b/src/libs/TauriUtils.ts @@ -1,18 +1,18 @@ export function getPlatformStyle() { } -type Platform = 'linux' | 'windows' | 'default' +type Platform = 'linux' | 'windows' export function getCurrentPlatform(): Platform { + return 'windows' const current = import.meta.env.TAURI_ENV_PLATFORM console.log(import.meta.env) switch (current) { case 'linux': return 'linux' + default: case 'windows': return 'windows' - default: - return 'default' } }