Compare commits

..

2 Commits

Author SHA1 Message Date
valerio
46a415e880 FEAT: New Icons 2026-05-06 15:44:30 +02:00
valerio
9198b601be FEAT: Version Selection 2026-04-29 13:57:44 +02:00
58 changed files with 54 additions and 19 deletions

BIN
app-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 MiB

View File

@ -1,5 +1,6 @@
{
"lockfileVersion": 1,
"configVersion": 0,
"workspaces": {
"": {
"name": "smoothie",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 974 B

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src-tauri/icons/64x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 903 B

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background android:drawable="@color/ic_launcher_background"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#fff</color>
</resources>

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -2,6 +2,13 @@
import VersionCard from './VersionCard.svelte';
import { send, receive } from '$lib/transition.js';
import { flip } from 'svelte/animate';
import { selectedVersionStore } from '$lib/library.js';
let selectedVersion = $state(null);
selectedVersionStore.subscribe((version) => {
selectedVersion = version;
});
let { installedVersions } = $props();
import '@webtui/css/base.css';
@ -22,7 +29,7 @@
in:receive={{ key: version.version }}
out:send={{ key: version.version }}
>
<VersionCard {version} />
<VersionCard {version} {selectedVersion} />
</div>
{/each}
{:else}
@ -40,7 +47,7 @@
in:receive={{ key: version.version }}
out:send={{ key: version.version }}
>
<VersionCard {version} />
<VersionCard {version} {selectedVersion} />
</div>
{/each}
</div>

View File

@ -4,15 +4,18 @@
deleteVersion,
launchBlenderVersion,
toggleFavourite,
registerVersion
registerVersion,
selectVersion
} from '$lib/library';
import Button from '$lib/components/Button.svelte';
import Menu from '$lib/components/Menu.svelte';
import { show } from '$lib/components/Dialog.svelte';
let { version } = $props();
let { version, selectedVersion } = $props();
let popup = $state();
let selected = $derived(version.version === selectedVersion?.version);
async function handleDelete() {
const prompt = await show({
title: 'Delete',
@ -41,7 +44,16 @@
<Popup bind:this={popup} content="Version {version.version} is now the default on your system"
></Popup>
<div id="card">
<div
role="button"
tabindex="0"
onkeydown={() => {}}
onclick={async () => {
await selectVersion(version);
}}
id="card"
class:selected
>
<div class="row">
{version.version}
<Button style="iconbutton" onclick={() => toggleFavourite(version)}
@ -93,11 +105,13 @@
width: 100%;
min-width: 170px;
max-width: 200px;
background-color: var(--white);
border-radius: 5px;
background-color: var(--light);
padding: 1rem;
}
#card.selected {
background-color: var(--light-accent);
}
.row {
display: flex;
align-items: center;

View File

@ -19,9 +19,14 @@ import { updateDownloadProgress } from './download';
* @property {Date} [installDate] - Installation date (if available)
*/
export const currentInstalledVersions = writable([]);
export const installedVersionsStore = writable([]);
export const selectedVersionStore = writable(null);
const favouritesStore = new LazyStore('versions.json');
export async function selectVersion(version) {
selectedVersionStore.set(version);
}
export async function generateVersionBanner(version) {
const bannerPath = `${version.path}/banner.png`;
if (await exists(bannerPath)) {
@ -200,7 +205,7 @@ export async function removeVersion(version) {
* @param {blenderVersion} version The version to toggle.
*/
export async function toggleFavourite(version) {
const versions = get(currentInstalledVersions);
const versions = get(installedVersionsStore);
console.log();
const versionObj = versions.find((v) => v.version === version.version);
if (versionObj) {
@ -208,7 +213,7 @@ export async function toggleFavourite(version) {
} else {
console.error('version not found', version);
}
currentInstalledVersions.set(versions);
installedVersionsStore.set(versions);
await favouritesStore.set(version.version, versionObj.favourite);
await favouritesStore.save();
}
@ -230,9 +235,9 @@ export async function deleteVersion(version) {
await favouritesStore.save();
// Update the current installed versions list
const versions = get(currentInstalledVersions);
const versions = get(installedVersionsStore);
const filteredVersions = versions.filter((v) => v.version !== version.version);
currentInstalledVersions.set(filteredVersions);
installedVersionsStore.set(filteredVersions);
console.log(`Successfully deleted version ${version.version}`);
} catch (error) {
@ -253,13 +258,13 @@ export async function getInstalledVersions() {
const settings = get(currentSettings);
const libraryDir = settings.libraryDir;
if (!libraryDir) {
currentInstalledVersions.set([]);
installedVersionsStore.set([]);
return [];
}
const blenderLibraryPath = await join(libraryDir, BASE_LIBRARY_DIR, 'blender');
if (!exists(blenderLibraryPath)) {
currentInstalledVersions.set([]);
installedVersionsStore.set([]);
return [];
}
@ -308,13 +313,13 @@ export async function getInstalledVersions() {
}
}
currentInstalledVersions.set(versions);
installedVersionsStore.set(versions);
cleanupOrphanedDesktopFiles(versions);
return versions;
} catch (error) {
console.error('Error getting installed versions:', error);
currentInstalledVersions.set([]);
installedVersionsStore.set([]);
return [];
}
}

View File

@ -8,11 +8,10 @@
// MODULES
import { setupTrayIcon } from '$lib/trayicon';
import { getSettings, currentSettings } from '$lib/settings';
import { getInstalledVersions, currentInstalledVersions } from '$lib/library';
import { getBlenderReleases, blenderReleases } from '$lib/blenderfetch';
import { downloadTasksStore } from '$lib/download';
// COMPONENTS
import { getInstalledVersions, installedVersionsStore } from '$lib/library.js';
import { downloadTasksStore } from '$lib/download.js';
import Library from '$lib/components/Library.svelte';
import Download from '$lib/components/Download.svelte';
import Settings from '$lib/components/Settings.svelte';
@ -37,7 +36,7 @@
settings = value;
console.log('Loaded settings:', settings);
});
currentInstalledVersions.subscribe((value) => {
installedVersionsStore.subscribe((value) => {
installedVersions = value;
console.log('Loaded installed versions:', installedVersions);
});