Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
Fix linux background
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer authored Jul 24, 2022
1 parent 9204fbf commit 3239518
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/alpha-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: >
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator-dev
- name: Install app dependencies and build it
run: npm ci && npm run build:alpha
- uses: tauri-apps/tauri-action@v0
Expand Down
17 changes: 16 additions & 1 deletion interface/layout/app.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import App from "./app.svelte"
import "../styles/index.css"
import { fs, path, window } from "@tauri-apps/api"
import { fs, path, os } from "@tauri-apps/api"

const getSettingsPath = async () => {
const folderPath = await path.join(await path.configDir(), "Levminer", "Authme 4")
Expand All @@ -15,6 +15,21 @@ const getSettingsPath = async () => {

getSettingsPath()

const setBackground = async () => {
const system = await os.type()
const build = await os.version()

if (system === "Windows_NT" && build < "10.0.22000") {
document.querySelector("body").style.background = "black"
}

if (system === "Linux") {
document.querySelector("body").style.background = "black"
}
}

setBackground()

const app = new App({
target: document.body,
})
Expand Down

0 comments on commit 3239518

Please sign in to comment.