From b8706bb553d93242344460551814989032674273 Mon Sep 17 00:00:00 2001 From: Adis Durakovic Date: Fri, 15 Mar 2024 18:05:10 +0100 Subject: [PATCH] chore: workflow --- .github/workflows/aur.yml | 2 +- .github/workflows/container.yml | 2 +- frontend/composables/useHttp.ts | 2 +- frontend/composables/useSocket.ts | 2 +- frontend/wailsjs/runtime/package.json | 0 frontend/wailsjs/runtime/runtime.d.ts | 0 frontend/wailsjs/runtime/runtime.js | 0 7 files changed, 4 insertions(+), 4 deletions(-) mode change 100755 => 100644 frontend/wailsjs/runtime/package.json mode change 100755 => 100644 frontend/wailsjs/runtime/runtime.d.ts mode change 100755 => 100644 frontend/wailsjs/runtime/runtime.js diff --git a/.github/workflows/aur.yml b/.github/workflows/aur.yml index 0fa26e2..ad0bcf9 100644 --- a/.github/workflows/aur.yml +++ b/.github/workflows/aur.yml @@ -2,7 +2,7 @@ name: aur run-name: ${{ github.ref_name }} - Publishing to AUR on: release: - types: [published] + types: [created] jobs: publish-to-aur: runs-on: ubuntu-latest diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 8fbaa53..afc5b4e 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -2,7 +2,7 @@ name: container run-name: ${{ github.ref_name }} - Publishing Container on: release: - types: [published] + types: [created] env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} diff --git a/frontend/composables/useHttp.ts b/frontend/composables/useHttp.ts index c4381bf..baca4dc 100644 --- a/frontend/composables/useHttp.ts +++ b/frontend/composables/useHttp.ts @@ -13,7 +13,7 @@ export default class HttpClient { public static doFetch = async (url: string, opts: { method: FetchMethod; body?: any; query?: any }, notify: false | { title: string; text: string; type?: string } = false) => { const getUrl = (): string => { const url = useRequestURL() - return url.protocol === 'wails:' ? 'http://localhost:11278' : `${url.protocol}//${url.host}` + return url.protocol === 'wails:' || url.host === 'wails.localhost' ? 'http://localhost:11278' : `${url.protocol}//${url.host}` } const baseUrl = `${getUrl()}/api` try { diff --git a/frontend/composables/useSocket.ts b/frontend/composables/useSocket.ts index 6f8d593..ab4a675 100644 --- a/frontend/composables/useSocket.ts +++ b/frontend/composables/useSocket.ts @@ -2,7 +2,7 @@ export const useSocket = defineStore('useSocket', () => { function init() { const getUrl = (): string => { const url = useRequestURL() - return url.protocol === 'wails:' ? 'ws://localhost:11278' : `${url.protocol === 'http:' ? 'ws:' : 'wss:'}//${url.host}` + return url.protocol === 'wails:' || url.host === 'wails.localhost' ? 'ws://localhost:11278' : `${url.protocol === 'http:' ? 'ws:' : 'wss:'}//${url.host}` } const socket = new WebSocket(`${getUrl()}/api/ws`) socket.onmessage = (event) => { diff --git a/frontend/wailsjs/runtime/package.json b/frontend/wailsjs/runtime/package.json old mode 100755 new mode 100644 diff --git a/frontend/wailsjs/runtime/runtime.d.ts b/frontend/wailsjs/runtime/runtime.d.ts old mode 100755 new mode 100644 diff --git a/frontend/wailsjs/runtime/runtime.js b/frontend/wailsjs/runtime/runtime.js old mode 100755 new mode 100644