This repository was archived by the owner on May 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +32
-8
lines changed Expand file tree Collapse file tree 5 files changed +32
-8
lines changed Original file line number Diff line number Diff line change
1
+ import { ModalState } from "./Analyser" ;
2
+ import { Show } from "solid-js" ;
3
+
1
4
export interface AnalyseMenuProps {
2
5
sessionName : string ;
3
6
onShare : Function ;
4
7
canShare : boolean ;
5
8
isShared : boolean ;
6
- clients : number ,
7
- inShared : boolean ,
8
- open : boolean ,
9
- openHelp : Function ;
9
+ clients : number ;
10
+ inShared : boolean ;
11
+ open : boolean ;
12
+ openModal : ( ModalState ) => void ;
10
13
}
11
14
12
15
export function AnalyseMenu ( props : AnalyseMenuProps ) {
@@ -23,7 +26,7 @@ export function AnalyseMenu(props: AnalyseMenuProps) {
23
26
< summary title = "Menu" > ☰</ summary >
24
27
< ul class = "menu" >
25
28
< li >
26
- < button class = "share-session" title = "Start a shared session" disabled = { props . isShared }
29
+ < button className = "share-session" title = "Start a shared session" disabled = { props . isShared }
27
30
onClick = { ( ) => {
28
31
props . onShare ( )
29
32
} } >
@@ -41,10 +44,21 @@ export function AnalyseMenu(props: AnalyseMenuProps) {
41
44
</ button >
42
45
</ li >
43
46
< li >
44
- < button class = "help" title = "Help" onClick = { ( ) => props . openHelp ( ) } >
47
+ < button className = "help" title = "Help" onClick = { ( ) => props . openModal ( ModalState . Help ) } >
45
48
Help
46
49
</ button >
47
50
</ li >
51
+ < li >
52
+ < button className = "goto" title = "Goto Tick" onClick = { ( ) => props . openModal ( ModalState . Goto ) } >
53
+ Goto Tick
54
+ </ button >
55
+ </ li >
56
+ < li >
57
+ < button className = "search" title = "Search Events"
58
+ onClick = { ( ) => props . openModal ( ModalState . Search ) } >
59
+ Search Events
60
+ </ button >
61
+ </ li >
48
62
</ ul >
49
63
</ details >
50
64
</ Show >
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import {DemoHead} from "../../header";
18
18
import { EventSearch } from "./EventSearch" ;
19
19
import { Event } from "./Data/Parser" ;
20
20
21
- enum ModalState {
21
+ export enum ModalState {
22
22
Closed ,
23
23
Help ,
24
24
Goto ,
@@ -254,7 +254,7 @@ export const Analyser = (props: AnalyseProps) => {
254
254
} , onUpdate ) ;
255
255
setSessionName ( session . sessionName ) ;
256
256
} }
257
- openHelp = { ( ) => setHelpOpen ( true ) }
257
+ openModal = { setModalState }
258
258
canShare = { props . isStored && ! inShared }
259
259
isShared = { isShared ( ) }
260
260
clients = { clients ( ) }
Original file line number Diff line number Diff line change 30
30
background-image : url ("inline://images//help.svg" );
31
31
}
32
32
33
+ & button .goto {
34
+ background-image : url ("inline://images//goto.svg" );
35
+ }
36
+
37
+ & button .search {
38
+ background-image : url ("inline://images//search.svg" );
39
+ }
40
+
33
41
& input .share-text {
34
42
color : var (--primary-color );
35
43
background-color : var (--text-secondary );
You can’t perform that action at this time.
0 commit comments