mirror of
https://github.com/OpenListTeam/OpenList-Desktop.git
synced 2025-11-25 11:18:32 +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);
|
cmd.arg(&effective_data_dir);
|
||||||
log::info!("Using data directory: {effective_data_dir}");
|
log::info!("Using data directory: {effective_data_dir}");
|
||||||
log::info!("Executing command: {cmd:?}");
|
log::info!("Executing command: {cmd:?}");
|
||||||
|
#[cfg(windows)]
|
||||||
|
{
|
||||||
|
use std::os::windows::process::CommandExt;
|
||||||
|
cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW
|
||||||
|
}
|
||||||
let output = cmd
|
let output = cmd
|
||||||
.output()
|
.output()
|
||||||
.map_err(|e| format!("Failed to execute openlist command: {e}"))?;
|
.map_err(|e| format!("Failed to execute openlist command: {e}"))?;
|
||||||
|
|||||||
@@ -496,7 +496,12 @@ onUnmounted(() => {
|
|||||||
<Download :size="16" />
|
<Download :size="16" />
|
||||||
</button>
|
</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" />
|
<Trash2 :size="16" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|||||||
@@ -254,7 +254,6 @@ const handleResetAdminPassword = async () => {
|
|||||||
appSettings.admin_password = newPassword
|
appSettings.admin_password = newPassword
|
||||||
message.value = t('settings.service.admin.resetSuccess')
|
message.value = t('settings.service.admin.resetSuccess')
|
||||||
messageType.value = 'success'
|
messageType.value = 'success'
|
||||||
await navigator.clipboard.writeText(newPassword)
|
|
||||||
} else {
|
} else {
|
||||||
message.value = t('settings.service.admin.resetFailed')
|
message.value = t('settings.service.admin.resetFailed')
|
||||||
messageType.value = 'error'
|
messageType.value = 'error'
|
||||||
|
|||||||
Reference in New Issue
Block a user