mirror of
https://github.com/OpenListTeam/OpenList-Desktop.git
synced 2025-11-25 03:14:56 +08:00
fix: fix reset admin passwd error on windows close #69
This commit is contained in:
@@ -91,6 +91,11 @@ async fn execute_openlist_admin_set(
|
||||
cmd.arg(&effective_data_dir);
|
||||
log::info!("Using data directory: {effective_data_dir}");
|
||||
log::info!("Executing command: {cmd:?}");
|
||||
#[cfg(windows)]
|
||||
{
|
||||
use std::os::windows::process::CommandExt;
|
||||
cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW
|
||||
}
|
||||
let output = cmd
|
||||
.output()
|
||||
.map_err(|e| format!("Failed to execute openlist command: {e}"))?;
|
||||
|
||||
@@ -496,7 +496,12 @@ onUnmounted(() => {
|
||||
<Download :size="16" />
|
||||
</button>
|
||||
|
||||
<button class="toolbar-btn danger" @click="clearLogs" :title="t('logs.toolbar.clearLogs')">
|
||||
<button
|
||||
class="toolbar-btn danger"
|
||||
@click="clearLogs"
|
||||
:disabled="filteredLogs.length === 0 || filterSource === 'gin' || filterSource === 'all'"
|
||||
:title="t('logs.toolbar.clearLogs')"
|
||||
>
|
||||
<Trash2 :size="16" />
|
||||
</button>
|
||||
|
||||
|
||||
@@ -254,7 +254,6 @@ const handleResetAdminPassword = async () => {
|
||||
appSettings.admin_password = newPassword
|
||||
message.value = t('settings.service.admin.resetSuccess')
|
||||
messageType.value = 'success'
|
||||
await navigator.clipboard.writeText(newPassword)
|
||||
} else {
|
||||
message.value = t('settings.service.admin.resetFailed')
|
||||
messageType.value = 'error'
|
||||
|
||||
Reference in New Issue
Block a user