Enter key handling for dialogs.
This commit is contained in:
@@ -199,6 +199,7 @@ const AboutDialog = withStyles(styles, { withTheme: true })(
|
|||||||
return (
|
return (
|
||||||
<DialogEx tag="about" fullScreen open={this.props.open}
|
<DialogEx tag="about" fullScreen open={this.props.open}
|
||||||
onClose={() => { this.props.onClose() }} TransitionComponent={Transition}
|
onClose={() => { this.props.onClose() }} TransitionComponent={Transition}
|
||||||
|
onEnterKey={() => { this.props.onClose() }}
|
||||||
style={{ userSelect: "none" }}
|
style={{ userSelect: "none" }}
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|||||||
@@ -1020,6 +1020,7 @@ const AppThemed = withStyles(appStyles)(class extends ResizeResponsiveComponent<
|
|||||||
<DialogEx tag="Alert"
|
<DialogEx tag="Alert"
|
||||||
open={this.state.alertDialogOpen}
|
open={this.state.alertDialogOpen}
|
||||||
onClose={this.handleCloseAlert}
|
onClose={this.handleCloseAlert}
|
||||||
|
onEnterKey={this.handleCloseAlert}
|
||||||
aria-describedby="alert-dialog-description"
|
aria-describedby="alert-dialog-description"
|
||||||
>
|
>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
|
|||||||
@@ -409,6 +409,7 @@ const BankDialog = withStyles(styles, { withTheme: true })(
|
|||||||
return (
|
return (
|
||||||
<DialogEx tag="bank" fullScreen open={this.props.show}
|
<DialogEx tag="bank" fullScreen open={this.props.show}
|
||||||
onClose={() => { this.handleDialogClose() }} TransitionComponent={Transition}
|
onClose={() => { this.handleDialogClose() }} TransitionComponent={Transition}
|
||||||
|
onEnterKey={()=>{}}
|
||||||
style={{ userSelect: "none" }}
|
style={{ userSelect: "none" }}
|
||||||
>
|
>
|
||||||
<div style={{ display: "flex", flexDirection: "column", flexWrap: "nowrap", width: "100%", height: "100%", overflow: "hidden" }}>
|
<div style={{ display: "flex", flexDirection: "column", flexWrap: "nowrap", width: "100%", height: "100%", overflow: "hidden" }}>
|
||||||
@@ -544,7 +545,9 @@ const BankDialog = withStyles(styles, { withTheme: true })(
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<DialogEx tag="deletePrompt" open={this.state.showDeletePrompt} onClose={() => this.handleDeletePromptClose()}
|
<DialogEx tag="deletePrompt" open={this.state.showDeletePrompt} onClose={() => this.handleDeletePromptClose()}
|
||||||
style={{ userSelect: "none" }}>
|
style={{ userSelect: "none" }}
|
||||||
|
onEnterKey={()=>{ this.handleDeletePromptOk() }}
|
||||||
|
>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<Typography>Are you sure you want to delete bank '{this.getSelectedBankName()}'?</Typography>
|
<Typography>Are you sure you want to delete bank '{this.getSelectedBankName()}'?</Typography>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import Dialog, {DialogProps} from '@mui/material/Dialog';
|
|||||||
interface DialogExProps extends DialogProps {
|
interface DialogExProps extends DialogProps {
|
||||||
tag: string;
|
tag: string;
|
||||||
fullwidth?: boolean;
|
fullwidth?: boolean;
|
||||||
|
onEnterKey: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DialogExState {
|
interface DialogExState {
|
||||||
@@ -186,7 +187,10 @@ class DialogEx extends React.Component<DialogExProps,DialogExState> implements I
|
|||||||
}
|
}
|
||||||
|
|
||||||
onEnterKey() {
|
onEnterKey() {
|
||||||
|
if (this.props.onEnterKey)
|
||||||
|
{
|
||||||
|
this.props.onEnterKey();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onKeyDown(evt: React.KeyboardEvent<HTMLDivElement>)
|
onKeyDown(evt: React.KeyboardEvent<HTMLDivElement>)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -485,8 +485,11 @@ export default withStyles(styles, { withTheme: true })(
|
|||||||
onClose={() => {
|
onClose={() => {
|
||||||
this.props.onCancel();
|
this.props.onCancel();
|
||||||
}}
|
}}
|
||||||
|
onEnterKey={()=> {
|
||||||
|
this.openSelectedFile();
|
||||||
|
}}
|
||||||
open={this.props.open} tag="fileProperty"
|
open={this.props.open} tag="fileProperty"
|
||||||
fullWidth maxWidth="xl"
|
fullWidth maxWidth="md"
|
||||||
PaperProps={
|
PaperProps={
|
||||||
this.state.fullScreen ?
|
this.state.fullScreen ?
|
||||||
{}
|
{}
|
||||||
|
|||||||
@@ -319,6 +319,7 @@ export default class FilePropertyDirectorySelectDialog extends ResizeResponsiveC
|
|||||||
<DialogEx tag="fpDirectorySelect" open={this.props.open} fullWidth onClose={() => { this.onClose(); }} aria-labelledby="Rename-dialog-title"
|
<DialogEx tag="fpDirectorySelect" open={this.props.open} fullWidth onClose={() => { this.onClose(); }} aria-labelledby="Rename-dialog-title"
|
||||||
fullScreen={this.state.fullScreen}
|
fullScreen={this.state.fullScreen}
|
||||||
style={{ userSelect: "none" }}
|
style={{ userSelect: "none" }}
|
||||||
|
onEnterKey={()=>{ this.onOK(); }}
|
||||||
PaperProps={{ style: { minHeight: "80%", maxHeight: "80%", minWidth: "75%", maxWidth: "75%", overflowY: "visible" } }}
|
PaperProps={{ style: { minHeight: "80%", maxHeight: "80%", minWidth: "75%", maxWidth: "75%", overflowY: "visible" } }}
|
||||||
>
|
>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
|
|||||||
@@ -166,15 +166,19 @@ const FullScreenIME =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onOk() {
|
||||||
|
if (this.inputChanged) {
|
||||||
|
this.inputChanged = false;
|
||||||
|
this.validateInput(true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.props.onClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onInputKeyPress(e: any): void {
|
onInputKeyPress(e: any): void {
|
||||||
if (e.charCode === 13) {
|
if (e.charCode === 13) {
|
||||||
if (this.inputChanged) {
|
this.onOk();
|
||||||
this.inputChanged = false;
|
|
||||||
this.validateInput(true);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.props.onClose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,7 +200,9 @@ const FullScreenIME =
|
|||||||
let value = this.props.value;
|
let value = this.props.value;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DialogEx tag="ime" fullScreen open={!!(this.props.uiControl)} onClose={(e, r) => this.handleClose(e, r)} >
|
<DialogEx tag="ime" fullScreen open={!!(this.props.uiControl)} onClose={(e, r) => this.handleClose(e, r)}
|
||||||
|
onEnterKey={()=>{ /*nothing*/}}
|
||||||
|
>
|
||||||
<div style={{
|
<div style={{
|
||||||
width: "100%", height: "100%", position: "relative",
|
width: "100%", height: "100%", position: "relative",
|
||||||
display: "flex", flexDirection: "column", flexWrap: "nowrap",
|
display: "flex", flexDirection: "column", flexWrap: "nowrap",
|
||||||
|
|||||||
@@ -393,8 +393,10 @@ const JackServerSettingsDialog = withStyles(styles)(
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleApply() {
|
handleApply() {
|
||||||
|
if (this.state.okEnabled)
|
||||||
this.props.onApply(this.state.jackServerSettings.clone());
|
{
|
||||||
|
this.props.onApply(this.state.jackServerSettings.clone());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@@ -422,7 +424,12 @@ const JackServerSettingsDialog = withStyles(styles)(
|
|||||||
let bufferCountDisabled = !selectedDevice;
|
let bufferCountDisabled = !selectedDevice;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DialogEx tag="jack" onClose={handleClose} aria-labelledby="select-channels-title" open={open}>
|
<DialogEx tag="jack" onClose={handleClose} aria-labelledby="select-channels-title" open={open}
|
||||||
|
onEnterKey={() => {
|
||||||
|
this.handleApply();
|
||||||
|
}}
|
||||||
|
|
||||||
|
>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<div>
|
<div>
|
||||||
<FormControl className={classes.formControl}>
|
<FormControl className={classes.formControl}>
|
||||||
|
|||||||
@@ -375,8 +375,22 @@ export const LoadPluginDialog =
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.cancel();
|
this.cancel();
|
||||||
}
|
}
|
||||||
handleOk(e: SyntheticEvent): void {
|
handleOk(e?: SyntheticEvent): void {
|
||||||
e.preventDefault();
|
if (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
let selectedPlugin: UiPlugin | undefined = undefined;
|
||||||
|
if (this.state.selected_uri) {
|
||||||
|
let t = this.model.getUiPlugin(this.state.selected_uri);
|
||||||
|
if (t) selectedPlugin = t;
|
||||||
|
}
|
||||||
|
if (!selectedPlugin)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (this.state.selected_uri) {
|
if (this.state.selected_uri) {
|
||||||
this.props.onOk(this.state.selected_uri);
|
this.props.onOk(this.state.selected_uri);
|
||||||
}
|
}
|
||||||
@@ -688,7 +702,9 @@ export const LoadPluginDialog =
|
|||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<DialogEx tag="plugins"
|
<DialogEx tag="plugins"
|
||||||
|
onEnterKey={()=>{ this.handleOk(); }}
|
||||||
onKeyPress={(e) => { this.handleKeyPress(e); }}
|
onKeyPress={(e) => { this.handleKeyPress(e); }}
|
||||||
|
|
||||||
fullScreen={true}
|
fullScreen={true}
|
||||||
TransitionComponent={undefined}
|
TransitionComponent={undefined}
|
||||||
maxWidth={false}
|
maxWidth={false}
|
||||||
|
|||||||
@@ -326,6 +326,8 @@ export const MidiBindingDialog =
|
|||||||
<DialogEx tag="midiBindings" open={open} fullWidth onClose={this.handleClose} aria-labelledby="Rename-dialog-title"
|
<DialogEx tag="midiBindings" open={open} fullWidth onClose={this.handleClose} aria-labelledby="Rename-dialog-title"
|
||||||
fullScreen={true}
|
fullScreen={true}
|
||||||
style={{userSelect: "none"}}
|
style={{userSelect: "none"}}
|
||||||
|
onEnterKey={()=>{}}
|
||||||
|
|
||||||
>
|
>
|
||||||
<div style={{ display: "flex", flexDirection: "column", flexWrap: "nowrap", width: "100%", height: "100%", overflow: "hidden" }}>
|
<div style={{ display: "flex", flexDirection: "column", flexWrap: "nowrap", width: "100%", height: "100%", overflow: "hidden" }}>
|
||||||
<div style={{ flex: "0 0 auto" }}>
|
<div style={{ flex: "0 0 auto" }}>
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ export default class OkCancelDialog extends React.Component<OkCancelDialogProps,
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<DialogEx tag="okCancel" open={open} onClose={handleClose}
|
<DialogEx tag="okCancel" open={open} onClose={handleClose}
|
||||||
|
onEnterKey={handleOk}
|
||||||
style={{userSelect: "none"}}
|
style={{userSelect: "none"}}
|
||||||
>
|
>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ function OptionsDialog(props: OptionsDialogProps) {
|
|||||||
onClose();
|
onClose();
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<DialogEx tag="options" onClose={handleCancel} aria-labelledby="select-option" open={open} >
|
<DialogEx tag="options" onClose={handleCancel} aria-labelledby="select-option" open={open} onEnterKey={()=>{}} >
|
||||||
{title && (
|
{title && (
|
||||||
<DialogTitle style={{paddingLeft: 8}}>
|
<DialogTitle style={{paddingLeft: 8}}>
|
||||||
<Typography variant="body2" color="textSecondary">
|
<Typography variant="body2" color="textSecondary">
|
||||||
|
|||||||
@@ -235,7 +235,9 @@ const PluginInfoDialog = withStyles(styles)((props: PluginInfoProps) => {
|
|||||||
<InfoOutlinedIcon className={classes.icon} color='inherit' />
|
<InfoOutlinedIcon className={classes.icon} color='inherit' />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
{open && (
|
{open && (
|
||||||
<DialogEx tag="info" onClose={handleClose} open={open} fullWidth >
|
<DialogEx tag="info" onClose={handleClose} open={open} fullWidth maxWidth="md"
|
||||||
|
onEnterKey={handleClose}
|
||||||
|
>
|
||||||
<MuiDialogTitle >
|
<MuiDialogTitle >
|
||||||
<div style={{ display: "flex", flexDirection: "row", alignItems: "start", flexWrap: "nowrap" }}>
|
<div style={{ display: "flex", flexDirection: "row", alignItems: "start", flexWrap: "nowrap" }}>
|
||||||
<div style={{ flex: "0 0 auto", marginRight: 16 }}>
|
<div style={{ flex: "0 0 auto", marginRight: 16 }}>
|
||||||
|
|||||||
@@ -361,7 +361,9 @@ const PluginPresetsDialog = withStyles(styles, { withTheme: true })(
|
|||||||
return (
|
return (
|
||||||
<DialogEx tag="pluginPresets" fullScreen open={this.props.show}
|
<DialogEx tag="pluginPresets" fullScreen open={this.props.show}
|
||||||
onClose={() => { this.handleDialogClose() }} TransitionComponent={Transition}
|
onClose={() => { this.handleDialogClose() }} TransitionComponent={Transition}
|
||||||
style={{userSelect: "none"}}>
|
style={{userSelect: "none"}}
|
||||||
|
onEnterKey={()=>{}}
|
||||||
|
>
|
||||||
<div style={{ display: "flex", flexDirection: "column", flexWrap: "nowrap", width: "100%", height: "100%", overflow: "hidden" }}>
|
<div style={{ display: "flex", flexDirection: "column", flexWrap: "nowrap", width: "100%", height: "100%", overflow: "hidden" }}>
|
||||||
<div style={{ flex: "0 0 auto" }}>
|
<div style={{ flex: "0 0 auto" }}>
|
||||||
<AppBar className={classes.dialogAppBar} style={{ display: this.isEditMode() ? "none" : "block" }} >
|
<AppBar className={classes.dialogAppBar} style={{ display: this.isEditMode() ? "none" : "block" }} >
|
||||||
|
|||||||
@@ -340,7 +340,9 @@ const PresetDialog = withStyles(styles, { withTheme: true })(
|
|||||||
return (
|
return (
|
||||||
<DialogEx tag="preset" fullScreen open={this.props.show}
|
<DialogEx tag="preset" fullScreen open={this.props.show}
|
||||||
onClose={() => { this.handleDialogClose() }} TransitionComponent={Transition}
|
onClose={() => { this.handleDialogClose() }} TransitionComponent={Transition}
|
||||||
style={{userSelect: "none"}}>
|
style={{userSelect: "none"}}
|
||||||
|
onEnterKey={()=>{}}
|
||||||
|
>
|
||||||
<div style={{ display: "flex", flexDirection: "column", flexWrap: "nowrap", width: "100%", height: "100%", overflow: "hidden" }}>
|
<div style={{ display: "flex", flexDirection: "column", flexWrap: "nowrap", width: "100%", height: "100%", overflow: "hidden" }}>
|
||||||
<div style={{ flex: "0 0 auto" }}>
|
<div style={{ flex: "0 0 auto" }}>
|
||||||
<AppBar className={classes.dialogAppBar} style={{ display: this.isEditMode() ? "none" : "block" }} >
|
<AppBar className={classes.dialogAppBar} style={{ display: this.isEditMode() ? "none" : "block" }} >
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Button from '@mui/material/Button';
|
|
||||||
|
|
||||||
|
|
||||||
import Radio from '@mui/material/Radio';
|
import Radio from '@mui/material/Radio';
|
||||||
@@ -29,11 +28,10 @@ import ListItemIcon from '@mui/material/ListItemIcon';
|
|||||||
import ListItemText from '@mui/material/ListItemText';
|
import ListItemText from '@mui/material/ListItemText';
|
||||||
|
|
||||||
import DialogEx from './DialogEx';
|
import DialogEx from './DialogEx';
|
||||||
import DialogActions from '@mui/material/DialogActions';
|
|
||||||
import ResizeResponsiveComponent from './ResizeResponsiveComponent';
|
import ResizeResponsiveComponent from './ResizeResponsiveComponent';
|
||||||
|
|
||||||
|
|
||||||
export interface ListSelectDialogProps {
|
export interface RadioSelectDialogProps {
|
||||||
open: boolean,
|
open: boolean,
|
||||||
title: string,
|
title: string,
|
||||||
width: number,
|
width: number,
|
||||||
@@ -43,15 +41,15 @@ export interface ListSelectDialogProps {
|
|||||||
onClose: () => void
|
onClose: () => void
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface ListSelectDialogState {
|
export interface RadioSelectDialogState {
|
||||||
fullScreen: boolean;
|
fullScreen: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class ListSelectDialog extends ResizeResponsiveComponent<ListSelectDialogProps, ListSelectDialogState> {
|
export default class RadioSelectDialog extends ResizeResponsiveComponent<RadioSelectDialogProps, RadioSelectDialogState> {
|
||||||
|
|
||||||
refText: React.RefObject<HTMLInputElement>;
|
refText: React.RefObject<HTMLInputElement>;
|
||||||
|
|
||||||
constructor(props: ListSelectDialogProps) {
|
constructor(props: RadioSelectDialogProps) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
fullScreen: false
|
fullScreen: false
|
||||||
@@ -82,7 +80,9 @@ export default class ListSelectDialog extends ResizeResponsiveComponent<ListSele
|
|||||||
render() {
|
render() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DialogEx tag="list" onClose={()=>this.props.onClose()} open={this.props.open}>
|
<DialogEx tag="list" onClose={()=>this.props.onClose()} open={this.props.open}
|
||||||
|
onEnterKey={()=>{ }}
|
||||||
|
>
|
||||||
<List sx={{pt: 0}}>
|
<List sx={{pt: 0}}>
|
||||||
{
|
{
|
||||||
this.props.items.map(
|
this.props.items.map(
|
||||||
@@ -105,11 +105,6 @@ export default class ListSelectDialog extends ResizeResponsiveComponent<ListSele
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
</List>
|
</List>
|
||||||
<DialogActions>
|
|
||||||
<Button variant="dialogSecondary" onClick={()=> this.props.onClose()} color="primary">
|
|
||||||
Cancel
|
|
||||||
</Button>
|
|
||||||
</DialogActions>
|
|
||||||
</DialogEx>
|
</DialogEx>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -117,6 +117,7 @@ export default class RenameDialog extends ResizeResponsiveComponent<RenameDialog
|
|||||||
<DialogEx tag="nameDialog" open={open} fullWidth maxWidth="sm" onClose={handleClose} aria-labelledby="Rename-dialog-title"
|
<DialogEx tag="nameDialog" open={open} fullWidth maxWidth="sm" onClose={handleClose} aria-labelledby="Rename-dialog-title"
|
||||||
fullScreen={this.state.fullScreen}
|
fullScreen={this.state.fullScreen}
|
||||||
style={{userSelect: "none"}}
|
style={{userSelect: "none"}}
|
||||||
|
onEnterKey={()=>{}}
|
||||||
>
|
>
|
||||||
<DialogContent style={{minHeight: 96}}>
|
<DialogContent style={{minHeight: 96}}>
|
||||||
<TextField
|
<TextField
|
||||||
|
|||||||
@@ -90,7 +90,9 @@ function SelectChannelsDialog(props: SelectChannelsDialogProps) {
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DialogEx tag="audioChannels" onClose={handleClose} aria-labelledby="select-channels-title" open={open}>
|
<DialogEx tag="audioChannels" onClose={handleClose} aria-labelledby="select-channels-title" open={open}
|
||||||
|
onEnterKey={handleOk}
|
||||||
|
>
|
||||||
<DialogTitle id="simple-dialog-title">Select Channels</DialogTitle>
|
<DialogTitle id="simple-dialog-title">Select Channels</DialogTitle>
|
||||||
<List>
|
<List>
|
||||||
{availableChannels.map((channel) => (
|
{availableChannels.map((channel) => (
|
||||||
@@ -154,7 +156,9 @@ function SelectChannelsDialog(props: SelectChannelsDialogProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DialogEx tag="channels" onClose={handleCancel} aria-labelledby="select-channels-title" open={open}>
|
<DialogEx tag="channels" onClose={handleCancel} aria-labelledby="select-channels-title" open={open}
|
||||||
|
onEnterKey={()=>{}}
|
||||||
|
>
|
||||||
|
|
||||||
<List style={{ marginLeft: 0, marginRight: 0}}>
|
<List style={{ marginLeft: 0, marginRight: 0}}>
|
||||||
<ListItem button onClick={() => handleListItemClick("Stereo")} key={"Stereo"} selected={selectionKey === "Stereo"} >
|
<ListItem button onClick={() => handleListItemClick("Stereo")} key={"Stereo"} selected={selectionKey === "Stereo"} >
|
||||||
|
|||||||
@@ -93,7 +93,9 @@ function SelectMidiChannelsDialog(props: SelectMidiChannelsDialogProps) {
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DialogEx tag="midiChannels" onClose={handleClose} aria-labelledby="select-channels-title" open={open}>
|
<DialogEx tag="midiChannels" onClose={handleClose} aria-labelledby="select-channels-title" open={open}
|
||||||
|
onEnterKey={handleOk}
|
||||||
|
>
|
||||||
<DialogTitle id="simple-dialog-title">Select MIDI Device</DialogTitle>
|
<DialogTitle id="simple-dialog-title">Select MIDI Device</DialogTitle>
|
||||||
<List>
|
<List>
|
||||||
{availableChannels.map((channel) => (
|
{availableChannels.map((channel) => (
|
||||||
|
|||||||
@@ -64,7 +64,9 @@ function SelectThemesDialog(props: SelectThemesDialogProps) {
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DialogEx tag="theme" onClose={handleClose} open={open}>
|
<DialogEx tag="theme" onClose={handleClose} open={open}
|
||||||
|
onEnterKey={handleOk}
|
||||||
|
>
|
||||||
<DialogTitle id="simple-dialog-title">Theme</DialogTitle>
|
<DialogTitle id="simple-dialog-title">Theme</DialogTitle>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
import React, { SyntheticEvent, Component } from 'react';
|
import React, { SyntheticEvent, Component } from 'react';
|
||||||
import Switch from "@mui/material/Switch";
|
import Switch from "@mui/material/Switch";
|
||||||
import OkCancelDialog from './OkCancelDialog';
|
import OkCancelDialog from './OkCancelDialog';
|
||||||
import ListSelectDialog from './ListSelectDialog';
|
import RadioSelectDialog from './RadioSelectDialog';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { PiPedalModel, PiPedalModelFactory, State } from './PiPedalModel';
|
import { PiPedalModel, PiPedalModelFactory, State } from './PiPedalModel';
|
||||||
@@ -542,6 +542,7 @@ const SettingsDialog = withStyles(styles, { withTheme: true })(
|
|||||||
<DialogEx tag="settings" fullScreen open={this.props.open}
|
<DialogEx tag="settings" fullScreen open={this.props.open}
|
||||||
onClose={() => { this.props.onClose() }} TransitionComponent={Transition}
|
onClose={() => { this.props.onClose() }} TransitionComponent={Transition}
|
||||||
style={{ userSelect: "none" }}
|
style={{ userSelect: "none" }}
|
||||||
|
onEnterKey={()=>{}}
|
||||||
>
|
>
|
||||||
|
|
||||||
<div style={{ display: "flex", flexDirection: "column", flexWrap: "nowrap", width: "100%", height: "100%", overflow: "hidden" }}>
|
<div style={{ display: "flex", flexDirection: "column", flexWrap: "nowrap", width: "100%", height: "100%", overflow: "hidden" }}>
|
||||||
@@ -882,7 +883,7 @@ const SettingsDialog = withStyles(styles, { withTheme: true })(
|
|||||||
{
|
{
|
||||||
(this.state.showGovernorSettingsDialog) &&
|
(this.state.showGovernorSettingsDialog) &&
|
||||||
(
|
(
|
||||||
<ListSelectDialog
|
<RadioSelectDialog
|
||||||
width={220}
|
width={220}
|
||||||
open={this.state.showGovernorSettingsDialog}
|
open={this.state.showGovernorSettingsDialog}
|
||||||
items={this.state.governorSettings.governors}
|
items={this.state.governorSettings.governors}
|
||||||
@@ -901,7 +902,7 @@ const SettingsDialog = withStyles(styles, { withTheme: true })(
|
|||||||
this.setState({ showGovernorSettingsDialog: false })
|
this.setState({ showGovernorSettingsDialog: false })
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
</ListSelectDialog>
|
</RadioSelectDialog>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ export default class SnapshotDialog extends ResizeResponsiveComponent<SnapshotDi
|
|||||||
|
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
onEnterKey={()=>{} }
|
||||||
>
|
>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ export default class SnapshotPropertiesDialog extends ResizeResponsiveComponent<
|
|||||||
return (
|
return (
|
||||||
<DialogEx maxWidth="sm" fullWidth={true} tag="snapshotProps" open={this.props.open} onClose={handleClose}
|
<DialogEx maxWidth="sm" fullWidth={true} tag="snapshotProps" open={this.props.open} onClose={handleClose}
|
||||||
style={{ userSelect: "none" }} fullScreen={this.state.compactVertical}
|
style={{ userSelect: "none" }} fullScreen={this.state.compactVertical}
|
||||||
|
onEnterKey={()=> { this.handleOk(); }}
|
||||||
>
|
>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -328,6 +328,7 @@ export const SystemMidiBindingDialog =
|
|||||||
<DialogEx tag="systemMidiBindings" open={open} fullWidth onClose={this.handleClose} aria-labelledby="Rename-dialog-title"
|
<DialogEx tag="systemMidiBindings" open={open} fullWidth onClose={this.handleClose} aria-labelledby="Rename-dialog-title"
|
||||||
fullScreen={true}
|
fullScreen={true}
|
||||||
style={{ userSelect: "none" }}
|
style={{ userSelect: "none" }}
|
||||||
|
onEnterKey={()=>{}}
|
||||||
>
|
>
|
||||||
<div style={{ display: "flex", flexDirection: "column", flexWrap: "nowrap", width: "100%", height: "100%", overflow: "hidden" }}>
|
<div style={{ display: "flex", flexDirection: "column", flexWrap: "nowrap", width: "100%", height: "100%", overflow: "hidden" }}>
|
||||||
<div style={{ flex: "0 0 auto" }}>
|
<div style={{ flex: "0 0 auto" }}>
|
||||||
|
|||||||
@@ -166,6 +166,7 @@ export default class UpdateDialog extends ResizeResponsiveComponent<UpdateDialog
|
|||||||
return (
|
return (
|
||||||
<DialogEx tag="update" open={this.props.open} onClose={() => { this.handleClose(); }}
|
<DialogEx tag="update" open={this.props.open} onClose={() => { this.handleClose(); }}
|
||||||
style={{ userSelect: "none" }}
|
style={{ userSelect: "none" }}
|
||||||
|
onEnterKey={()=>{ this.handleOK();}}
|
||||||
>
|
>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
<div style={{ display: "flex", flexFlow: "row noWrap", alignItems: "center" }} >
|
<div style={{ display: "flex", flexFlow: "row noWrap", alignItems: "center" }} >
|
||||||
@@ -288,6 +289,7 @@ export default class UpdateDialog extends ResizeResponsiveComponent<UpdateDialog
|
|||||||
open={this.state.alertDialogOpen}
|
open={this.state.alertDialogOpen}
|
||||||
onClose={() => { this.handleCloseAlert(); }}
|
onClose={() => { this.handleCloseAlert(); }}
|
||||||
aria-describedby="Alert Dialog"
|
aria-describedby="Alert Dialog"
|
||||||
|
onEnterKey={()=>{ this.handleCloseAlert(); }}
|
||||||
>
|
>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<Typography variant="body2" color="secondaryText">
|
<Typography variant="body2" color="secondaryText">
|
||||||
|
|||||||
@@ -311,9 +311,13 @@ export default class UploadFileDialog extends ResizeResponsiveComponent<UploadFi
|
|||||||
|
|
||||||
let isAndroid = UploadFileDialog.IsAndroid();
|
let isAndroid = UploadFileDialog.IsAndroid();
|
||||||
return (
|
return (
|
||||||
<DialogEx tag="uploadFile" open={this.props.open} fullWidth onClose={() => this.handleClose()}
|
<DialogEx tag="uploadFile" open={this.props.open} onClose={() => this.handleClose()}
|
||||||
fullScreen={this.state.fullScreen}
|
fullScreen={false}
|
||||||
style={{ userSelect: "none" }}
|
fullWidth={true}
|
||||||
|
maxWidth={"sm"}
|
||||||
|
style={{ userSelect: "none",}}
|
||||||
|
onEnterKey={()=>{ this.handleClose(); }}
|
||||||
|
|
||||||
>
|
>
|
||||||
<DialogTitle >
|
<DialogTitle >
|
||||||
<div>
|
<div>
|
||||||
@@ -326,7 +330,7 @@ export default class UploadFileDialog extends ResizeResponsiveComponent<UploadFi
|
|||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogContent style={{ paddingBottom: 0 }}>
|
<DialogContent style={{ paddingBottom: 0 }}>
|
||||||
<div style={{
|
<div style={{
|
||||||
width: "100%", height: 140, marginBottom: 0,
|
height: 140, marginBottom: 0,
|
||||||
border: (isAndroid? "2px solid #CCC" :"2px dashed #CCC"),
|
border: (isAndroid? "2px solid #CCC" :"2px dashed #CCC"),
|
||||||
borderRadius: "10px",
|
borderRadius: "10px",
|
||||||
fontFamily: "Roboto",
|
fontFamily: "Roboto",
|
||||||
|
|||||||
@@ -157,9 +157,10 @@ export default class UploadPresetDialog extends ResizeResponsiveComponent<Upload
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DialogEx tag="uploadPreset" open={this.props.open} fullWidth onClose={() => this.handleClose()}
|
<DialogEx tag="uploadPreset" open={this.props.open} fullWidth maxWidth="sm" onClose={() => this.handleClose()}
|
||||||
fullScreen={this.state.fullScreen}
|
fullScreen={this.state.fullScreen}
|
||||||
style={{userSelect: "none"}}
|
style={{userSelect: "none"}}
|
||||||
|
onEnterKey={()=>{}}
|
||||||
>
|
>
|
||||||
<DialogTitle>{this.props.title}</DialogTitle>
|
<DialogTitle>{this.props.title}</DialogTitle>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
|
|||||||
@@ -328,6 +328,13 @@ const WifiConfigDialog = withStyles(styles, { withTheme: true })(
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
handleWarningDialogOk()
|
||||||
|
{
|
||||||
|
this.setState({ showWifiWarningDialog: false });
|
||||||
|
this.handleOk(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let props = this.props;
|
let props = this.props;
|
||||||
let classes = this.props.classes;
|
let classes = this.props.classes;
|
||||||
@@ -569,7 +576,11 @@ const WifiConfigDialog = withStyles(styles, { withTheme: true })(
|
|||||||
</DialogActions>
|
</DialogActions>
|
||||||
{this.state.showHelpDialog && (
|
{this.state.showHelpDialog && (
|
||||||
<DialogEx open={this.state.showHelpDialog} tag="wifiHelp"
|
<DialogEx open={this.state.showHelpDialog} tag="wifiHelp"
|
||||||
style={{ userSelect: "none" }}>
|
style={{ userSelect: "none" }}
|
||||||
|
onEnterKey={()=>{
|
||||||
|
this.setState({ showHelpDialog: false });
|
||||||
|
}}
|
||||||
|
>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<Typography className={classes.pgraph} variant="h6" color="textPrimary">
|
<Typography className={classes.pgraph} variant="h6" color="textPrimary">
|
||||||
PiPedal Auto-Hotspot
|
PiPedal Auto-Hotspot
|
||||||
@@ -633,6 +644,7 @@ const WifiConfigDialog = withStyles(styles, { withTheme: true })(
|
|||||||
)}
|
)}
|
||||||
{this.state.showWifiWarningDialog && (
|
{this.state.showWifiWarningDialog && (
|
||||||
<DialogEx open={this.state.showWifiWarningDialog} tag="wifiConfirm"
|
<DialogEx open={this.state.showWifiWarningDialog} tag="wifiConfirm"
|
||||||
|
onEnterKey={()=>{ this.handleWarningDialogOk();}}
|
||||||
style={{ userSelect: "none" }}>
|
style={{ userSelect: "none" }}>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<Typography className={classes.pgraph} variant="body2" color="textPrimary">
|
<Typography className={classes.pgraph} variant="body2" color="textPrimary">
|
||||||
@@ -654,8 +666,7 @@ const WifiConfigDialog = withStyles(styles, { withTheme: true })(
|
|||||||
Cancel
|
Cancel
|
||||||
</Button>
|
</Button>
|
||||||
<Button onClick={() => {
|
<Button onClick={() => {
|
||||||
this.setState({ showWifiWarningDialog: false });
|
this.handleWarningDialogOk();
|
||||||
this.handleOk(true);
|
|
||||||
}} variant="dialogPrimary" style={{ width: 120 }} >
|
}} variant="dialogPrimary" style={{ width: 120 }} >
|
||||||
PROCEED
|
PROCEED
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ const WifiDirectConfigDialog = withStyles(styles, { withTheme: true })(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<DialogEx tag="p2pConfig" open={open} onClose={handleClose} style={{ userSelect: "none", }}
|
<DialogEx tag="p2pConfig" open={open} onClose={handleClose} style={{ userSelect: "none", }}
|
||||||
fullScreen={this.state.fullScreen} fullWidth={this.useLandscapeLayout()}
|
fullScreen={this.state.fullScreen} fullWidth={this.useLandscapeLayout()} onEnterKey={()=>{}}
|
||||||
>
|
>
|
||||||
{this.state.landscapeLayout && (
|
{this.state.landscapeLayout && (
|
||||||
<DialogContent >
|
<DialogContent >
|
||||||
|
|||||||
@@ -222,6 +222,7 @@ const ZoomedUiControl = withStyles(styles, { withTheme: true })(
|
|||||||
<DialogEx tag="zoomedControl" open={this.props.dialogOpen}
|
<DialogEx tag="zoomedControl" open={this.props.dialogOpen}
|
||||||
onClose={() => { this.props.onDialogClose() }}
|
onClose={() => { this.props.onDialogClose() }}
|
||||||
onAbort={() => { this.props.onDialogClose() }}
|
onAbort={() => { this.props.onDialogClose() }}
|
||||||
|
onEnterKey={()=>{/*nothing*/}}
|
||||||
>
|
>
|
||||||
<div style={{
|
<div style={{
|
||||||
width: 380, height: 300,
|
width: 380, height: 300,
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
Splittype changes.
|
||||||
|
- disable splittype control when editing snapshot.
|
||||||
|
- identical structure requires no changes in split type.
|
||||||
|
|
||||||
|
|
||||||
Review current handleNotifyPatchProperty. I tink server-side support needs to be
|
Review current handleNotifyPatchProperty. I tink server-side support needs to be
|
||||||
removed, and rely on handleNotifyPathPatchPropertyChanged instead.
|
removed, and rely on handleNotifyPathPatchPropertyChanged instead.
|
||||||
|
|||||||
Reference in New Issue
Block a user