@@ -13,7 +13,7 @@ import {
13
13
} from "@mui/material" ;
14
14
import ExpandMoreIcon from '@mui/icons-material/ExpandMore' ;
15
15
import { relayMustIncludeFlagOptions , Settings } from "../../types/settings" ;
16
- import { RelayFlagLabel , RelayType , RelayTypeLabel } from "../../types/relay" ;
16
+ import { RelayFlagLabel , RelayType , RelayTypeLabel , RelayTypeTooltip } from "../../types/relay" ;
17
17
import { tooltipTimeDelay } from "../../config" ;
18
18
import { getIcon } from "../../types/icons" ;
19
19
import { nameOfFactory } from "../../util/util" ;
@@ -36,7 +36,7 @@ export const AppSettings: FunctionComponent<Props> = ({elevation = 24}) => {
36
36
37
37
return (
38
38
< >
39
- < Accordion elevation = { elevation } >
39
+ < Accordion elevation = { elevation } defaultExpanded >
40
40
< AccordionSummary
41
41
expandIcon = { < ExpandMoreIcon /> }
42
42
aria-controls = "panel2a-content"
@@ -46,34 +46,62 @@ export const AppSettings: FunctionComponent<Props> = ({elevation = 24}) => {
46
46
</ AccordionSummary >
47
47
< AccordionDetails sx = { { padding : "0px 8px 20px 8px" } } >
48
48
< FormGroup >
49
- < FormControlLabel
49
+ < Tooltip
50
50
key = { "Family" }
51
- control = { < Switch checked = { settings . sortFamily } onChange = { changeSettings } /> }
52
- label = { "Family" }
53
- name = { nameOfSetting ( "sortFamily" ) }
54
- />
55
- < FormControlLabel
51
+ title = { "Every verified relay family gets a somewhat unique looking color assigned. A circle's size is relative to the amount of relays located at it's center. Click a circle, to see details." }
52
+ placement = { "left" }
53
+ enterDelay = { tooltipTimeDelay }
54
+ >
55
+ < FormControlLabel
56
+ key = { "Family" }
57
+ control = { < Switch checked = { settings . sortFamily } onChange = { changeSettings } /> }
58
+ label = { "Family" }
59
+ name = { nameOfSetting ( "sortFamily" ) }
60
+ />
61
+ </ Tooltip >
62
+ < Tooltip
56
63
key = { "Country" }
57
- control = { < Switch checked = { settings . sortCountry } onChange = { changeSettings } /> }
58
- label = { "Country" }
59
- name = { nameOfSetting ( "sortCountry" ) }
60
- />
61
- < FormControlLabel
64
+ title = { "Relays, which are located in the same country, will be painted in the same color. Select a country, to see specific stats for it." }
65
+ placement = { "left" }
66
+ enterDelay = { tooltipTimeDelay }
67
+ >
68
+ < FormControlLabel
69
+ key = { "Country" }
70
+ control = { < Switch checked = { settings . sortCountry } onChange = { changeSettings } /> }
71
+ label = { "Country" }
72
+ name = { nameOfSetting ( "sortCountry" ) }
73
+ />
74
+ </ Tooltip >
75
+ < Tooltip
62
76
key = { "Coordinates" }
63
- control = { < Switch checked = { settings . aggregateCoordinates } onChange = { changeSettings } /> }
64
- label = { "Coordinates" }
65
- name = { nameOfSetting ( "aggregateCoordinates" ) }
66
- />
67
- < FormControlLabel
77
+ title = { "A circle is placed on the map when multiple relays are located at the same coordinates. A circle's size is relative to the amount of relays located at it's center. Click a circle, to see details." }
78
+ placement = { "left" }
79
+ enterDelay = { tooltipTimeDelay }
80
+ >
81
+ < FormControlLabel
82
+ key = { "Coordinates" }
83
+ control = { < Switch checked = { settings . aggregateCoordinates } onChange = { changeSettings } /> }
84
+ label = { "Coordinates" }
85
+ name = { nameOfSetting ( "aggregateCoordinates" ) }
86
+ />
87
+ </ Tooltip >
88
+ < Tooltip
68
89
key = { "Density heatmap" }
69
- control = { < Switch checked = { settings . heatMap } onChange = { changeSettings } /> }
70
- label = { "Density heatmap" }
71
- name = { nameOfSetting ( "heatMap" ) }
72
- />
90
+ title = { "This heatmap visualizes how many relays are present in an area relative to others." }
91
+ placement = { "left" }
92
+ enterDelay = { tooltipTimeDelay }
93
+ >
94
+ < FormControlLabel
95
+ key = { "Density heatmap" }
96
+ control = { < Switch checked = { settings . heatMap } onChange = { changeSettings } /> }
97
+ label = { "Density heatmap" }
98
+ name = { nameOfSetting ( "heatMap" ) }
99
+ />
100
+ </ Tooltip >
73
101
</ FormGroup >
74
102
</ AccordionDetails >
75
103
</ Accordion >
76
- < Accordion elevation = { elevation } >
104
+ < Accordion elevation = { elevation } defaultExpanded >
77
105
< AccordionSummary
78
106
expandIcon = { < ExpandMoreIcon /> }
79
107
aria-controls = "panel2a-content"
@@ -84,26 +112,33 @@ export const AppSettings: FunctionComponent<Props> = ({elevation = 24}) => {
84
112
< AccordionDetails sx = { { padding : "0px 8px 20px 8px" } } >
85
113
< FormGroup >
86
114
{ [ RelayType . Exit , RelayType . Guard , RelayType . Other ] . map ( relayType =>
87
- < FormControlLabel
115
+ < Tooltip
88
116
key = { relayType }
89
- control = {
90
- < Checkbox
91
- id = { relayType . toString ( ) }
92
- checked = { settings . showRelayTypes [ relayType ] }
93
- onChange = { changeSettings }
94
- />
95
- }
96
- label = {
97
- < Box
98
- display = "flex"
99
- alignItems = "center"
100
- >
101
- < span style = { { paddingRight : "10px" } } > { RelayTypeLabel [ relayType ] } </ span >
102
- { getIcon ( relayType ) }
103
- </ Box >
104
- }
105
- name = { showRelayTypesInput }
106
- />
117
+ title = { RelayTypeTooltip [ relayType ] }
118
+ placement = { "left" }
119
+ enterDelay = { tooltipTimeDelay }
120
+ >
121
+ < FormControlLabel
122
+ key = { relayType }
123
+ control = {
124
+ < Checkbox
125
+ id = { relayType . toString ( ) }
126
+ checked = { settings . showRelayTypes [ relayType ] }
127
+ onChange = { changeSettings }
128
+ />
129
+ }
130
+ label = {
131
+ < Box
132
+ display = "flex"
133
+ alignItems = "center"
134
+ >
135
+ < span style = { { paddingRight : "10px" } } > { RelayTypeLabel [ relayType ] } </ span >
136
+ { getIcon ( relayType ) }
137
+ </ Box >
138
+ }
139
+ name = { showRelayTypesInput }
140
+ />
141
+ </ Tooltip >
107
142
) }
108
143
</ FormGroup >
109
144
</ AccordionDetails >
@@ -114,7 +149,7 @@ export const AppSettings: FunctionComponent<Props> = ({elevation = 24}) => {
114
149
aria-controls = "panel2a-content"
115
150
id = "panel2a-header"
116
151
>
117
- < Typography className = { "heading" } > Relays must include flag</ Typography >
152
+ < Typography className = { "heading" } > Relays must have flag</ Typography >
118
153
</ AccordionSummary >
119
154
< AccordionDetails sx = { { padding : "0px 8px 20px 8px" } } >
120
155
< FormGroup >
@@ -123,12 +158,13 @@ export const AppSettings: FunctionComponent<Props> = ({elevation = 24}) => {
123
158
key = { option . relayFlag }
124
159
title = { option . tooltip }
125
160
placement = { "left" }
126
- enterDelay = { tooltipTimeDelay } >
161
+ enterDelay = { tooltipTimeDelay }
162
+ >
127
163
< FormControlLabel
128
164
control = {
129
165
< Checkbox
130
166
id = { option . relayFlag . toString ( ) }
131
- checked = { settings . relaysMustIncludeFlag [ option . relayFlag ] }
167
+ checked = { settings . relaysMustHaveFlag [ option . relayFlag ] }
132
168
onChange = { changeSettings }
133
169
/>
134
170
}
@@ -141,7 +177,7 @@ export const AppSettings: FunctionComponent<Props> = ({elevation = 24}) => {
141
177
< Box sx = { { margin : "8px 8px" } } >
142
178
< ExternalLink
143
179
href = { "https://github.com/torproject/torspec/blob/main/dir-spec.txt" }
144
- label = { "More information about flags " }
180
+ label = { "Learn more " }
145
181
/>
146
182
</ Box >
147
183
</ AccordionDetails >
0 commit comments