show client username, check whether credential exists before requesting confirmation from frontend

This commit is contained in:
2024-11-25 11:22:27 -05:00
parent 9bc9cb56c1
commit c6e22fc91b
8 changed files with 52 additions and 14 deletions

View File

@ -7,6 +7,7 @@
import ShowResponse from './approve/ShowResponse.svelte';
import Unlock from './Unlock.svelte';
console.log($appState.currentRequest);
// Extra 50ms so the window can finish disappearing before the redraw
const rehideDelay = Math.min(5000, $appState.config.rehide_ms + 100);

View File

@ -14,7 +14,7 @@
// Extract executable name from full path
const client = $appState.currentRequest.client;
const m = client.exe?.match(/\/([^/]+?$)|\\([^\\]+?$)/);
const appName = m[1] || m[2];
const appName = m ? m[1] || m[2] : '';
const dispatch = createEventDispatcher();
@ -61,6 +61,8 @@
<code class="">{@html client.exe ? breakPath(client.exe) : 'Unknown'}</code>
<div class="text-right">PID:</div>
<code>{client.pid}</code>
<div class="text-right">User:</div>
<code>{client.username ?? 'Unknown'}</code>
</div>
</div>