Skip to content

Commit

Permalink
reorganise settings
Browse files Browse the repository at this point in the history
  • Loading branch information
joneugster committed Aug 25, 2024
1 parent ec36e1a commit 53e621b
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions client/src/Popups/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,26 @@ const SettingsPopup: FC<{
</select>
</p>

<h2>User settings</h2>
<p><i>These settings are not preserved unless you opt-in to save them.</i></p>
<h2>Editor settings</h2>
<p>
<label htmlFor="abbreviationCharacter">Lead character to trigger unicode input mode</label>
<input id="abbreviationCharacter" type="text"
onChange={(ev) => {modifyPreferences("abbreviationCharacter", ev.target.value)}}
value={preferences.abbreviationCharacter} />
</p>
<p className="flex">
<p>
<Switch id="wordWrap" onChange={() => {modifyPreferences("wordWrap", !preferences.wordWrap)}}
checked={preferences.wordWrap} />
<label htmlFor="wordWrap">Wrap code</label>
</p>
<p>
<Switch id="acceptSuggestionOnEnter" onChange={() => {modifyPreferences("acceptSuggestionOnEnter", !preferences.acceptSuggestionOnEnter)}}
checked={preferences.acceptSuggestionOnEnter} />
<label htmlFor="acceptSuggestionOnEnter">Accept Suggestion on Enter</label>
</p>

<h2>User settings</h2>
<p>
<label htmlFor="theme">Theme: </label>
<select
id="theme"
Expand Down Expand Up @@ -109,16 +120,9 @@ const SettingsPopup: FC<{
checked={preferences.compress} />
<label htmlFor="compress">Compress code in URL (if shorter)</label>
</p>
<p>
<Switch id="wordWrap" onChange={() => {modifyPreferences("wordWrap", !preferences.wordWrap)}}
checked={preferences.wordWrap} />
<label htmlFor="wordWrap">Wrap code</label>
</p>
<p>
<Switch id="acceptSuggestionOnEnter" onChange={() => {modifyPreferences("acceptSuggestionOnEnter", !preferences.acceptSuggestionOnEnter)}}
checked={preferences.acceptSuggestionOnEnter} />
<label htmlFor="acceptSuggestionOnEnter">Accept Suggestion on Enter</label>
</p>

<h2>Save</h2>
<p><i>Editor settings and User settings are not preserved unless you opt-in to save them.</i></p>
<p>
<Switch id="savingAllowed" onChange={() => {modifyPreferences("saveInLocalStore", !preferences.saveInLocalStore)}} checked={preferences.saveInLocalStore} />
<label htmlFor="savingAllowed">Save my settings (in the browser store)</label>
Expand Down

0 comments on commit 53e621b

Please sign in to comment.