mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
client: Hide tray settings on web
This commit is contained in:
parent
4a8c3d719f
commit
1172908e41
@ -6,3 +6,8 @@ test("Native Title Bar not displayed on web", async ({ page }) => {
|
||||
await expect(page.getByRole('heading', { name: 'Native Title Bar (requires' })).toBeHidden();
|
||||
});
|
||||
|
||||
test("Tray settings not displayed on web", async ({ page }) => {
|
||||
await page.goto('http://localhost:8082/#root/_hidden/_options/_optionsOther');
|
||||
await expect(page.getByRole('heading', { name: 'Note Erasure Timeout' })).toBeVisible();
|
||||
await expect(page.getByRole('heading', { name: 'Tray' })).toBeHidden();
|
||||
});
|
@ -1,5 +1,6 @@
|
||||
import OptionsWidget from "../options_widget.js";
|
||||
import { t } from "../../../../services/i18n.js";
|
||||
import utils from "../../../../services/utils.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="options-section">
|
||||
@ -19,6 +20,10 @@ export default class TrayOptions extends OptionsWidget {
|
||||
this.updateOption('disableTray', !this.$trayEnabled.is(":checked") ? "true" : "false"));
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
return utils.isElectron();
|
||||
}
|
||||
|
||||
async optionsLoaded(options) {
|
||||
this.$trayEnabled.prop("checked", options.disableTray !== 'true');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user