Add config option to enable doublesize mode

This commit is contained in:
Jordan Eldredge 2023-02-06 19:35:40 -08:00
parent 17f0a393f7
commit b444578571
4 changed files with 21 additions and 2 deletions

View file

@ -1,7 +1,9 @@
## Upcoming [UNRELEASED]
## Upcoming [UNRELEASED] (`webamp@next`)
### Features
- Allow a single mouse drag across the EQ to set all values [#1180](https://github.com/captbaritone/webamp/pull/1180)
- Configure the initial layout of windows -- size, position, openness, shade mode -- when constructing a Webamp instance.
- Configure if "double size mode" should be enabled when constructing a Webamp instance.
### Internal Improvements:

View file

@ -142,6 +142,9 @@ const options = {
{ url: "./osx.wsz", name: "Mac OSX v1.5 (Aqua)" }
],
// Optional. (Default: `false`) Should double size mode be enabled?
enableDoubleSizeMode: true,
// Optional. (Default: `false`) Should global hotkeys be enabled?
enableHotkeys: true,
@ -150,7 +153,8 @@ const options = {
// Optional. An array of additional file pickers.
// These will appear in the "Options" menu under "Play".
// In the offical version. This option is used to provide a "Dropbox" file picker.
// In the demo site, This option is used to provide a "Dropbox" file
// picker.
filePickers: [{
// The name that will appear in the context menu.
contextMenuName: "My File Picker...",

View file

@ -659,6 +659,14 @@ export interface Options {
windowLayout?: WindowLayout;
/**
* Controls if "double size mode", where the fixed sized windows are rendered
* at 2x, should be enabled
*
* Default: `false`
*/
enableDoubleSizeMode?: boolean;
/**
* Should global hotkeys be enabled?
*

View file

@ -91,6 +91,7 @@ class Webamp {
handleAddUrlEvent,
handleLoadListEvent,
handleSaveListEvent,
enableDoubleSizeMode,
__butterchurnOptions,
__customMediaClass,
} = this.options;
@ -132,6 +133,10 @@ class Webamp {
}
) as Store;
if (enableDoubleSizeMode) {
this.store.dispatch(Actions.toggleDoubleSizeMode());
}
if (navigator.onLine) {
this.store.dispatch({ type: NETWORK_CONNECTED });
} else {