Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
basharovV committed Feb 17, 2024
2 parents 7a1ed3c + 7a81bc2 commit d34b50c
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 21 deletions.
235 changes: 233 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"svelte-particles": "^2.12.0",
"svelte-preprocess": "^5.1.3",
"svelte-tippy": "^1.3.2",
"tauri-plugin-fs-watch-api": "github:tauri-apps/tauri-plugin-fs-watch#v1",
"tippy.js": "^6.3.7",
"tslib": "^2.4.0",
"tsparticles-preset-stars": "^2.12.0",
Expand All @@ -50,9 +51,9 @@
},
"dependencies": {
"@tauri-apps/api": "^1.5.1",
"@tauri-apps/cli-win32-x64-msvc": "^1.5.9",
"is-dark-color": "^1.2.0",
"music-metadata-browser": "^2.5.8",
"svrollbar": "^0.12.0",
"tauri-plugin-fs-watch-api": "github:tauri-apps/tauri-plugin-fs-watch#v1"
"svrollbar": "^0.12.0"
}
}
9 changes: 7 additions & 2 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
isSettingsOpen,
isTrackInfoPopupOpen,
isWelcomeSeen,
os,
uiView,
userSettings
} from "./data/store";
Expand Down Expand Up @@ -186,7 +187,7 @@
<Dropzone />
{/if}

<main class:mini-player={$isMiniPlayer}>
<main class:mini-player={$isMiniPlayer} class:transparent={$os === 'Darwin'}>
<div class="sidebar">
{#if $isWelcomeSeen}
<Sidebar />
Expand Down Expand Up @@ -218,7 +219,11 @@
height: 100vh;
opacity: 1;
position: relative;
background-color: #242026c2;
background-color: #242026;
&.transparent {
background-color: #242026c2;
}
&.mini-player {
border-radius: 5px;
Expand Down
19 changes: 4 additions & 15 deletions src/data/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const defaultSettings: UserSettings = {

export const userSettings: Writable<UserSettings> = writable(
{ ...defaultSettings, ...JSON.parse(localStorage.getItem("settings")) } ||
defaultSettings
defaultSettings
);

export const foldersToWatch = derived(
Expand Down Expand Up @@ -202,20 +202,9 @@ export const isLyricsHovered = writable(false);
export const currentSongLyrics: Writable<CurrentSongLyrics> = writable(null);

async function getOs() {
const os = await type();
let explorerName;
switch (os) {
case "Darwin":
explorerName = "Finder";
break;
case "Windows_NT":
explorerName = "Explorer";
break;
case "Linux":
explorerName = "File manager";
break;
}
return explorerName;
const osType = await type();

os.set(osType);
}

getOs();
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"useDefineForClassFields": true,
"module": "ESNext",
"resolveJsonModule": true,
"moduleResolution": "Node",
"baseUrl": ".",
/**
* Typecheck JS in `.svelte` and `.js` files by default.
Expand Down

0 comments on commit d34b50c

Please sign in to comment.