Checkpoint

This commit is contained in:
Robin E. R. Davies
2025-08-01 18:24:54 -04:00
parent af5b1542b1
commit aa13301b84
16 changed files with 415 additions and 388 deletions
+13 -2
View File
@@ -167,6 +167,7 @@ export interface FilePropertyDialogState {
moveDialogOpen: boolean;
copyDialogOpen: boolean;
initialSelection: string;
previousSelection: string;
multiSelect: boolean,
selectedFiles: string[],
//openTone3000Dialog: boolean,
@@ -241,6 +242,7 @@ export default withStyles(
moveDialogOpen: false,
copyDialogOpen: false,
initialSelection: this.props.selectedFile,
previousSelection: this.props.selectedFile,
multiSelect: false,
selectedFiles: [],
//openTone3000Dialog: false,
@@ -678,7 +680,7 @@ export default withStyles(
this.requestScroll = true;
if (!fileEntry.isDirectory) {
if (!this.isFolderArtwork(fileEntry.pathname)) {
this.props.onApply(this.props.fileProperty, fileEntry.pathname);
this.handleApply(this.props.fileProperty, fileEntry.pathname);
}
}
this.setState({
@@ -695,6 +697,15 @@ export default withStyles(
}
this.openSelectedFile();
}
handleApply(fileProperty: UiFileProperty, selectedItem: string)
{
if (this.state.previousSelection == selectedItem) {
return;
}
this.props.onApply(fileProperty, selectedItem);
this.setState({previousSelection: selectedItem});
}
handleMenuOpen(event: React.MouseEvent<HTMLElement>) {
this.setState({ menuAnchorEl: event.currentTarget });
@@ -1565,7 +1576,7 @@ export default withStyles(
<div style={{ flex: "1 1 auto" }}>&nbsp;</div>
<Button variant="dialogSecondary" onClick={() => {
this.props.onApply(this.props.fileProperty, this.state.initialSelection);
this.handleApply(this.props.fileProperty, this.state.initialSelection);
this.props.onCancel();
}} aria-label="cancel">
Cancel
+11 -6
View File
@@ -602,10 +602,12 @@ export const LoadPluginDialog =
return;
}
if (this.changedSearchString !== undefined) {
this.requestScrollTo();
this.setState({
search_string: this.changedSearchString
});
if (this.state.search_string !== this.changedSearchString) {
this.requestScrollTo();
this.setState({
search_string: this.changedSearchString
});
}
this.changedSearchString = undefined;
}
this.hSearchTimeout = undefined;
@@ -642,7 +644,10 @@ export const LoadPluginDialog =
const classes = withStyles.getClasses(this.props);
let isFavorite: boolean = this.state.favoritesList[value.uri] ?? false;
let pluginType = value.plugin_type;
if (value.uri === "http://two-play.com/plugins/toob-nam") {
pluginType = PluginType.NamPlugin;
}
return (
<div key={value.uri}
onDoubleClick={(e) => { this.onDoubleClick(e, value.uri) }}
@@ -654,7 +659,7 @@ export const LoadPluginDialog =
<SelectHoverBackground selected={value.uri === this.state.selected_uri} showHover={true} />
<div className={classes.content}>
<div className={classes.iconBorder} >
<PluginIcon pluginType={value.plugin_type} size={24} opacity={0.6} />
<PluginIcon pluginType={pluginType} size={24} opacity={0.6} />
</div>
<div className={classes.content2}>
<div className={classes.label} style={{ display: "flex", flexFlow: "row nowrap", alignItems: "center" }} >
+5 -2
View File
@@ -471,6 +471,9 @@ export enum PluginType {
None = "",
InvalidPlugin = "InvalidPlugin",
// "special"
NamPlugin = "NamPlugin",
Plugin = "Plugin",
AllpassPlugin = "AllpassPlugin",
AmplifierPlugin = "AmplifierPlugin",
@@ -510,7 +513,7 @@ export enum PluginType {
UtilityPlugin = "UtilityPlugin",
WaveshaperPlugin = "WaveshaperPlugin",
// psuedo plugin type for the Amps node of the filter dialog.
// pseudo plugin type for the Amps node of the filter dialog.
PiPedalAmpsNode = "PiPedalAmpsNode",
// pseudo plugin types for splitter.
@@ -521,7 +524,7 @@ export enum PluginType {
// psuedo plugin type for misc icons.
// pseudo plugin type for misc icons.
ErrorPlugin = "ErrorPlugin",
Terminal = "Terminal", //"img/fx_terminal.svg";
+14 -4
View File
@@ -327,8 +327,12 @@ class PedalLayout {
else {
let uiPlugin = model.getUiPlugin(pedalItem.uri);
if (uiPlugin != null) {
this.pluginType = uiPlugin.plugin_type;
this.iconUrl = SelectIconUri(uiPlugin.plugin_type);
let pluginType = uiPlugin.plugin_type;
this.pluginType = pluginType;
if (this.uri === "http://two-play.com/plugins/toob-nam") {
pluginType = PluginType.NamPlugin;
}
this.iconUrl = SelectIconUri(pluginType);
this.name = uiPlugin.label;
if (pedalItem.title !== "") {
this.name = pedalItem.title;
@@ -1109,12 +1113,18 @@ withStyles(
</div>
)
let uiPlugin = this.model.getUiPlugin(item.pedalItem?.uri ?? "");
let pluginMissing = uiPlugin == null;
let pluginMissing = uiPlugin === null;
let pluginType = item.pluginType;
if (uiPlugin && uiPlugin.uri === "http://two-play.com/plugins/toob-nam")
{
pluginType = PluginType.NamPlugin;
}
result.push(<div key={this.renderKey++} className={classes.pedalItem} style={{ left: item.bounds.x, top: item.bounds.y }} >
{this.pedalButton(
item.pedalItem?.instanceId ?? -1,
item.pluginType,
pluginType,
!item.isEmpty(),
item.pedalItem?.isEnabled ?? false,
true,
+11 -1
View File
@@ -32,6 +32,7 @@ import FxPhaserIcon from './svg/fx_phaser.svg?react';
import FxFilterIcon from './svg/fx_filter.svg?react';
import FxDelayIcon from './svg/fx_delay.svg?react';
import FxNamIcon from './svg/fx_nam.svg?react';
import FxAmplifierIcon from './svg/fx_amplifier.svg?react';
import FxChorusIcon from './svg/fx_chorus.svg?react';
import FxModulatorIcon from './svg/fx_modulator.svg?react';
@@ -97,9 +98,14 @@ export function SelectSvgIcon(plugin_type: PluginType, className: string, size:
}
let myStyle = { width: size, height: size, opacity: opacity, color: color, fill: color };
switch (plugin_type) {
case PluginType.NamPlugin:
return <FxNamIcon className={className} style={myStyle} />;
case PluginType.PhaserPlugin:
return <FxPhaserIcon className={className} style={myStyle} />;
case PluginType.FilterPlugin:
case PluginType.BandpassPlugin:
case PluginType.AllpassPlugin:
return <FxFilterIcon className={className} style={myStyle} />;
case PluginType.DelayPlugin:
return <FxDelayIcon className={className} style={myStyle} />;
@@ -175,16 +181,20 @@ export function SelectSvgIcon(plugin_type: PluginType, className: string, size:
case PluginType.Terminal:
return <FxTerminalIcon className={className} style={myStyle} />;
default:
case PluginType.Plugin:
default:
return <FxPluginIcon className={className} style={myStyle} />;
}
}
export function SelectBaseIcon(plugin_type: PluginType): string {
switch (plugin_type) {
case PluginType.NamPlugin:
return "fx_nam.svg";
case PluginType.PhaserPlugin:
return "fx_phaser.svg";
case PluginType.FilterPlugin:
case PluginType.BandpassPlugin:
case PluginType.AllpassPlugin:
return "fx_filter.svg";
case PluginType.DelayPlugin:
return "fx_delay.svg";
+21
View File
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version="1.1"
x="0px"
y="0px"
width="48"
height="48"
viewBox="0 0 48 48"
enable-background="new 0 0 48 48"
xml:space="preserve"
id="svg141"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs145" />
<path
id="path138"
d="M 7,1 C 3.6870066,1 1,3.6870066 1,7 v 34 c 0,3.312994 2.6870066,6 6,6 h 34 c 3.312994,0 6,-2.688006 6,-6 V 7 C 47,3.6870066 44.312994,1 41,1 Z m 8.841797,6.515625 h 5.041015 c 0.588947,0 1.082064,0.1968374 1.480469,0.5917969 0.398405,0.3949594 0.597657,0.8848969 0.597657,1.46875 v 8.2421871 h -3.119141 l -2.078125,2.060547 h 5.197266 v 6.181641 h -4.574219 l -2.078125,-4.121094 h -4.78125 L 9.4492188,24 H 15.0625 l 2.078125,4.121094 h 5.820313 v 10.302734 c 0,0.583853 -0.199252,1.073791 -0.597657,1.46875 -0.398405,0.39496 -0.891522,0.591797 -1.480469,0.591797 h -5.041015 c -0.381083,0 -0.737289,-0.09431 -1.066406,-0.283203 -0.329117,-0.188894 -0.578734,-0.453432 -0.751953,-0.796875 L 9.96875,32.242188 h 3.013672 l 2.080078,4.121093 h 4.779297 V 34.302734 H 16.308594 L 14.230469,30.181641 H 8.8261719 L 5.8632812,25.03125 C 5.7939934,24.859528 5.7336065,24.687346 5.6816406,24.515625 5.6296747,24.343903 5.6035156,24.171721 5.6035156,24 c 0,-0.137377 0.086546,-0.481741 0.2597656,-1.03125 l 2.9628907,-5.150391 h 5.4042971 l 2.078125,-4.121093 h 3.533203 V 11.636719 H 15.0625 l -2.080078,4.121093 H 9.96875 l 4.054688,-7.1621089 c 0.173219,-0.343443 0.422836,-0.6079813 0.751953,-0.796875 0.329117,-0.1888936 0.685323,-0.2832031 1.066406,-0.2832031 z m 11.275391,0 h 5.041015 c 0.381084,0 0.737289,0.094309 1.066406,0.2832031 0.329117,0.1888937 0.578734,0.453432 0.751953,0.796875 L 38.03125,15.757812 H 35.017578 L 32.9375,11.636719 h -4.779297 v 2.060547 h 3.533203 l 2.078125,4.121093 h 5.404297 l 2.962891,5.150391 c 0.06929,0.171721 0.129675,0.343903 0.18164,0.515625 0.05197,0.171721 0.07813,0.343903 0.07813,0.515625 0,0.137377 -0.08655,0.481741 -0.259765,1.03125 l -2.962891,5.150391 h -5.404297 l -2.078125,4.121093 h -3.533203 v 2.060547 H 32.9375 l 2.080078,-4.121093 h 3.013672 l -4.054688,7.162109 c -0.173219,0.343443 -0.422836,0.607981 -0.751953,0.796875 -0.329117,0.188894 -0.685322,0.283203 -1.066406,0.283203 h -5.041015 c -0.588947,0 -1.082064,-0.196837 -1.480469,-0.591797 -0.398406,-0.394959 -0.597657,-0.884897 -0.597657,-1.46875 V 28.121094 h 5.820313 L 32.9375,24 h 5.613281 l -2.078125,-2.060547 h -4.78125 l -2.078125,4.121094 h -4.574219 v -6.181641 h 5.197266 L 28.158203,17.818359 H 25.039062 V 9.5761719 c 10e-7,-0.5838531 0.199251,-1.0737906 0.597657,-1.46875 0.398405,-0.3949595 0.891522,-0.5917969 1.480469,-0.5917969 z" />
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB