Skip to content

Commit

Permalink
fix settings save bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stephtr committed Apr 2, 2023
1 parent 80aa2b7 commit 7e359a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions website/src/lib/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class Settings {
'qalculator-settings',
JSON.stringify({
angleUnit: this.angleUnit,
useUnits: this.useUnits,
useUnitPrefixes: this.useUnitPrefixes,
useDecimalPoint: this.useDecimalPoint,
additionalOptions: this.additionalOptions,
Expand Down
8 changes: 6 additions & 2 deletions website/src/lib/settingsWidget.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@
/>
Use units<br />
{#if settings.useUnits}
<span style="color:#BBFFBB">c</span> = <span style="color:#AAFFFF">299 792 458</span> <span style="color:#BBFFBB">m ∕ s</span>
<span style="color:#BBFFBB">c</span> =
<span style="color:#AAFFFF">299 792 458</span>
<span style="color:#BBFFBB">m ∕ s</span>
{:else}
<span style="color:#BBFFBB">c</span> = <span style="color:#AAFFFF">299 792 458</span>
<span style="color:#BBFFBB">c</span> =
<span style="color:#AAFFFF">299 792 458</span>
{/if}
</label>

Expand Down Expand Up @@ -155,6 +158,7 @@
<input
type="checkbox"
bind:checked={settings.sendUsageStatistics}
on:change={() => settings.save()}
/>
Send anonymous usage statistics<br />
<span class="damped">(We don't record your calculations)</span>
Expand Down

0 comments on commit 7e359a9

Please sign in to comment.