Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ tauri-plugin-os = "2.2.0"
tauri-plugin-http = "2.2.0"
tauri-plugin-log = "2.2.0"
tauri-plugin-notification = "2.2.0"
tauri-plugin-opener = "2.2.0"
anyhow = "1.0.86"
log = "0.4.22"

Expand Down
12 changes: 12 additions & 0 deletions apps/desktop/src-tauri/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,15 @@ pub fn set_hide_taskbar_when_pinned(
hide_taskbar_when_pinned,
);
}

#[tauri::command]
pub fn open_config_dir(app: tauri::AppHandle) {
use tauri::Manager;
use tauri_plugin_opener::OpenerExt;
if let Ok(path) = app.path().app_config_dir() {
let _ = std::fs::create_dir_all(&path);
let _ = app
.opener()
.open_path(path.to_string_lossy().to_string(), None::<&str>);
}
}
2 changes: 2 additions & 0 deletions apps/desktop/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ fn main() {
.plugin(tauri_plugin_shell::init())
.plugin(tauri_plugin_os::init())
.plugin(tauri_plugin_http::init())
.plugin(tauri_plugin_opener::init())
.plugin(log_plugin_builder.build());

#[cfg(not(debug_assertions))]
Expand Down Expand Up @@ -172,6 +173,7 @@ fn main() {
close_settings,
open_settings,
set_hide_taskbar_when_pinned,
open_config_dir,
]);

app
Expand Down
4 changes: 1 addition & 3 deletions apps/desktop/src/views/settings/account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ import { usePin } from "@/hooks/use-pin";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { Pin } from "lucide-react";
import type { VoiceUser } from "@/types";
import * as shell from "@tauri-apps/plugin-shell";

export const Developer = () => {
const platformInfo = usePlatformInfo();
const DEV_TOKEN_BACKUP_KEY = "overlayed:dev:token-backup";
const DEV_TOKEN_EXPIRY_BACKUP_KEY = "overlayed:dev:token-expiry-backup";
const DEV_USER_DATA_BACKUP_KEY = "overlayed:dev:user-data-backup";
Expand Down Expand Up @@ -91,7 +89,7 @@ export const Developer = () => {
size="sm"
variant="outline"
onClick={async () => {
await shell.open(platformInfo.configDir);
await invoke("open_config_dir");
}}
>
Open Config Dir
Expand Down
Loading