chore: cleanup

This commit is contained in:
zhom
2025-08-19 14:01:24 +04:00
parent 25bb1dccdc
commit 0d79f385bd
5 changed files with 16 additions and 800 deletions
+12 -790
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -29,7 +29,6 @@ tauri-plugin-shell = "2"
tauri-plugin-deep-link = "2"
tauri-plugin-dialog = "2"
tauri-plugin-macos-permissions = "2"
tauri-plugin-stronghold = "2"
directories = "6"
+1 -2
View File
@@ -29,7 +29,6 @@
"macos-permissions:allow-request-microphone-permission",
"macos-permissions:allow-request-camera-permission",
"macos-permissions:allow-check-microphone-permission",
"macos-permissions:allow-check-camera-permission",
"stronghold:default"
"macos-permissions:allow-check-camera-permission"
]
}
-4
View File
@@ -385,7 +385,6 @@ pub async fn save_app_settings(
) -> Result<AppSettings, String> {
let manager = SettingsManager::instance();
// If API is being enabled ensure token is stored in Stronghold.
if settings.api_enabled {
if let Some(ref token) = settings.api_token {
manager
@@ -410,7 +409,6 @@ pub async fn save_app_settings(
settings.api_token = None;
}
// Do not persist api_token in settings file (kept in Stronghold). Save a copy without the token.
let mut persist_settings = settings.clone();
persist_settings.api_token = None;
manager
@@ -492,8 +490,6 @@ pub async fn clear_all_version_cache_and_refetch(
Ok(())
}
// No standalone stronghold commands needed; token ops handled via settings commands
// Global singleton instance
lazy_static::lazy_static! {
static ref SETTINGS_MANAGER: SettingsManager = SettingsManager::new();
+3 -3
View File
@@ -781,7 +781,7 @@ export function SettingsDialog({ isOpen, onClose }: SettingsDialogProps) {
updateSetting("api_enabled", checked);
try {
if (checked) {
// Ask backend to enable API and return settings with token (token stored in Stronghold)
// Ask backend to enable API and return settings with token
const next = await invoke<AppSettings>(
"save_app_settings",
{
@@ -837,7 +837,7 @@ export function SettingsDialog({ isOpen, onClose }: SettingsDialogProps) {
type="text"
value={settings.api_token}
readOnly
className="flex-1 px-3 py-2 text-sm bg-muted border rounded-md font-mono"
className="flex-1 px-3 py-2 font-mono text-sm rounded-md border bg-muted"
/>
<RippleButton
variant="outline"
@@ -855,7 +855,7 @@ export function SettingsDialog({ isOpen, onClose }: SettingsDialogProps) {
{settings.api_token}" for all API requests.
</p>
{/* Temporary in-app API docs */}
<div className="mt-3 p-3 border rounded-md bg-muted/40 text-xs leading-relaxed space-y-2">
<div className="p-3 mt-3 space-y-2 text-xs leading-relaxed rounded-md border bg-muted/40">
<div className="font-medium">
Temporary in-app API docs (alpha)
</div>