Skip to content

Commit 1265fc6

Browse files
committed
release v0.0.3
1 parent de5e410 commit 1265fc6

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

src-tauri/src/main.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
)]
55

66
use std::path::Path;
7+
use tauri::Manager;
78

89
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
910
#[tauri::command]
@@ -17,9 +18,19 @@ fn path_exists(path: &str) -> bool {
1718
path.exists()
1819
}
1920

21+
#[tauri::command]
22+
async fn show_main_window(window: tauri::Window) {
23+
// Show main window
24+
window.get_window("main").unwrap().show().unwrap();
25+
}
26+
2027
fn main() {
2128
tauri::Builder::default()
22-
.invoke_handler(tauri::generate_handler![greet, path_exists])
29+
.invoke_handler(tauri::generate_handler![
30+
greet,
31+
path_exists,
32+
show_main_window
33+
])
2334
.run(tauri::generate_context!())
2435
.expect("error while running tauri application");
2536
}

src-tauri/tauri.conf.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"package": {
99
"productName": "Dropcode",
10-
"version": "0.0.2"
10+
"version": "0.0.3"
1111
},
1212
"tauri": {
1313
"allowlist": {
@@ -63,7 +63,8 @@
6363
"title": "Dropcode",
6464
"width": 800,
6565
"minWidth": 800,
66-
"minHeight": 600
66+
"minHeight": 600,
67+
"visible": false
6768
}
6869
]
6970
}

src/components/App.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import { Route, Routes } from "@solidjs/router"
2+
import { invoke } from "@tauri-apps/api"
23
import { onMount, Show } from "solid-js"
34
import { Home } from "../screens/Home"
45
import { Snippets } from "../screens/Snippets"
56
import { actions, state } from "../store"
67

78
export const App = () => {
89
onMount(() => {
10+
invoke("show_main_window")
11+
912
actions.init()
1013
})
1114

src/screens/Home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const Home = () => {
2121
<div class="h-screen flex items-center justify-center">
2222
<button
2323
onClick={openFolder}
24-
class="cursor border rounded-lg shadow-sm h-10 px-3 active:bg-zinc-100"
24+
class="cursor border rounded-lg shadow-sm h-10 px-3 active:bg-zinc-100 dark:active:bg-zinc-700"
2525
>
2626
Open Folder
2727
</button>

0 commit comments

Comments
 (0)