auto update code + revised menu
This commit is contained in:
parent
3c8444229e
commit
898a0120b8
8 changed files with 513 additions and 321 deletions
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
|
|
@ -1,7 +1,6 @@
|
|||
name: "Release"
|
||||
|
||||
on:
|
||||
workflow_dispatch
|
||||
on: workflow_dispatch
|
||||
# on:
|
||||
# push:
|
||||
# branches:
|
||||
|
|
@ -48,11 +47,11 @@ jobs:
|
|||
with:
|
||||
version: 1.4.309.0
|
||||
cache: true
|
||||
|
||||
|
||||
- name: Install trusted-signing-cli
|
||||
if: matrix.platform == 'windows-latest' # This must match the platform value defined above.
|
||||
run: cargo install trusted-signing-cli
|
||||
|
||||
|
||||
- name: Prepare Vulkan SDK for Ubuntu 22.04
|
||||
run: |
|
||||
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
|
||||
|
|
@ -111,6 +110,8 @@ jobs:
|
|||
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
||||
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
||||
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||
with:
|
||||
tagName: v__VERSION__
|
||||
releaseName: "v__VERSION__"
|
||||
|
|
|
|||
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
|
|
@ -11,14 +11,16 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@tailwindcss/vite": "^4.0.2",
|
||||
"@tauri-apps/api": "^2",
|
||||
"@tauri-apps/api": "^2.6.0",
|
||||
"@tauri-apps/plugin-autostart": "~2",
|
||||
"@tauri-apps/plugin-clipboard-manager": "~2",
|
||||
"@tauri-apps/plugin-global-shortcut": "~2",
|
||||
"@tauri-apps/plugin-opener": "^2",
|
||||
"@tauri-apps/plugin-os": "~2",
|
||||
"@tauri-apps/plugin-process": "^2.3.0",
|
||||
"@tauri-apps/plugin-store": "~2",
|
||||
"@tauri-apps/plugin-stronghold": "~2",
|
||||
"@tauri-apps/plugin-updater": "~2",
|
||||
"@tauri-apps/plugin-upload": "~2",
|
||||
"keycode": "^2.2.1",
|
||||
"react": "^18.3.1",
|
||||
|
|
|
|||
778
src-tauri/Cargo.lock
generated
778
src-tauri/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -54,3 +54,4 @@ whisper-rs = { version = "0.13.2", features = ["openblas", "vulkan"] }
|
|||
tauri-plugin-autostart = "2"
|
||||
tauri-plugin-global-shortcut = "2"
|
||||
tauri-plugin-single-instance = "2"
|
||||
tauri-plugin-updater = "2"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
"autostart:default",
|
||||
"global-shortcut:default",
|
||||
"autostart:default",
|
||||
"autostart:default"
|
||||
"autostart:default",
|
||||
"updater:default"
|
||||
]
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@ use managers::transcription::TranscriptionManager;
|
|||
use std::collections::HashMap;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use tauri::image::Image;
|
||||
use tauri::menu::{Menu, MenuItem};
|
||||
use tauri::menu::{Menu, MenuItem, PredefinedMenuItem};
|
||||
use tauri::tray::TrayIconBuilder;
|
||||
use tauri::Manager;
|
||||
use tauri_plugin_autostart::{MacosLauncher, ManagerExt};
|
||||
|
|
@ -27,6 +27,7 @@ pub fn run() {
|
|||
env_logger::init();
|
||||
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_updater::Builder::new().build())
|
||||
.plugin(tauri_plugin_os::init())
|
||||
.plugin(tauri_plugin_clipboard_manager::init())
|
||||
.plugin(tauri_plugin_macos_permissions::init())
|
||||
|
|
@ -39,9 +40,29 @@ pub fn run() {
|
|||
))
|
||||
.manage(Mutex::new(ShortcutToggleStates::default()))
|
||||
.setup(move |app| {
|
||||
let version = env!("CARGO_PKG_VERSION");
|
||||
let version_label = format!("Handy v{}", version);
|
||||
let version_i = MenuItem::with_id(app, "version", &version_label, false, None::<&str>)?;
|
||||
let settings_i = MenuItem::with_id(app, "settings", "Settings", true, None::<&str>)?;
|
||||
let check_updates_i = MenuItem::with_id(
|
||||
app,
|
||||
"check_updates",
|
||||
"Check for Updates",
|
||||
true,
|
||||
None::<&str>,
|
||||
)?;
|
||||
let quit_i = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?;
|
||||
let menu = Menu::with_items(app, &[&settings_i, &quit_i])?;
|
||||
let menu = Menu::with_items(
|
||||
app,
|
||||
&[
|
||||
&version_i,
|
||||
&PredefinedMenuItem::separator(app)?,
|
||||
&settings_i,
|
||||
&check_updates_i,
|
||||
&PredefinedMenuItem::separator(app)?,
|
||||
&quit_i,
|
||||
],
|
||||
)?;
|
||||
let tray = TrayIconBuilder::new()
|
||||
.icon(Image::from_path(app.path().resolve(
|
||||
"resources/tray_idle.png",
|
||||
|
|
@ -73,6 +94,9 @@ pub fn run() {
|
|||
eprintln!("Main window not found");
|
||||
}
|
||||
}
|
||||
"check_updates" => {
|
||||
// TODO: Implement update check
|
||||
}
|
||||
"quit" => {
|
||||
app.exit(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"createUpdaterArtifacts": true,
|
||||
"targets": "all",
|
||||
"resources": ["resources/**/*"],
|
||||
"license": "MIT",
|
||||
|
|
@ -54,5 +55,13 @@
|
|||
"windows": {
|
||||
"signCommand": "trusted-signing-cli -e https://eus.codesigning.azure.net/ -a CJ-Signing -c cjpais-dev -d Handy %1"
|
||||
}
|
||||
},
|
||||
"plugins": {
|
||||
"updater": {
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEJBQjcyMDk1MjA2NjAxRjkKUldUNUFXWWdsU0MzdXRRZi8zYzhqV2FaNUVDbDd2Rk5VM1IvWWowVXdmRFNKQ1BrMXF5RFFsLy8K",
|
||||
"endpoints": [
|
||||
"https://github.com/cjpais/Handy/releases/latest/download/latest.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue