File tree Expand file tree Collapse file tree 2 files changed +30
-3
lines changed
tools/server/webui/src/lib/components/app/chat Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import { Button } from ' $lib/components/ui/button' ;
3+ import * as AlertDialog from ' $lib/components/ui/alert-dialog' ;
34
45 interface Props {
56 onReset? : () => void ;
89
910 let { onReset, onSave }: Props = $props ();
1011
11- function handleReset() {
12+ let showResetDialog = $state (false );
13+
14+ function handleResetClick() {
15+ showResetDialog = true ;
16+ }
17+
18+ function handleConfirmReset() {
1219 onReset ?.();
20+ showResetDialog = false ;
1321 }
1422
1523 function handleSave() {
1826 </script >
1927
2028<div class =" flex justify-between border-t border-border/30 p-6" >
21- <Button variant ="outline" onclick ={handleReset }>Reset to default</Button >
29+ <Button variant ="outline" onclick ={handleResetClick }>Reset to default</Button >
2230
2331 <Button onclick ={handleSave }>Save settings</Button >
2432</div >
33+
34+ <AlertDialog .Root bind:open ={showResetDialog }>
35+ <AlertDialog .Content >
36+ <AlertDialog .Header >
37+ <AlertDialog .Title >Reset Settings to Default</AlertDialog .Title >
38+ <AlertDialog .Description >
39+ Are you sure you want to reset all settings to their default values? This action cannot be
40+ undone and will permanently remove all your custom configurations.
41+ </AlertDialog .Description >
42+ </AlertDialog .Header >
43+ <AlertDialog .Footer >
44+ <AlertDialog .Cancel >Cancel</AlertDialog .Cancel >
45+ <AlertDialog .Action onclick ={handleConfirmReset }>Reset to Default</AlertDialog .Action >
46+ </AlertDialog .Footer >
47+ </AlertDialog .Content >
48+ </AlertDialog .Root >
Original file line number Diff line number Diff line change 8989>
9090 <!-- svelte-ignore a11y_click_events_have_key_events -->
9191 <!-- svelte-ignore a11y_no_static_element_interactions -->
92- <div class ="text flex min-w-0 flex-1 items-center space-x-3" onclick ={handleMobileSidebarItemClick }>
92+ <div
93+ class =" text flex min-w-0 flex-1 items-center space-x-3"
94+ onclick ={handleMobileSidebarItemClick }
95+ >
9396 <div class =" min-w-0 flex-1" >
9497 <p class ="truncate text-sm font-medium" >{conversation .name }</p >
9598
You can’t perform that action at this time.
0 commit comments