Update desktop icon and persist window state (#9)

This commit is contained in:
Wes
2026-03-09 17:50:18 -07:00
committed by GitHub
parent 6f900bcbcc
commit 998d83962b
56 changed files with 34 additions and 69 deletions

View File

@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/sprout.png?v=20260309" />
<link rel="icon" type="image/svg+xml" href="/sprout.svg?v=20260310" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title>
</head>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 KiB

View File

@@ -1,69 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="none">
<defs>
<linearGradient id="sprout-bg" x1="92" y1="72" x2="432" y2="448" gradientUnits="userSpaceOnUse">
<stop stop-color="#225E39" />
<stop offset="1" stop-color="#112C1C" />
</linearGradient>
<radialGradient id="sprout-glow" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(380 126) rotate(119.845) scale(152.955)">
<stop stop-color="#B6F06B" stop-opacity=".4" />
<stop offset="1" stop-color="#B6F06B" stop-opacity="0" />
</radialGradient>
<linearGradient id="sprout-leaf-left" x1="123" y1="188" x2="252" y2="282" gradientUnits="userSpaceOnUse">
<stop stop-color="#B9F173" />
<stop offset="1" stop-color="#63BD43" />
</linearGradient>
<linearGradient id="sprout-leaf-right" x1="270" y1="169" x2="421" y2="274" gradientUnits="userSpaceOnUse">
<stop stop-color="#97E45F" />
<stop offset="1" stop-color="#4FA53A" />
</linearGradient>
<linearGradient id="sprout-soil" x1="171" y1="309" x2="341" y2="403" gradientUnits="userSpaceOnUse">
<stop stop-color="#D89747" />
<stop offset="1" stop-color="#8D5228" />
</linearGradient>
</defs>
<rect x="32" y="32" width="448" height="448" rx="112" fill="url(#sprout-bg)" />
<circle cx="380" cy="126" r="124" fill="url(#sprout-glow)" />
<path
d="M149 346c0-31 25-56 56-56h102c31 0 56 25 56 56 0 49-43 70-107 70s-107-21-107-70Z"
fill="#714121"
/>
<ellipse cx="256" cy="347" rx="80" ry="32" fill="url(#sprout-soil)" />
<path
d="M256 339c-8-39-7-83 12-125"
stroke="#DAF9B8"
stroke-linecap="round"
stroke-width="22"
/>
<path
d="M259 239c-33-43-80-60-136-54 2 52 33 90 87 100 24 4 44-9 49-46Z"
fill="url(#sprout-leaf-left)"
/>
<path
d="M270 220c39-46 91-66 153-56-4 57-38 92-98 99-24 3-43-11-55-43Z"
fill="url(#sprout-leaf-right)"
/>
<path
d="M210 252c-14-18-30-33-50-45"
stroke="#E7FBD0"
stroke-linecap="round"
stroke-width="10"
opacity=".75"
/>
<path
d="M315 242c22-26 46-43 73-55"
stroke="#D8F5B8"
stroke-linecap="round"
stroke-width="10"
opacity=".65"
/>
<path
d="M231 316c2 17 15 31 32 31 18 0 33-15 35-34 2-17-8-31-24-35-18-5-39 8-43 27Z"
fill="#E09A49"
/>
<path
d="M244 308c6-7 15-11 24-10"
stroke="#F7C97C"
stroke-linecap="round"
stroke-width="8"
/>
<svg width="360" height="360" viewBox="0 0 360 360" fill="none" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(32.4 32.4) scale(0.82)">
<path d="M180 160V170H170V160H180Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M270 0C319.706 0 360 40.2944 360 90V270C360 319.706 319.706 360 270 360H200V350H190V290H200V280H210V270H260V260H270V250H280V240H290V230H300V220H310V210H330V200H310V190H240V200H220V210H210V220H200V240H220V230H230V220H250V210H270V220H250V230H230V240H220V250H210V260H200V270H190V200H180V260H170V250H160V240H140V230H160V240H170V220H160V210H150V200H140V190H120V180H50V190H30V200H40V210H50V220H60V230H70V240H80V250H90V260H160V280H170V360H90C40.2944 360 0 319.706 0 270V90C0 40.2944 40.2944 0 90 0H270ZM150 110V130H160V150H150V180H160V190H170V200H180V170H190V200H200V190H210V170H200V150H190V140H180V130H170V120H160V110H150Z" fill="black"/>
<path d="M140 220V230H130V220H140Z" fill="black"/>
<path d="M130 210V220H110V210H130Z" fill="black"/>
<path d="M110 200V210H90V200H110Z" fill="black"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -3899,6 +3899,7 @@ dependencies = [
"tauri-build",
"tauri-plugin-opener",
"tauri-plugin-websocket",
"tauri-plugin-window-state",
]
[[package]]
@@ -4259,6 +4260,21 @@ dependencies = [
"tokio-tungstenite",
]
[[package]]
name = "tauri-plugin-window-state"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73736611e14142408d15353e21e3cca2f12a3cfb523ad0ce85999b6d2ef1a704"
dependencies = [
"bitflags 2.11.0",
"log",
"serde",
"serde_json",
"tauri",
"tauri-plugin",
"thiserror 2.0.18",
]
[[package]]
name = "tauri-runtime"
version = "2.10.1"

View File

@@ -20,6 +20,7 @@ tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = [] }
tauri-plugin-opener = "2"
tauri-plugin-window-state = "2"
tauri-plugin-websocket = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 1001 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 802 B

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 1007 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 994 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 994 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 843 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -2,6 +2,7 @@ use std::sync::Mutex;
use nostr::{EventBuilder, JsonUtil, Keys, Kind, Tag, ToBech32};
use serde::{Deserialize, Serialize};
use tauri_plugin_window_state::StateFlags;
pub struct AppState {
pub keys: Mutex<Keys>,
@@ -205,6 +206,13 @@ pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_opener::init())
.plugin(
tauri_plugin_window_state::Builder::default()
.with_state_flags(
StateFlags::SIZE | StateFlags::POSITION | StateFlags::MAXIMIZED,
)
.build(),
)
.plugin(tauri_plugin_websocket::init())
.manage(app_state)
.invoke_handler(tauri::generate_handler![