Skip to content

Commit 985112a

Browse files
committed
Use system theme by default (even without Pro!)
1 parent c534822 commit 985112a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@
7070
</div>
7171

7272
<script>
73-
const bgColor = localStorage.getItem('theme-background-color') || '#e4e8ed';
73+
const bgColor = localStorage.getItem('theme-background-color') || (
74+
// Use dark/light theme containerBackground
75+
window.matchMedia("(prefers-color-scheme: dark)")
76+
? '#1e2028'
77+
: '#e4e8ed'
78+
);
7479
document.querySelector('html').style.backgroundColor = bgColor;
7580

7681
let progressElement = document.getElementById('progress-logo');

src/model/ui/ui-store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export class UiStore {
117117
// closed), but don't get reset when the app starts with stale account data.
118118
observe(this.accountStore, 'accountDataLastUpdated', () => {
119119
if (!this.accountStore.isPaidUser) {
120-
this.setTheme('light');
120+
this.setTheme('automatic');
121121
}
122122
});
123123

0 commit comments

Comments
 (0)