File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ type SSEvent struct {
3636
3737type AppOpts struct {
3838 Title string // window title
39- CloseOnCtrlC bool
4039 GlobalKeyboardEvents bool
4140}
4241
@@ -133,7 +132,6 @@ func getFaviconPath() string {
133132func (c * Client ) makeBackendOpts () * rpctypes.VDomBackendOpts {
134133 return & rpctypes.VDomBackendOpts {
135134 Title : c .AppOpts .Title ,
136- CloseOnCtrlC : c .AppOpts .CloseOnCtrlC ,
137135 GlobalKeyboardEvents : c .AppOpts .GlobalKeyboardEvents ,
138136 FaviconPath : getFaviconPath (),
139137 }
Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ import (
1111
1212func init () {
1313 app .SetAppOpts (app.AppOpts {
14- CloseOnCtrlC : true ,
15- Title : "Pomodoro Timer (Tsunami Demo)" ,
14+ Title : "Pomodoro Timer (Tsunami Demo)" ,
1615 })
1716}
1817
Original file line number Diff line number Diff line change @@ -10,10 +10,9 @@ import (
1010)
1111
1212func init () {
13- // Set up the default client with embedded Tailwind styles and ctrl-c handling
13+ // Set up the default client with embedded Tailwind styles
1414 app .SetAppOpts (app.AppOpts {
15- CloseOnCtrlC : true ,
16- Title : "Todo App (Tsunami Demo)" ,
15+ Title : "Todo App (Tsunami Demo)" ,
1716 })
1817}
1918
Original file line number Diff line number Diff line change @@ -180,11 +180,6 @@ export class TsunamiModel {
180180 }
181181
182182 keyDownHandler ( e : VDomKeyboardEvent ) : boolean {
183- if ( this . backendOpts ?. closeonctrlc && checkKeyPressed ( e , "Ctrl:c" ) ) {
184- this . shouldDispose = true ;
185- this . queueUpdate ( true ) ;
186- return true ;
187- }
188183 if ( this . backendOpts ?. globalkeyboardevents ) {
189184 if ( e . cmd || e . meta ) {
190185 return false ;
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ type VDomAsyncInitiationRequest = {
1010
1111// vdom.VDomBackendOpts
1212type VDomBackendOpts = {
13- closeonctrlc ?: boolean ;
1413 globalkeyboardevents ?: boolean ;
1514 title ?: string ;
1615 faviconpath ?: string ;
Original file line number Diff line number Diff line change @@ -22,8 +22,7 @@ Tsunami applications use a default client configured through `app.SetAppOpts()`
2222func init () {
2323 // Set up the default client with options
2424 app.SetAppOpts (app.AppOpts {
25- CloseOnCtrlC: true ,
26- Title: " My Tsunami App" ,
25+ Title: " My Tsunami App" ,
2726 })
2827}
2928
@@ -590,7 +589,6 @@ vdom.H("div", map[string]any{
590589``` go
591590func init () {
592591 app.SetAppOpts (app.AppOpts {
593- CloseOnCtrlC: true ,
594592 GlobalKeyboardEvents: true , // Enable global keyboard events
595593 Title: " My Tsunami App" ,
596594 })
@@ -715,10 +713,9 @@ import (
715713)
716714
717715func init () {
718- // Set up the default client with Tailwind styles and ctrl-c handling
716+ // Set up the default client with Tailwind styles
719717 app.SetAppOpts (app.AppOpts {
720- CloseOnCtrlC: true ,
721- Title: " My Tsunami App" ,
718+ Title: " My Tsunami App" ,
722719 })
723720}
724721
@@ -853,7 +850,6 @@ Key points:
853850```
854851type AppOpts struct {
855852 Title string // window title
856- CloseOnCtrlC bool
857853 GlobalKeyboardEvents bool
858854}
859855```
Original file line number Diff line number Diff line change @@ -169,7 +169,6 @@ type VDomRefUpdate struct {
169169
170170type VDomBackendOpts struct {
171171 Title string `json:"title,omitempty"`
172- CloseOnCtrlC bool `json:"closeonctrlc,omitempty"`
173172 GlobalKeyboardEvents bool `json:"globalkeyboardevents,omitempty"`
174173 FaviconPath string `json:"faviconpath,omitempty"`
175174}
You can’t perform that action at this time.
0 commit comments