diff --git a/CMakeLists.txt b/CMakeLists.txt
index 71fe340..10021d3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 3.16.0)
project(pipedal
- VERSION 1.2.38
+ VERSION 1.2.40
DESCRIPTION "PiPedal Guitar Effect Pedal For Raspberry Pi"
HOMEPAGE_URL "https://rerdavies.github.io/pipedal"
)
-set (DISPLAY_VERSION "v1.2.38beta5")
+set (DISPLAY_VERSION "v1.2.40Beta6")
set (CMAKE_INSTALL_PREFIX "/usr/")
diff --git a/README.md b/README.md
index 24b232b..80862c7 100644
--- a/README.md
+++ b/README.md
@@ -6,16 +6,18 @@
-Download: v1.2.38 Beta5 Website: [https://rerdavies.github.io/pipedal](https://rerdavies.github.io/pipedal).
+Download: v1.2.40 Beta6
+Website: [https://rerdavies.github.io/pipedal](https://rerdavies.github.io/pipedal).
+Documentation: [https://rerdavies.github.io/pipedal/Documentation.html](https://rerdavies.github.io/pipedal/Documentation.html).
-#### NEW version 1.2.38 Beta5 release, providing support for Raspberry Pi OS Bookworm. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details.
+#### NEW version 1.2.40 Beta6 release, providing support for Raspberry Pi OS Bookworm. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details.
Use your Raspberry Pi as a guitar effects pedal. Configure and control PiPedal with your phone or tablet.
-PiPedal running on a Raspberry Pi 4 provides stable super-low-latency audio via external USB audio devices, or internal Raspberry Pi audio hats.
+PiPedal running on a Raspberry Pi 4 or Pi 5 provides stable super-low-latency audio via external USB audio devices, or internal Raspberry Pi audio hats.
PiPedal's user interface has been specifically designed to work well on small form-factor touch devices like phones or tablets. Clip a phone or tablet on your microphone stand on stage, and you're ready to play! Or connect via a desktop browser, for a slightly more luxurious experience. The PiPedal user-interface adapts to the screen size and orientation of your device, providing easy control of your guitar effects across a broad variety devices and screen sizes.
@@ -43,7 +45,7 @@ If your USB audio adapter has MIDI connectors, you can use MIDI devices (keyboar
### [Using LV2 Audio Plugins](https://rerdavies.github.io/pipedal/UsingLv2Plugins.md)
### [Which LV2 Plugins does PiPedal support?](https://rerdavies.github.io/pipedal/WhichLv2PluginsAreSupported.html)
-
+
### [Building PiPedal from Source](https://rerdavies.github.io/pipedal/BuildingPiPedalFromSource.html)
### [Build Prerequisites](https://rerdavies.github.io/pipedal/BuildPrerequisites.html)
diff --git a/docs/Installing.md b/docs/Installing.md
index 7a381a3..491cc49 100644
--- a/docs/Installing.md
+++ b/docs/Installing.md
@@ -13,17 +13,17 @@ page_icon: img/Install4.jpg
Download the most recent Debian (.deb) package for your platform:
-- [Raspberry Pi OS bookworm (64-bit) v1.2.38 Beta5](https://github.com/rerdavies/pipedal/releases/download/)
+- [Raspberry Pi OS bookworm (64-bit) v1.2.40 Beta6](https://github.com/rerdavies/pipedal/releases/download/)
- [Ubuntu/Raspberry Pi OS bullseyeye (64-bit) v1.2.31](https://github.com/rerdavies/pipedal/releases/download/v1.1.31/pipedal_1.1.31_arm64.deb)
-Version 1.2.38 has not yet been tested on Ubuntu or Raspberry Pi OS bullseye. On these platforms, we recommend that you use version 1.1.31.
+Version 1.2.40 has not yet been tested on Ubuntu or Raspberry Pi OS bullseye. On these platforms, we recommend that you use version 1.1.31.
Install the package by running
```
sudo apt update
cd ~/Downloads
- sudo apt-get install pipedal_1.2.38_arm64.deb
+ sudo apt-get install pipedal_1.2.40_arm64.deb
```
Adjust accordingly if you have downloaded v1.1.31.
diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md
index de4668d..d18864a 100644
--- a/docs/ReleaseNotes.md
+++ b/docs/ReleaseNotes.md
@@ -1,5 +1,9 @@
# Release Notes
-## Pipedal 1.2.38 Beta5
+## Pipedal 1.2.40 Beta6
+- PiPedal now monitors lv2 directories in order to automatically add newly-installed LV2 plugins.
+- Toggle and on/off switch colors changed from red/pink to purple.
+
+## Pipedal 1.2.38 Beta6
Fixes:
- PiPedal won't run on non-en-US locales.
diff --git a/docs/_includes/gallery.html b/docs/_includes/gallery.html
index 6a458cb..3b14c0b 100644
--- a/docs/_includes/gallery.html
+++ b/docs/_includes/gallery.html
@@ -201,8 +201,8 @@
+ "px; left: 0px; top: 0px; opacity: 0.0;"
+ " display: flex; flex-flow: row none; justify-content: space-between;align-items: end; padding:20; opacity: 0.8;'>");
{
- document.writeln("
-v1.2.38
+v1.2.40
-To download PiPedal, click [here](download.md).
+To download PiPedal, click [here](download.md).
+To view PiPedal documentation, click [here](Documentation.md).
-> NEW version 1.2.38 Beta5 release. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details.
+
+> NEW version 1.2.40 Beta6 release. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details.
Use your Raspberry Pi as a guitar effects pedal. Configure and control PiPedal with your phone or tablet.
-PiPedal running on a Raspberry Pi 4 provides stable super-low-latency audio via external USB audio devices, or internal Raspberry Pi audio hats.
+PiPedal running on a Raspberry Pi 4 or Pi 5 provides stable super-low-latency audio via external USB audio devices, or internal Raspberry Pi audio hats.
{% include gallery.html %}
diff --git a/react/CMakeLists.txt b/react/CMakeLists.txt
index bc702e4..1f2d20b 100644
--- a/react/CMakeLists.txt
+++ b/react/CMakeLists.txt
@@ -21,9 +21,57 @@ add_custom_command(
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/react
DEPENDS
- src/SelectThemeDialog.tsx
src/OkCancelDialog.tsx
src/PluginControl.tsx
+ src/svg/ic_save_bank_as.svg
+ src/svg/fx_constant.svg
+ src/svg/fx_distortion.svg
+ src/svg/ic_help_outline.svg
+ src/svg/fx_oscillator.svg
+ src/svg/fx_filter.svg
+ src/svg/fx_function.svg
+ src/svg/fx_generator.svg
+ src/svg/fx_compressor.svg
+ src/svg/file_download_black_24dp.svg
+ src/svg/fx_filter_hp.svg
+ src/svg/fx_plugin.svg
+ src/svg/fx_error.svg
+ src/svg/fx_gate.svg
+ src/svg/ic_midi.svg
+ src/svg/ic_pluginpreset.svg
+ src/svg/fx_split_a.svg
+ src/svg/fx_utility.svg
+ src/svg/ic_pluginpreset2.svg
+ src/svg/fx_parametric_eq.svg
+ src/svg/fx_terminal.svg
+ src/svg/ic_presets.svg
+ src/svg/fx_flanger.svg
+ src/svg/fx_analyzer.svg
+ src/svg/fx_delay.svg
+ src/svg/fx_spectral.svg
+ src/svg/fx_chorus.svg
+ src/svg/fx_simulator.svg
+ src/svg/drive_file_rename_outline_black_24dp.svg
+ src/svg/fx_mixer.svg
+ src/svg/fx_eq.svg
+ src/svg/fx_modulator.svg
+ src/svg/file_upload_black_24dp.svg
+ src/svg/fx_pitch.svg
+ src/svg/fx_phaser.svg
+ src/svg/fx_amplifier.svg
+ src/svg/fx_lr.svg
+ src/svg/fx_instrument.svg
+ src/svg/fx_reverb.svg
+ src/svg/ic_edit_banks.svg
+ src/svg/fx_limiter.svg
+ src/svg/fx_empty.svg
+ src/svg/fx_dial.svg
+ src/svg/fx_flanger2.svg
+ src/svg/fx_split_b.svg
+ src/svg/fx_spatial.svg
+ src/svg/fx_converter.svg
+ src/svg/old_delete_outline_24dp.svg
+ src/svg/ic_settings.svg
src/reportWebVitals.ts
src/JackHostStatus.tsx
src/PluginPresetsDialog.tsx
@@ -39,6 +87,7 @@ add_custom_command(
src/StringBuilder.tsx
src/FilePropertyDialog.tsx
src/GxTunerControl.tsx
+ src/DarkMode.tsx
src/App.tsx
src/GxTunerView.tsx
src/Rect.tsx
@@ -66,12 +115,14 @@ add_custom_command(
src/ToobPowerStage2View.tsx
src/ListSelectDialog.tsx
src/ToobWaveShapeView.tsx
+ src/SelectThemeDialog.tsx
src/PluginInfoDialog.tsx
src/SearchFilter.tsx
src/SearchControl.tsx
src/JackServerSettings.tsx
src/WifiChannel.tsx
src/WifiConfigDialog.tsx
+ src/FilePropertyDirectoryTree.tsx
src/App.test.tsx
src/PluginPresetSelector.tsx
src/ObservableProperty.tsx
@@ -97,6 +148,7 @@ add_custom_command(
src/AlsaMidiDeviceInfo.tsx
src/ResizeResponsiveComponent.tsx
src/RenameDialog.tsx
+ src/FilePropertyDirectorySelectDialog.tsx
src/SystemMidiBindingView.tsx
src/OldDeleteIcon.tsx
src/ToobInputStageView.tsx
@@ -122,142 +174,7 @@ add_custom_command(
src/MidiBindingView.tsx
src/PluginIcon.tsx
src/UploadFileDialog.tsx
-
- public/css/roboto.css
- public/logo192x.png
- public/robots.txt
- public/img/ic_drawer_2.png
- public/img/fx_constant.svg
- public/img/ic_presets_white.svg
- public/img/cx_mono.svg
- public/img/cx_stereo.svg
- public/img/fx_distortion.svg
- public/img/Pi-Logo-3.png
- public/img/fx_oscillator.svg
- src/svg/ic_save_bank_as.svg
- src/svg/ic_edit_banks.svg
- src/svg/ic_settings.svg
- public/img/fx_filter.svg
- public/img/delete_outline_black_24dp.svg
- public/img/fx_function.svg
- public/img/fx_generator.svg
- public/img/old_delete_outline_black_24dp.svg
- public/img/ic_bank.svg
- public/img/fx_compressor.svg
- public/img/fx_filter_hp.svg
- public/img/fx_plugin.svg
- public/img/fx_error.svg
- public/img/fx_gate.svg
- public/img/cc-by.png
- public/img/fx_split_a.svg
- public/img/fx_utility.svg
- src/svg/ic_help_outline.svg
- public/img/ic_navigate_before.svg
- public/img/ic_drawer_2.svg
- public/img/fx_parametric_eq.svg
- public/img/fx_terminal.svg
- public/img/ic_presets.svg
- public/img/VST_Logo_Steinberg.ico
- public/img/fx_flanger.svg
- public/img/fx_analyzer.svg
- public/img/fx_delay.svg
- public/img/fx_spectral.svg
- public/img/fx_chorus.svg
- public/img/fx_simulator.svg
- public/img/fx_mixer.svg
- public/img/fx_eq.svg
- public/img/fx_modulator.svg
- public/img/fx_pitch.svg
- public/img/ic_navigate_next.svg
- public/img/fx_phaser.svg
- public/img/ic_drawer.svg
- public/img/fx_amplifier.svg
- public/img/fx_lr.svg
- public/img/fx_instrument.svg
- public/img/Pi-Logo-3.svg
- public/img/fx_reverb.svg
- public/img/fx_limiter.svg
- public/img/VST_Logo_Steinberg.png
- public/img/fx_empty.svg
- public/img/fx_dial.svg
- public/img/ic_logo.svg
- public/img/fx_flanger2.svg
- public/img/old_delete_outline_white_24dp.svg
- public/img/fx_split_b.svg
- public/img/fx_spatial.svg
- public/img/fx_converter.svg
- public/img/vst.svg
- public/img/vst.png
- public/sample_lv2_plugins.json
- public/serve.json
- public/fonts/Roboto-LightItalic.woff2
- public/fonts/Roboto-Light.woff2
- public/fonts/Roboto-BlackItalic.woff2
- public/fonts/Roboto-ThinItalic.woff2
- public/fonts/Roboto-Bold.woff2
- public/fonts/Roboto-Italic.woff2
- public/fonts/Roboto-Black.woff2
- public/fonts/Roboto-BoldItalic.woff2
- public/fonts/Roboto-Regular.woff2
- public/fonts/Roboto-Medium.woff2
- public/fonts/Roboto-Thin.woff2
- public/fonts/LICENSE.txt
- public/fonts/Roboto-MediumItalic.woff2
- public/favicon.ico
- public/iso_codes.json
- public/logo192.png
- public/logo512.png
- public/index.html
- public/manifest.json
- public/var/config.json
- public/var/current_pedalboard.json
- public/var/uiplugins.json
- public/var/plugin_classes.json
- src/svg/fx_constant.svg
- src/svg/fx_distortion.svg
- src/svg/fx_oscillator.svg
- src/svg/fx_filter.svg
- src/svg/fx_function.svg
- src/svg/fx_generator.svg
- src/svg/fx_compressor.svg
- src/svg/file_download_black_24dp.svg
- src/svg/fx_filter_hp.svg
- src/svg/fx_plugin.svg
- src/svg/fx_error.svg
- src/svg/fx_gate.svg
- src/svg/ic_midi.svg
- src/svg/ic_pluginpreset.svg
- src/svg/fx_split_a.svg
- src/svg/fx_utility.svg
- src/svg/ic_pluginpreset2.svg
- src/svg/fx_parametric_eq.svg
- src/svg/fx_terminal.svg
- src/svg/ic_presets.svg
- src/svg/fx_flanger.svg
- src/svg/fx_analyzer.svg
- src/svg/fx_delay.svg
- src/svg/fx_spectral.svg
- src/svg/fx_chorus.svg
- src/svg/fx_simulator.svg
- src/svg/fx_mixer.svg
- src/svg/fx_eq.svg
- src/svg/fx_modulator.svg
- src/svg/file_upload_black_24dp.svg
- src/svg/fx_pitch.svg
- src/svg/fx_phaser.svg
- src/svg/fx_amplifier.svg
- src/svg/fx_lr.svg
- src/svg/fx_instrument.svg
- src/svg/fx_reverb.svg
- src/svg/fx_limiter.svg
- src/svg/fx_empty.svg
- src/svg/fx_dial.svg
- src/svg/fx_flanger2.svg
- src/svg/fx_split_b.svg
- src/svg/fx_spatial.svg
- src/svg/fx_converter.svg
- src/svg/old_delete_outline_24dp.svg
-
+
)
add_custom_target (
diff --git a/react/public/var/config.json b/react/public/var/config.json
index f808ca9..04d3a08 100644
--- a/react/public/var/config.json
+++ b/react/public/var/config.json
@@ -1,5 +1,5 @@
{
- "socket_server_port": 8080,
+ "socket_server_port": 80,
"socket_server_address": "*",
"debug": true,
"max_upload_size": 536870912,
diff --git a/react/src/AppThemed.tsx b/react/src/AppThemed.tsx
index 19965bc..56829fc 100644
--- a/react/src/AppThemed.tsx
+++ b/react/src/AppThemed.tsx
@@ -59,19 +59,19 @@ import { BankIndex, BankIndexEntry } from './Banks';
import RenameDialog from './RenameDialog';
import JackStatusView from './JackStatusView';
import { Theme } from '@mui/material/styles';
-import {isDarkMode} from './DarkMode';
+import { isDarkMode } from './DarkMode';
-import {ReactComponent as RenameOutlineIcon} from './svg/drive_file_rename_outline_black_24dp.svg';
-import {ReactComponent as SaveBankAsIcon} from './svg/ic_save_bank_as.svg';
-import {ReactComponent as EditBanksIcon} from './svg/ic_edit_banks.svg';
-import {ReactComponent as SettingsIcon} from './svg/ic_settings.svg';
-import {ReactComponent as HelpOutlineIcon} from './svg/ic_help_outline.svg';
+import { ReactComponent as RenameOutlineIcon } from './svg/drive_file_rename_outline_black_24dp.svg';
+import { ReactComponent as SaveBankAsIcon } from './svg/ic_save_bank_as.svg';
+import { ReactComponent as EditBanksIcon } from './svg/ic_edit_banks.svg';
+import { ReactComponent as SettingsIcon } from './svg/ic_settings.svg';
+import { ReactComponent as HelpOutlineIcon } from './svg/ic_help_outline.svg';
import DialogEx from './DialogEx';
const appStyles = (theme: Theme) => createStyles({
"&": { // :root
- colorScheme: (isDarkMode()? "dark": "light")
+ colorScheme: (isDarkMode() ? "dark" : "light")
},
menuListItem: {
color: "#FE8!important" as any, //theme.palette.text.primary,
@@ -95,7 +95,7 @@ const appStyles = (theme: Theme) => createStyles({
top: "0px",
width: "100%",
height: "100%",
- background: isDarkMode() ? "#222": "#DDD",
+ background: isDarkMode() ? "#222" : "#DDD",
opacity: "0.95",
justifyContent: "center",
textAlign: "center",
@@ -114,13 +114,13 @@ const appStyles = (theme: Theme) => createStyles({
top: "0px",
width: "100%",
height: "100%",
- color: isDarkMode() ? "#CCC": "#444",
+ color: isDarkMode() ? "#CCC" : "#444",
zIndex: 2000
},
errorContentMask: {
position: "absolute", left: 0, top: 0,
width: "100%", height: "100%",
- background: isDarkMode()? "#121212": "#BBB",
+ background: isDarkMode() ? "#121212" : "#BBB",
opacity: 0.95,
zIndex: 1999
},
@@ -511,7 +511,7 @@ const AppThemed = withStyles(appStyles)(class extends ResizeResponsiveComponent<
}
private unmountListener(e: Event) {
- if ((!this.model_.reloadRequested) && this.model_.state.get() === State.Ready && !this.model_.isAndroidHosted()) {
+ if (this.model_.state.get() === State.Ready && !this.model_.isAndroidHosted()) {
e.preventDefault();
(e as any).returnValue = "Are you sure you want to leave this page?";
return "Are you sure you want to leave this page?";
@@ -521,7 +521,7 @@ const AppThemed = withStyles(appStyles)(class extends ResizeResponsiveComponent<
componentDidMount() {
super.componentDidMount();
- window.addEventListener("beforeunload",this.unmountListener);
+ window.addEventListener("beforeunload", this.unmountListener);
this.model_.errorMessage.addOnChangedHandler(this.errorChangeHandler_);
this.model_.state.addOnChangedHandler(this.stateChangeHandler_);
@@ -533,417 +533,429 @@ const AppThemed = withStyles(appStyles)(class extends ResizeResponsiveComponent<
}
-updateOverscroll(): void {
- if(this.model_.serverVersion) {
- // no pull-down refresh on android devices once we're ready (unless we're debug)
- let preventOverscroll =
- this.model_.state.get() === State.Ready
- && !this.model_.debug;
+ updateOverscroll(): void {
+ if (this.model_.serverVersion) {
+ // no pull-down refresh on android devices once we're ready (unless we're debug)
+ let preventOverscroll =
+ this.model_.state.get() === State.Ready
+ && !this.model_.debug;
- let overscrollBehavior = preventOverscroll ? "none" : "auto";
- document.body.style.overscrollBehavior = overscrollBehavior;
-}
+ let overscrollBehavior = preventOverscroll ? "none" : "auto";
+ document.body.style.overscrollBehavior = overscrollBehavior;
+ }
}
-componentDidUpdate() {
-}
+ componentDidUpdate() {
+ }
-componentWillUnmount() {
- super.componentWillUnmount();
- window.removeEventListener("beforeunload",this.unmountListener);
+ componentWillUnmount() {
+ super.componentWillUnmount();
+ window.removeEventListener("beforeunload", this.unmountListener);
- this.model_.errorMessage.removeOnChangedHandler(this.errorChangeHandler_);
- this.model_.state.removeOnChangedHandler(this.stateChangeHandler_);
- this.model_.pedalboard.removeOnChangedHandler(this.presetChangedHandler);
- this.model_.banks.removeOnChangedHandler(this.banksChangedHandler);
- this.model_.banks.removeOnChangedHandler(this.showStatusMonitorHandler);
+ this.model_.errorMessage.removeOnChangedHandler(this.errorChangeHandler_);
+ this.model_.state.removeOnChangedHandler(this.stateChangeHandler_);
+ this.model_.pedalboard.removeOnChangedHandler(this.presetChangedHandler);
+ this.model_.banks.removeOnChangedHandler(this.banksChangedHandler);
+ this.model_.banks.removeOnChangedHandler(this.showStatusMonitorHandler);
-}
+ }
+
+ alertMessageChangedHandler() {
+ let message = this.model_.alertMessage.get();
+ if (message === "") {
+ this.setState({ alertDialogOpen: false });
+ // leave the message intact so the dialog can fade.
+ } else {
+ this.setState({
+ alertDialogOpen: true,
+ alertDialogMessage: message
+ });
+ }
+
+ }
+ updateResponsive() {
+ // functional, but disabled.
+ // let tinyToolBar_ = this.windowSize.height < 600;
+ // this.setState({ tinyToolBar: tinyToolBar_ });
+
+ let height = this.windowSize.height;
+
+ const ENTRY_HEIGHT = 48;
+ // ENTRY_HEIGHT*6 +K = 727 from observation.
+ const K = 450;
+
+ let bankEntries = Math.floor((height - K) / ENTRY_HEIGHT);
+ if (bankEntries < 1) bankEntries = 1;
+ if (bankEntries > 7) bankEntries = 7;
+ this.setState({ bankDisplayItems: bankEntries });
+
+ }
+ onWindowSizeChanged(width: number, height: number): void {
+ super.onWindowSizeChanged(width, height);
+ this.updateResponsive();
+ }
+
+
+ setErrorMessage(message: string): void {
+ this.setState({ errorMessage: message });
+ }
+
+
+ setDisplayState(newState: State): void {
+ this.updateOverscroll();
-alertMessageChangedHandler() {
- let message = this.model_.alertMessage.get();
- if (message === "") {
- this.setState({ alertDialogOpen: false });
- // leave the message intact so the dialog can fade.
- } else {
this.setState({
- alertDialogOpen: true,
- alertDialogMessage: message
+ displayState: newState,
+ canFullScreen: supportsFullScreen() && !this.model_.isAndroidHosted()
});
- }
-
-}
-updateResponsive() {
- // functional, but disabled.
- // let tinyToolBar_ = this.windowSize.height < 600;
- // this.setState({ tinyToolBar: tinyToolBar_ });
-
- let height = this.windowSize.height;
-
- const ENTRY_HEIGHT = 48;
- // ENTRY_HEIGHT*6 +K = 727 from observation.
- const K = 450;
-
- let bankEntries = Math.floor((height - K) / ENTRY_HEIGHT);
- if (bankEntries < 1) bankEntries = 1;
- if (bankEntries > 7) bankEntries = 7;
- this.setState({ bankDisplayItems: bankEntries });
-
-}
-onWindowSizeChanged(width: number, height: number): void {
- super.onWindowSizeChanged(width, height);
- this.updateResponsive();
-}
-
-
-setErrorMessage(message: string): void {
- this.setState({ errorMessage: message });
-}
-
-
-setDisplayState(newState: State): void {
- this.updateOverscroll();
-
- this.setState({
- displayState: newState,
- canFullScreen: supportsFullScreen() && !this.model_.isAndroidHosted()
- });
- if(newState === State.Ready)
-{
- if (this.model_.isOnboarding()) {
- this.handleDisplayOnboarding();
- }
-}
- }
-
-showDrawer() {
- this.setState({ isDrawerOpen: true })
-}
-hideDrawer() {
- this.setState({ isDrawerOpen: false })
-}
-shortBankList(banks: BankIndex): BankIndexEntry[] {
- let n = this.state.bankDisplayItems;
- let entries = banks.entries;
- if (entries.length < n + 1) { // +1 for the .... entry.
- return entries;
- }
- let result: BankIndexEntry[] = [];
- let selectedIndex = -1;
- for (let i = 0; i < entries.length; ++i) {
- if (entries[i].instanceId === banks.selectedBank) {
- selectedIndex = i;
- break;
+ if (newState === State.Ready) {
+ if (this.model_.isOnboarding()) {
+ this.handleDisplayOnboarding();
+ }
}
}
- if (n > entries.length) n = entries.length;
- if (selectedIndex > n) {
- for (let i = 0; i < n - 1; ++i) {
- result.push(entries[i]);
+
+ showDrawer() {
+ this.setState({ isDrawerOpen: true })
+ }
+ hideDrawer() {
+ this.setState({ isDrawerOpen: false })
+ }
+ shortBankList(banks: BankIndex): BankIndexEntry[] {
+ let n = this.state.bankDisplayItems;
+ let entries = banks.entries;
+ if (entries.length < n + 1) { // +1 for the .... entry.
+ return entries;
}
- result.push(entries[selectedIndex]);
- } else {
- for (let i = 0; i < n; ++i) {
- result.push(entries[i]);
+ let result: BankIndexEntry[] = [];
+ let selectedIndex = -1;
+ for (let i = 0; i < entries.length; ++i) {
+ if (entries[i].instanceId === banks.selectedBank) {
+ selectedIndex = i;
+ break;
+ }
+ }
+ if (n > entries.length) n = entries.length;
+ if (selectedIndex > n) {
+ for (let i = 0; i < n - 1; ++i) {
+ result.push(entries[i]);
+ }
+ result.push(entries[selectedIndex]);
+ } else {
+ for (let i = 0; i < n; ++i) {
+ result.push(entries[i]);
+ }
+ }
+ return result;
+ }
+ handleReload() {
+ if (this.model_.isAndroidHosted()) {
+ this.model_.chooseNewDevice();
+ } else {
+ window.location.reload();
}
}
- return result;
-}
-handleReload() {
- if (this.model_.isAndroidHosted()) {
- this.model_.chooseNewDevice();
- } else {
- window.location.reload();
+ getReloadingMessage(): string {
+ switch (this.state.displayState) {
+ case State.ApplyingChanges:
+ return "Applying\u00A0changes...";
+ case State.ReloadingPlugins:
+ return "Reloading\u00A0plugins...";
+ default:
+ return "Reconnecting...";
+ }
}
-}
-render() {
+ render() {
- const { classes } = this.props;
+ const { classes } = this.props;
- let shortBankList = this.shortBankList(this.state.banks);
- let showBankSelectDialog = shortBankList.length !== this.state.banks.entries.length;
+ let shortBankList = this.shortBankList(this.state.banks);
+ let showBankSelectDialog = shortBankList.length !== this.state.banks.entries.length;
- return (
- - Error: {this.state.errorMessage} -
-