Publish licenses to website.

This commit is contained in:
Robin Davies
2023-04-16 23:09:13 -04:00
parent 776930f165
commit e2b62da073
17 changed files with 273 additions and 174 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ const FilePropertyControl =
<Typography variant="caption" display="block" noWrap style={{
width: "100%",
textAlign: "start"
}}> {fileProperty.name}</Typography>
}}> {fileProperty.label}</Typography>
</div>
{/* CONTROL SECTION */}
+6 -3
View File
@@ -153,9 +153,12 @@ export default class FilePropertyDialog extends ResizeResponsiveComponent<FilePr
return hasSelection;
}
onSelect(selectedFile: string) {
onSelectValue(selectedFile: string) {
this.setState({ selectedFile: selectedFile, hasSelection: this.isFileInList(this.state.files, selectedFile) })
}
onDoubleClickValue(selectedFile: string) {
this.props.onOk(this.props.fileProperty,selectedFile);
}
handleDelete() {
this.setState({openConfirmDeleteDialog: true});
@@ -216,7 +219,7 @@ export default class FilePropertyDialog extends ResizeResponsiveComponent<FilePr
>
<ArrowBackIcon fontSize="small" style={{ opacity: "0.6" }} />
</IconButton>
<Typography display="inline" >{this.props.fileProperty.name}</Typography>
<Typography display="inline" >{this.props.fileProperty.label}</Typography>
</div>
</DialogTitle>
<div style={{ flex: "0 0 auto", height: "1px", background: "rgba(0,0,0,0.2" }}>&nbsp;</div>
@@ -230,7 +233,7 @@ export default class FilePropertyDialog extends ResizeResponsiveComponent<FilePr
return (
<ButtonBase key={this.mapKey++}
style={{ width: "320px", flex: "0 0 48px", position: "relative" }}
onClick={() => this.onSelect(value)}
onClick={() => this.onSelectValue(value)} onDoubleClick={()=> {this.onDoubleClickValue(value);}}
>
<div style={{ position: "absolute", background: selectBg, width: "100%", height: "100%", borderRadius: 4 }} />
<div style={{ display: "flex", flexFlow: "row nowrap", justifyContent: "start", alignItems: "center", width: "100%", height: "100%" }}>
+8 -5
View File
@@ -432,7 +432,7 @@ export const LoadPluginDialog =
if (!uiPlugin) {
return (<Fragment />);
} else {
let stereoIndicator = this.stereo_indicator(uiPlugin)
let stereoIndicator = "\u00A0" + this.stereo_indicator(uiPlugin)
if (uiPlugin.author_name !== "") {
if (uiPlugin.author_homepage !== "") {
return (<Fragment>
@@ -440,21 +440,24 @@ export const LoadPluginDialog =
<Typography variant='body2' color="textSecondary" noWrap>{uiPlugin.name + ",\u00A0"}</Typography>
</div>
<div style={{flex: "0 1 auto"}}>
<a href={uiPlugin.author_homepage} target="_blank" >
<a href={uiPlugin.author_homepage} target="_blank" rel="noopener noreferrer" >
<Typography variant='body2' color="textSecondary" noWrap>{uiPlugin.author_name}</Typography>
</a>
</div>
<div style={{flex: "0 0 auto"}}>
<Typography variant='body2' color="textSecondary" noWrap>{stereoIndicator}</Typography>
</div>
</Fragment>);
} else {
return (<Fragment>
<Typography variant='body2' color="textSecondary" noWrap>{uiPlugin.name + ", " + uiPlugin.author_name}</Typography>
<Typography variant='body2' color="textSecondary" noWrap>{uiPlugin.name + ", " + uiPlugin.author_name + stereoIndicator}</Typography>
</Fragment>);
}
}
return (
<Fragment>
<Typography variant='body2' color="textSecondary" noWrap>{uiPlugin?.name ?? ""}</Typography>
<Typography variant='body2' color="textSecondary" noWrap>{uiPlugin?.name ?? "" + stereoIndicator}</Typography>
</Fragment>);
}
@@ -545,7 +548,7 @@ export const LoadPluginDialog =
break;
}
}
if (position != -1) {
if (position !== -1) {
element.scrollToItem({ rowIndex: Math.floor(position / this.state.grid_cell_columns) });
}
}
+24 -5
View File
@@ -18,7 +18,7 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import {PiPedalArgumentError} from "./PiPedalError";
import Units from './Units';
interface Deserializable<T> {
@@ -83,6 +83,7 @@ export class Port implements Deserializable<Port> {
export class PortGroup {
deserialize(input: any): PortGroup {
this.uri = input.uri;
this.symbol = input.symbol;
this.name = input.name;
this.parent_group = input.parent_group;
@@ -99,6 +100,7 @@ export class PortGroup {
return result;
}
uri: string = "";
symbol: string = "";
name: string = "";
parent_group: string = "";
@@ -151,10 +153,12 @@ export class UiPropertyNotification {
export class PiPedalFileProperty {
deserialize(input: any): PiPedalFileProperty
{
this.name = input.name;
this.label = input.label;
this.fileTypes = PiPedalFileType.deserialize_array(input.fileTypes);
this.patchProperty = input.patchProperty;
this.directory = input.directory;
this.index = input.index;
this.portGroup = input.portGroup;
return this;
}
static deserialize_array(input: any): PiPedalFileProperty[]
@@ -198,10 +202,12 @@ export class PiPedalFileProperty {
return false;
}
name: string = "";
label: string = "";
fileTypes: PiPedalFileType[] = [];
patchProperty: string = "";
directory: string = "";
index: number = -1;
portGroup: string = "";
};
export class Lv2Plugin implements Deserializable<Lv2Plugin> {
@@ -635,9 +641,22 @@ export class UiPlugin implements Deserializable<UiPlugin> {
}
}
return undefined;
}
getPortGroupByUri(uri: string) :PortGroup | null
{
for (let i = 0; i < this.port_groups.length; ++i)
{
let port_group = this.port_groups[i];
if (port_group.uri === uri)
{
return port_group;
}
}
return null;
}
getPortGroup(symbol: string): PortGroup
getPortGroupBySymbol(symbol: string): PortGroup | null
{
for (let i = 0; i < this.port_groups.length; ++i)
{
@@ -647,7 +666,7 @@ export class UiPlugin implements Deserializable<UiPlugin> {
return port_group;
}
}
throw new PiPedalArgumentError("Port group not found.");
return null;
}
uri: string = "";
+2 -2
View File
@@ -45,7 +45,7 @@ import PluginInfoDialog from './PluginInfoDialog';
import { GetControlView } from './ControlViewFactory';
import MidiBindingsDialog from './MidiBindingsDialog';
import PluginPresetSelector from './PluginPresetSelector';
import SaveIconOutline from '@mui/icons-material/Save';
const SPLIT_CONTROLBAR_THRESHHOLD = 650;
@@ -194,7 +194,7 @@ export const MainPage =
}
onPedalboardChanged(value: Pedalboard) {
let selectedItem = -1;
if (this.state.selectedPedal == Pedalboard.START_CONTROL || this.state.selectedPedal == Pedalboard.END_CONTROL) {
if (this.state.selectedPedal === Pedalboard.START_CONTROL || this.state.selectedPedal === Pedalboard.END_CONTROL) {
selectedItem = this.state.selectedPedal;
} else if (value.hasItem(this.state.selectedPedal)) {
selectedItem = this.state.selectedPedal;
+1
View File
@@ -66,6 +66,7 @@ const TERMINAL_ICON_URL = "img/fx_terminal.svg";
function CalculateConnection(numberOfInputs: number, numberOfOutputs: number)
{
let result = Math.min(numberOfInputs, numberOfOutputs);
if (result > 2) result = 2;
return result;
+5 -6
View File
@@ -38,7 +38,6 @@ import GovernorSettings from './GovernorSettings';
import WifiChannel from './WifiChannel';
import AlsaDeviceInfo from './AlsaDeviceInfo';
import { AndroidHostInterface, FakeAndroidHost } from './AndroidHost';
import Xxx from './XxxSnippet';
export enum State {
@@ -1176,7 +1175,7 @@ export class PiPedalModel //implements PiPedalModel
let changed: boolean = false;
let pedalboard = this.pedalboard.get();
if (pedalboard.input_volume_db != volume_db)
if (pedalboard.input_volume_db !== volume_db)
{
let newPedalboard = pedalboard.clone();
newPedalboard.input_volume_db = volume_db;
@@ -1207,7 +1206,7 @@ export class PiPedalModel //implements PiPedalModel
let changed: boolean = false;
let pedalboard = this.pedalboard.get();
if (pedalboard.output_volume_db != volume_db)
if (pedalboard.output_volume_db !== volume_db)
{
let newPedalboard = pedalboard.clone();
newPedalboard.output_volume_db = volume_db;
@@ -1234,7 +1233,7 @@ export class PiPedalModel //implements PiPedalModel
if (pedalboard === undefined) throw new PiPedalStateError("Pedalboard not ready.");
let newPedalboard = pedalboard.clone();
if (instanceId === Pedalboard.START_CONTROL && key == "volume_db")
if (instanceId === Pedalboard.START_CONTROL && key === "volume_db")
{
this._setInputVolume(value,notifyServer);
return;
@@ -1371,7 +1370,7 @@ export class PiPedalModel //implements PiPedalModel
// mouse is down. Don't update EVERYBODY, but we must change
// the control on the running audio plugin.
// TODO: respect "expensive" port attribute.
if (instanceId === Pedalboard.START_CONTROL && key == "volume_db")
if (instanceId === Pedalboard.START_CONTROL && key === "volume_db")
{
this.previewInputVolume(value);
return;
@@ -1391,7 +1390,7 @@ export class PiPedalModel //implements PiPedalModel
this.updateVst3State(newPedalboard);
let result = newPedalboard.deleteItem(instanceId);
if (result != null) {
if (result !== null) {
this.pedalboard.set(newPedalboard);
this.updateServerPedalboard();
}
+96 -53
View File
@@ -23,7 +23,7 @@ import { WithStyles } from '@mui/styles';
import createStyles from '@mui/styles/createStyles';
import withStyles from '@mui/styles/withStyles';
import { PiPedalModel, PiPedalModelFactory } from './PiPedalModel';
import { UiPlugin, UiControl, PiPedalFileProperty,ScalePoint} from './Lv2Plugin';
import { UiPlugin, UiControl, PiPedalFileProperty, ScalePoint } from './Lv2Plugin';
import {
Pedalboard, PedalboardItem, ControlValue
} from './Pedalboard';
@@ -48,7 +48,7 @@ export const StandardItemSize = { width: 80, height: 110 };
const LANDSCAPE_HEIGHT_BREAK = 500;
function makeIoPluginInfo(name: string, uri: string) : UiPlugin {
function makeIoPluginInfo(name: string, uri: string): UiPlugin {
let result = new UiPlugin();
result.name = name;
result.uri = uri;
@@ -58,12 +58,12 @@ function makeIoPluginInfo(name: string, uri: string) : UiPlugin {
volumeControl.index = 0;
volumeControl.is_input = true;
volumeControl.min_value = -60;
volumeControl.min_value = -60;
volumeControl.max_value = 30;
volumeControl.default_value = 0;
volumeControl.units = Units.db;
volumeControl.scale_points = [
new ScalePoint().deserialize({label: "-INF",value: -60})
new ScalePoint().deserialize({ label: "-INF", value: -60 })
];
result.controls = [
volumeControl
@@ -71,11 +71,11 @@ function makeIoPluginInfo(name: string, uri: string) : UiPlugin {
return result;
}
let startPluginInfo: UiPlugin =
makeIoPluginInfo("Input",Pedalboard.START_PEDALBOARD_ITEM_URI);
let startPluginInfo: UiPlugin =
makeIoPluginInfo("Input", Pedalboard.START_PEDALBOARD_ITEM_URI);
let endPluginInfo: UiPlugin =
makeIoPluginInfo("Output",Pedalboard.END_PEDALBOARD_ITEM_URI);
let endPluginInfo: UiPlugin =
makeIoPluginInfo("Output", Pedalboard.END_PEDALBOARD_ITEM_URI);
const styles = (theme: Theme) => createStyles({
@@ -181,6 +181,7 @@ const styles = (theme: Theme) => createStyles({
borderRadius: 8,
elevation: 12,
display: "flex",
textOverflow: "ellipsis",
flexDirection: "row", flexWrap: "nowrap",
flex: "0 0 auto"
},
@@ -188,9 +189,12 @@ const styles = (theme: Theme) => createStyles({
position: "absolute",
top: -15,
background: "white",
textOverflow: "ellipsis",
minWidth: 0,
marginLeft: 20,
paddingLeft: 8,
paddingRight: 8
paddingRight: 8,
margin_right: 28
},
portGroupControls: {
display: "flex",
@@ -203,11 +207,13 @@ const styles = (theme: Theme) => createStyles({
});
export class ControlGroup {
constructor(name: string, controls: ReactNode[]) {
constructor(name: string, indexes: number[], controls: ReactNode[]) {
this.name = name;
this.indexes = indexes;
this.controls = controls;
}
name: string;
indexes: number[];
controls: React.ReactNode[];
}
@@ -320,21 +326,20 @@ const PluginControlView =
makeFilePropertyUI(fileProperty: PiPedalFileProperty): ReactNode {
return ((
<FilePropertyControl instanceId={this.props.instanceId}
<FilePropertyControl instanceId={this.props.instanceId}
fileProperty={fileProperty}
onFileClick={(fileProperty,selectedFile) => {
this.setState({showFileDialog: true,dialogFileProperty: fileProperty,dialogFileValue: selectedFile});
onFileClick={(fileProperty, selectedFile) => {
this.setState({ showFileDialog: true, dialogFileProperty: fileProperty, dialogFileValue: selectedFile });
}}
/>
));
}
makeStandardControl(uiControl: UiControl, controlValues: ControlValue[]): ReactNode {
let symbol = uiControl.symbol;
if (!uiControl.is_input)
{
if (!uiControl.is_input) {
return (
<PluginOutputControl instanceId={this.props.instanceId} uiControl={uiControl} />
);
}
@@ -362,40 +367,82 @@ const PluginControlView =
getStandardControlNodes(plugin: UiPlugin, controlValues: ControlValue[]): ControlNodes {
let result: ControlNodes = [];
let portGroupMap: { [id: string]: ControlGroup } = {};
for (let i = 0; i < plugin.controls.length; ++i) {
let pluginControl = plugin.controls[i];
if (!pluginControl.not_on_gui) {
if (pluginControl.port_group !== "") {
let portGroup = pluginControl.port_group;
if (pluginControl.port_group !== "" && plugin.getPortGroupBySymbol(pluginControl.port_group)) {
let portGroup = nullCast(plugin.getPortGroupBySymbol(pluginControl.port_group));
let groupControls: ReactNode[] = [];
let indexes: number[] = [];
groupControls.push(
this.makeStandardControl(pluginControl, controlValues)
);
while (i + 1 < plugin.controls.length && plugin.controls[i + 1].port_group === portGroup) {
indexes.push(pluginControl.index);
while (i + 1 < plugin.controls.length && plugin.controls[i + 1].port_group === pluginControl.port_group) {
++i;
pluginControl = plugin.controls[i];
if (!pluginControl.not_on_gui) {
groupControls.push(
this.makeStandardControl(pluginControl,controlValues)
this.makeStandardControl(pluginControl, controlValues)
)
indexes.push(pluginControl.index);
}
}
let controlGroup = new ControlGroup(portGroup.name, indexes, groupControls);
result.push(
new ControlGroup(plugin.getPortGroup(portGroup).name, groupControls)
controlGroup
)
portGroupMap[pluginControl.port_group] = controlGroup;
} else {
result.push(
this.makeStandardControl(pluginControl,controlValues)
this.makeStandardControl(pluginControl, controlValues)
);
}
}
}
for (let i = 0; i < plugin.fileProperties.length; ++i) {
let fileProperty = plugin.fileProperties[i];
result.push(
this.makeFilePropertyUI(fileProperty)
);
let filePropertyUi = this.makeFilePropertyUI(fileProperty);
if (fileProperty.portGroup !== "" && plugin.getPortGroupByUri(fileProperty.portGroup)) {
let portGroup = nullCast(plugin.getPortGroupByUri(fileProperty.portGroup));
let controlGroup = portGroupMap[portGroup.symbol];
if (controlGroup) {
let insertPosition = controlGroup.indexes.length;
if (fileProperty.index !== -1) {
for (let i = 0; i < controlGroup.controls.length; ++i) {
if (controlGroup.indexes[i] >= fileProperty.index) {
insertPosition = i;
break;
}
}
}
let index = fileProperty.index !== -1 ? fileProperty.index : 100;
controlGroup.controls.splice(insertPosition, 0, filePropertyUi);
controlGroup.indexes.splice(insertPosition, 0, index);
} else {
let index = fileProperty.index !== -1 ? fileProperty.index : 100;
let controlGroup = new ControlGroup(
portGroup.name,
[index],
[filePropertyUi]);
result.push(
controlGroup
);
portGroupMap[portGroup.symbol] = controlGroup;
}
} else if (fileProperty.index !== -1) {
result.splice(fileProperty.index, 0, filePropertyUi);
} else {
result.push(
filePropertyUi
);
}
}
return result;
}
@@ -454,7 +501,7 @@ const PluginControlView =
result.push((
<div className={!isLandscapeGrid ? classes.portGroup : classes.portGroupLandscape}>
<div className={classes.portGroupTitle}>
<Typography noWrap variant="caption">{controlGroup.name}</Typography>
<Typography noWrap variant="caption" >{controlGroup.name}</Typography>
</div>
<div className={classes.portGroupControls} >
{
@@ -476,22 +523,20 @@ const PluginControlView =
return result;
}
static startPluginInfo: UiPlugin =
makeIoPluginInfo("Input",Pedalboard.START_PEDALBOARD_ITEM_URI);
static startPluginInfo: UiPlugin =
makeIoPluginInfo("Input", Pedalboard.START_PEDALBOARD_ITEM_URI);
static endPluginInfo: UiPlugin =
makeIoPluginInfo("Output",Pedalboard.END_PEDALBOARD_ITEM_URI);
static endPluginInfo: UiPlugin =
makeIoPluginInfo("Output", Pedalboard.END_PEDALBOARD_ITEM_URI);
render(): ReactNode {
let classes = this.props.classes;
let pedalboardItem: PedalboardItem;
let pedalboard = this.model.pedalboard.get();
if (this.props.instanceId == Pedalboard.START_CONTROL)
{
if (this.props.instanceId === Pedalboard.START_CONTROL) {
pedalboardItem = pedalboard.makeStartItem();
} else if (this.props.instanceId == Pedalboard.END_CONTROL)
{
} else if (this.props.instanceId === Pedalboard.END_CONTROL) {
pedalboardItem = pedalboard.makeEndItem();
} else {
pedalboardItem = pedalboard.getItem(this.props.instanceId);
@@ -504,14 +549,12 @@ const PluginControlView =
let plugin: UiPlugin;
if (pedalboardItem.isStart())
{
if (pedalboardItem.isStart()) {
plugin = startPluginInfo;
controlValues = [new ControlValue("volume_db",pedalboard.input_volume_db)];
} else if (pedalboardItem.isEnd())
{
controlValues = [new ControlValue("volume_db", pedalboard.input_volume_db)];
} else if (pedalboardItem.isEnd()) {
plugin = endPluginInfo;
controlValues = [new ControlValue("volume_db",pedalboard.output_volume_db)];
controlValues = [new ControlValue("volume_db", pedalboard.output_volume_db)];
} else {
plugin = nullCast(this.model.getUiPlugin(pedalboardItem.uri));
}
@@ -553,27 +596,27 @@ const PluginControlView =
)
}
</div>
<FilePropertyDialog open={this.state.showFileDialog}
fileProperty={this.state.dialogFileProperty}
selectedFile={this.state.dialogFileValue}
onCancel={()=> { this.setState({ showFileDialog: false});}}
onOk={(fileProperty,selectedFile)=> {
<FilePropertyDialog open={this.state.showFileDialog}
fileProperty={this.state.dialogFileProperty}
selectedFile={this.state.dialogFileValue}
onCancel={() => { this.setState({ showFileDialog: false }); }}
onOk={(fileProperty, selectedFile) => {
this.model.setPatchProperty(
this.props.instanceId,
fileProperty.patchProperty,
JsonAtom.Path(selectedFile)
)
.then( () => {
.then(() => {
})
.catch((error) =>
{
this.model.showAlert("setPatchProperty failed: " +error);
});
this.setState({ showFileDialog: false});}
})
.catch((error) => {
this.model.showAlert("setPatchProperty failed: " + error);
});
this.setState({ showFileDialog: false });
}
/>
}
/>
<FullScreenIME uiControl={this.state.imeUiControl} value={this.state.imeValue}
onChange={(key, value) => this.onImeValueChange(key, value)}
+64 -30
View File
@@ -35,10 +35,15 @@ import { PiPedalModelFactory } from "./PiPedalModel";
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
import { UiPlugin, UiControl } from './Lv2Plugin';
import PluginIcon from './PluginIcon';
import { Remark } from 'react-remark';
/* eslint-disable */
let myTheme: Theme| undefined = undefined;
const styles = (theme: Theme) =>
createStyles({
{
myTheme = theme;
return createStyles({
root: {
margin: 0,
padding: theme.spacing(2),
@@ -50,7 +55,7 @@ const styles = (theme: Theme) =>
color: theme.palette.grey[500],
},
});
};
export interface PluginInfoDialogTitleProps extends WithStyles<typeof styles> {
id: string;
children: React.ReactNode;
@@ -116,23 +121,23 @@ function ioDescription(plugin: UiPlugin): string {
}
function makeParagraphs(description: string) {
description = description.replaceAll('\r', '');
description = description.replaceAll('\n\n', '\r');
description = description.replaceAll('\n', ' ');
// function makeParagraphs(description: string) {
// description = description.replaceAll('\r', '');
// description = description.replaceAll('\n\n', '\r');
// description = description.replaceAll('\n', ' ');
let paragraphs: string[] = description.split('\r');
return (
<div style={{ paddingLeft: "24px" }}>
{paragraphs.map((para) => (
<Typography variant="body2" paragraph >
{para}
</Typography>
))}
</div>
// let paragraphs: string[] = description.split('\r');
// return (
// <div style={{ paddingLeft: "24px" }}>
// {paragraphs.map((para) => (
// <Typography variant="body2" paragraph >
// {para}
// </Typography>
// ))}
// </div>
);
}
// );
// }
function makeControls(controls: UiControl[]) {
let hasComments = false;
@@ -146,7 +151,7 @@ function makeControls(controls: UiControl[]) {
let trs: React.ReactElement[] = [];
for (let i = 0; i < controls.length; ++i) {
let control = controls[i];
if (!(control.not_on_gui) && control.is_input)
trs.push((
<tr>
<td style={{ verticalAlign: "top" }}>
@@ -246,37 +251,66 @@ const PluginInfoDialog = withStyles(styles)((props: PluginInfoProps) => {
</div>
</MuiDialogTitle>
<PluginInfoDialogContent dividers style={{ width: "100%", maxHeight: "80%", overflowX: "hidden" }}>
<div style={{ width: "100%",display: "flex", flexFlow: "row", justifyItems: "stretch", flexWrap: "nowrap" }} >
<div style={{ flex: "1 1 100%" }}>
<Typography gutterBottom >
<div style={{ width: "100%", display: "flex", flexFlow: "row", justifyItems: "stretch", flexWrap: "nowrap" }} >
<div style={{ flex: "1 1 auto", whiteSpace: "nowrap",minWidth: "auto" }}>
<Typography gutterBottom variant="body2" >
Author:&nbsp;
{(plugin.author_homepage !== "")
? <a href={plugin.author_homepage} target="_blank" rel="noreferrer">{plugin.author_name}</a>
: (
plugin.author_name
? (<a href={plugin.author_homepage} target="_blank" rel="noopener noreferrer">
{plugin.author_name}
</a>
)
: (
<span>{plugin.author_name}</span>
)
}
</Typography>
</div>
<div style={{ flex: "0 0 auto" }}>
<Typography gutterBottom >
<Typography gutterBottom variant="body2" >
{ioDescription(plugin)}
</Typography>
</div>
</div>
<Typography variant="body1" gutterBottom style={{ paddingTop: "1em" }}>
<Typography variant="body2" gutterBottom style={{ paddingTop: "1em" }}>
Controls:
</Typography>
{
makeControls(plugin.controls)
}
<Typography gutterBottom style={{ paddingTop: "1em" }}>
<Typography gutterBottom variant="body2" style={{ paddingTop: "1em" }}>
Description:
</Typography>
{
(plugin.description !== "") && makeParagraphs(plugin.description)
}
<div style={{ marginLeft: 24, marginTop: 16 }}>
<Remark
rehypeReactOptions={{
components: {
p: (props: any) => {
// return (
// <p className="MuiTypography-root MuiTypography-body2" {...props} />
// );
return (
<Typography variant="body2" paragraph={true} {...props} />
);
},
code: (props: any) => {
return (<code style={{fontSize: 14}} {...props} />);
},
a: (props: any) => {
return (
<a target="_blank" {...props} />
);
}
},
}}
>
{plugin.description}
</Remark>
</div>
</PluginInfoDialogContent>
<PluginInfoDialogActions>
<Button autoFocus onClick={handleClose} color="primary" style={{ width: "130px" }}>
-1
View File
@@ -186,7 +186,6 @@ const PresetSelector =
let currentPresets = this.model.presets.get();
let item = currentPresets.getItem(currentPresets.selectedInstanceId);
if (item == null) return;
let name = item.name;
this.model.newPresetItem(currentPresets.selectedInstanceId)
.then((instanceId) => {
this.model.loadPreset(instanceId);
+1 -1
View File
@@ -96,7 +96,7 @@ const SearchControl = withStyles(styles, { withTheme: true })(
)
}
<Input style={{
<Input spellCheck={false} style={{
flex: "1 1", visibility: (this.props.collapsed ?? false) ? "collapse" : "visible", marginRight: 12, height: 32,
}}
inputRef={this.getInputRef()}