[READ-ONLY] Mirror of https://github.com/probablykasper/mr-tagger. Music file tagging app for Mac, Linux and Windows
audio linux macos music tagger tauri windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Use tauri provided ShellScope

Kasper (Feb 13, 2022, 1:37 AM +0100) 577fe653 98227d17

+2 -8
+2 -8
src-tauri/src/main.rs
··· 4 4 )] 5 5 6 6 use crate::cmd::AppArg; 7 - use std::collections::HashMap; 8 7 use std::thread; 9 8 use tauri::api::{dialog, shell}; 10 - use tauri::regex::Regex; 11 9 use tauri::{ 12 - scope, CustomMenuItem, Manager, Menu, MenuEntry, MenuItem, Submenu, WindowBuilder, WindowUrl, 10 + CustomMenuItem, Manager, Menu, MenuEntry, MenuItem, Submenu, WindowBuilder, WindowUrl, 13 11 }; 14 12 15 13 mod cmd; ··· 121 119 event.window().emit("menu", event_name).unwrap(); 122 120 match event_name { 123 121 "Learn More" => { 124 - let shell_scope = scope::ShellScope::new(scope::ShellScopeConfig { 125 - open: Some(Regex::new("^https?://").unwrap()), 126 - scopes: HashMap::new(), 127 - }); 128 122 let link = "https://github.com/probablykasper/mr-tagger".to_string(); 129 - shell::open(&shell_scope, link, None).unwrap(); 123 + shell::open(&event.window().shell_scope(), link, None).unwrap(); 130 124 } 131 125 _ => {} 132 126 }