diff --git a/apps/user_settings/app.js b/apps/user_settings/app.js index b6c42063..ca60d601 100644 --- a/apps/user_settings/app.js +++ b/apps/user_settings/app.js @@ -21,7 +21,7 @@ tfrpc.register(async function getThemes() { }); tfrpc.register(async function getTheme() { // TODO - return 'solarized'; + return 'gruvbox'; }); tfrpc.register(async function setTheme() { // TODO diff --git a/apps/user_settings/tf-identity-manager.js b/apps/user_settings/tf-identity-manager.js index bf501b42..789e5389 100644 --- a/apps/user_settings/tf-identity-manager.js +++ b/apps/user_settings/tf-identity-manager.js @@ -35,7 +35,7 @@ class TfIdentityManagerElement extends LitElement { try { const newID = await tfrpc.rpc.addID(words); - if (newID) alert('Successfully imported a new identity'); + if (newID) alert('Successfully imported a new identity.'); else alert('This identity already exists or is invalid.'); await tfrpc.rpc.reload(); } catch (err) { diff --git a/apps/user_settings/tf-theme-picker.js b/apps/user_settings/tf-theme-picker.js index 2a74dfb1..48d6f794 100644 --- a/apps/user_settings/tf-theme-picker.js +++ b/apps/user_settings/tf-theme-picker.js @@ -1,4 +1,4 @@ -import {LitElement, html} from './lit-all.min.js'; +import {LitElement, html, nothing} from './lit-all.min.js'; import * as tfrpc from '/static/tfrpc.js'; class TfThemePickerElement extends LitElement { @@ -16,6 +16,10 @@ class TfThemePickerElement extends LitElement { async load() { this.themes = await tfrpc.rpc.getThemes(); + this.selected = await tfrpc.rpc.getTheme(); + + let select = this.renderRoot?.querySelector('#theme-select'); + select.value = this.selected; } changed(event) { @@ -32,11 +36,12 @@ class TfThemePickerElement extends LitElement { `;