v1.2.37 Beta4
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import { Theme, createStyles } from '@mui/material/styles';
|
||||
import CreateNewFolderIcon from '@mui/icons-material/CreateNewFolder';
|
||||
import RenameDialog from './RenameDialog';
|
||||
import Divider from '@mui/material/Divider';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
@@ -462,6 +463,18 @@ export default withStyles(styles, { withTheme: true })(
|
||||
<Typography noWrap component="div" sx={{ flexGrow: 1 }}>
|
||||
{this.props.fileProperty.label}
|
||||
</Typography>
|
||||
|
||||
<IconButton
|
||||
aria-label="new folder"
|
||||
edge="end"
|
||||
color="inherit"
|
||||
style={{ opacity: 0.6, marginRight: 8 }}
|
||||
onClick={(ev) => { this.onNewFolder(); }}
|
||||
>
|
||||
<CreateNewFolderIcon />
|
||||
</IconButton>
|
||||
|
||||
|
||||
<IconButton
|
||||
aria-label="display more actions"
|
||||
edge="end"
|
||||
@@ -508,11 +521,17 @@ export default withStyles(styles, { withTheme: true })(
|
||||
(this.state.columns !== 0) && // don't render until we have number of columns derived from layout.
|
||||
this.state.fileEntries.map(
|
||||
(value: FileEntry, index: number) => {
|
||||
let isDefault = this.props.fileProperty.directory.startsWith("default");
|
||||
let displayValue = value.filename;
|
||||
if (displayValue === "") {
|
||||
displayValue = "<none>";
|
||||
} else {
|
||||
displayValue = pathFileNameOnly(displayValue);
|
||||
if (isDefault)
|
||||
{
|
||||
displayValue = pathFileName(displayValue);
|
||||
} else {
|
||||
displayValue = pathFileNameOnly(displayValue);
|
||||
}
|
||||
}
|
||||
let selected = value.filename === this.state.selectedFile;
|
||||
let selectBg = selected ? "rgba(0,0,0,0.15)" : "rgba(0,0,0,0.0)";
|
||||
|
||||
@@ -631,25 +631,6 @@ export class PiPedalModel //implements PiPedalModel
|
||||
|
||||
|
||||
|
||||
requestPluginClasses(): Promise<boolean> {
|
||||
const myRequest = new Request(this.varRequest('plugin_classes.json'));
|
||||
return fetch(myRequest)
|
||||
.then(
|
||||
response => response.json()
|
||||
)
|
||||
.then(data => {
|
||||
let plugins = new PluginClass().deserialize(data);
|
||||
|
||||
this.validatePlugins(plugins);
|
||||
this.plugin_classes.set(plugins);
|
||||
return true;
|
||||
})
|
||||
.catch((error) => {
|
||||
this.setError("Can't contact server.\n\n" + error);
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
getWebSocket(): PiPedalSocket {
|
||||
if (this.webSocket === undefined) {
|
||||
throw new PiPedalStateError("Attempt to access web socket before it's connected.");
|
||||
@@ -941,20 +922,6 @@ export class PiPedalModel //implements PiPedalModel
|
||||
;
|
||||
}
|
||||
|
||||
requestCurrentPedalboard(): Promise<void> {
|
||||
const myRequest = new Request(this.varRequest('current_pedalboard.json'));
|
||||
return fetch(myRequest)
|
||||
.then(
|
||||
(response) => {
|
||||
return response.json();
|
||||
}
|
||||
)
|
||||
.then(data => {
|
||||
let pedalboard = new Pedalboard().deserialize(data);
|
||||
pedalboard.ensurePedalboardIds();
|
||||
this.pedalboard.set(pedalboard);
|
||||
});
|
||||
}
|
||||
|
||||
onError(msg: string): void {
|
||||
this.errorMessage.set(msg);
|
||||
|
||||
Reference in New Issue
Block a user