Skip to content

Commit

Permalink
Add None Outer Theme Option
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvNC committed Sep 17, 2024
1 parent 547a628 commit 35fbfbe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions ext/js/app/theme-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export class ThemeController {
constructor(element) {
/** @type {?HTMLElement} */
this._element = element;
/** @type {'light'|'dark'|'browser'|'site'} */
/** @type {import("settings.js").PopupTheme} */
this._theme = 'site';
/** @type {'light'|'dark'|'browser'|'site'} */
/** @type {import("settings.js").PopupOuterTheme} */
this._outerTheme = 'site';
/** @type {?('dark'|'light')} */
this._siteTheme = null;
Expand Down Expand Up @@ -57,31 +57,31 @@ export class ThemeController {

/**
* Gets the main theme for the content.
* @type {'light'|'dark'|'browser'|'site'}
* @type {import("settings.js").PopupTheme}
*/
get theme() {
return this._theme;
}

/**
* Sets the main theme for the content.
* @param {'light'|'dark'|'browser'|'site'} value The theme value to assign.
* @param {import("settings.js").PopupTheme} value The theme value to assign.
*/
set theme(value) {
this._theme = value;
}

/**
* Gets the outer theme for the content.
* @type {'light'|'dark'|'browser'|'site'}
* @type {import("settings.js").PopupOuterTheme}
*/
get outerTheme() {
return this._outerTheme;
}

/**
* Sets the outer theme for the content.
* @param {'light'|'dark'|'browser'|'site'} value The outer theme value to assign.
* @param {import("settings.js").PopupOuterTheme} value The outer theme value to assign.
*/
set outerTheme(value) {
this._outerTheme = value;
Expand Down
1 change: 1 addition & 0 deletions ext/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ <h1>Yomitan Settings</h1>
<option value="light">Light</option>
<option value="dark">Dark</option>
<option value="browser">Browser</option>
<option value="none">None</option>
</select>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions types/ext/settings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,9 @@ export type PopupVerticalTextPosition = 'default' | 'before' | 'after' | 'left'

export type GlossaryLayoutMode = 'default' | 'compact';

export type PopupTheme = 'light' | 'dark' | 'browser';
export type PopupTheme = 'light' | 'dark' | 'browser' | 'site';

export type PopupOuterTheme = 'light' | 'dark' | 'browser' | 'site';
export type PopupOuterTheme = 'light' | 'dark' | 'browser' | 'site' | 'none';

export type PopupCurrentIndicatorMode = 'none' | 'asterisk' | 'triangle' | 'bar-left' | 'bar-right' | 'dot-left' | 'dot-right';

Expand Down

0 comments on commit 35fbfbe

Please sign in to comment.