Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/pages/themeSetting/themeSetting.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import "./themeSetting.scss";
import Page from "components/page";
import searchBar from "components/searchbar";
import TabView from "components/tabView";
import alert from "dialogs/alert";
import Ref from "html-tag-js/ref";
import actionStack from "lib/actionStack";
import removeAds from "lib/removeAds";
Expand All @@ -15,7 +16,7 @@ export default function () {
const $page = Page(strings.theme.capitalize());
const $search = <span attr-action="search" className="icon search"></span>;
const $themePreview = <div id="theme-preview"></div>;
const list = Ref();
const list = new Ref();
const editor = ace.edit($themePreview);

const session = ace.createEditSession("");
Expand Down Expand Up @@ -195,8 +196,10 @@ console.log(message);`);
function setEditorTheme({ caption, theme }) {
if (appSettings.value.appTheme.toLowerCase() === "system") {
alert(
"Info",
"App theme is set to 'System'. Changing the editor theme will not affect the editor appearance.",
);
return;
}
editorManager.editor.setTheme(theme);
editor.setTheme(theme); // preview
Expand Down