Revert "UI Console Errors and Git Errors Fixes, + recommendations"
This reverts commit 1e9cd5eb13.
This commit is contained in:
@@ -36,16 +36,9 @@ jobs:
|
||||
sudo apt install libpipewire-0.3-dev
|
||||
|
||||
sudo apt install -y librsvg2-dev
|
||||
git submodule update --init --recursive
|
||||
git submodule update --init --recursive
|
||||
./react-config
|
||||
|
||||
- name: Run frontend lint
|
||||
working-directory: vite
|
||||
run: |
|
||||
npm ci
|
||||
npm run lint -- --fix
|
||||
|
||||
|
||||
- name: Configure CMake
|
||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
|
||||
@@ -62,14 +62,14 @@ const AboutDialog = class extends Component<AboutDialogProps, AboutDialogState>
|
||||
.then(jackStatus => {
|
||||
this.setState({ jackStatus: jackStatus });
|
||||
})
|
||||
.catch(() => { /* ignore*/ });
|
||||
.catch(_error => { /* ignore*/ });
|
||||
}
|
||||
}
|
||||
|
||||
timerHandle?: number;
|
||||
|
||||
updateNotifications() {
|
||||
const subscribed = this.mounted && this.props.open;
|
||||
let subscribed = this.mounted && this.props.open;
|
||||
if (subscribed !== this.subscribed) {
|
||||
if (subscribed) {
|
||||
this.timerHandle = setInterval(() => this.tick(), 1000);
|
||||
@@ -116,12 +116,12 @@ const AboutDialog = class extends Component<AboutDialogProps, AboutDialogState>
|
||||
this.mounted = false;
|
||||
this.updateNotifications();
|
||||
}
|
||||
componentDidUpdate(prevProps: Readonly<AboutDialogProps>, prevState: Readonly<AboutDialogState>, snapshot: unknown): void {
|
||||
componentDidUpdate(prevProps: Readonly<AboutDialogProps>, prevState: Readonly<AboutDialogState>, snapshot: any): void {
|
||||
super.componentDidUpdate?.(prevProps, prevState, snapshot);
|
||||
this.updateNotifications();
|
||||
}
|
||||
|
||||
handleDialogClose() {
|
||||
handleDialogClose(_e: SyntheticEvent) {
|
||||
this.props.onClose();
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ const AboutDialog = class extends Component<AboutDialogProps, AboutDialogState>
|
||||
render() {
|
||||
let addressKey = 0;
|
||||
let serverVersion = this.model.serverVersion?.serverVersion ?? "";
|
||||
const nPos = serverVersion.indexOf(' ');
|
||||
let nPos = serverVersion.indexOf(' ');
|
||||
if (nPos !== -1) {
|
||||
serverVersion = serverVersion.substring(nPos + 1);
|
||||
}
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
|
||||
|
||||
interface AlsaDeviceInfoJson {
|
||||
cardId: number;
|
||||
id: number;
|
||||
name: string;
|
||||
longName: string;
|
||||
sampleRates: number[];
|
||||
minBufferSize: number;
|
||||
maxBufferSize: number;
|
||||
supportsCapture?: boolean;
|
||||
supportsPlayback?: boolean;
|
||||
}
|
||||
|
||||
export default class AlsaDeviceInfo {
|
||||
deserialize(input: AlsaDeviceInfoJson): AlsaDeviceInfo {
|
||||
deserialize(input: any): AlsaDeviceInfo {
|
||||
this.cardId = input.cardId;
|
||||
this.id = input.id;
|
||||
this.name = input.name;
|
||||
@@ -25,9 +13,9 @@ export default class AlsaDeviceInfo {
|
||||
this.supportsPlayback = input.supportsPlayback ? true : false;
|
||||
return this;
|
||||
}
|
||||
static deserialize_array(input: AlsaDeviceInfoJson[]): AlsaDeviceInfo[]
|
||||
static deserialize_array(input: any): AlsaDeviceInfo[]
|
||||
{
|
||||
const result: AlsaDeviceInfo[] = [];
|
||||
let result: AlsaDeviceInfo[] = [];
|
||||
for (let i = 0; i < input.length; ++i)
|
||||
{
|
||||
result.push(new AlsaDeviceInfo().deserialize(input[i]));
|
||||
|
||||
@@ -22,19 +22,14 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
interface AlsaMidiDeviceInfoJson {
|
||||
name: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export class AlsaMidiDeviceInfo {
|
||||
deserialize(input: AlsaMidiDeviceInfoJson) : AlsaMidiDeviceInfo{
|
||||
deserialize(input: any) : AlsaMidiDeviceInfo{
|
||||
this.name = input.name;
|
||||
this.description = input.description;
|
||||
return this;
|
||||
}
|
||||
static deserializeArray(input: AlsaMidiDeviceInfoJson[]): AlsaMidiDeviceInfo[] {
|
||||
const result: AlsaMidiDeviceInfo[] = [];
|
||||
static deserializeArray(input: any[]): AlsaMidiDeviceInfo[] {
|
||||
let result: AlsaMidiDeviceInfo[] = [];
|
||||
for (let i = 0; i < input.length; ++i) {
|
||||
result[i] = new AlsaMidiDeviceInfo().deserialize(input[i]);
|
||||
}
|
||||
|
||||
@@ -17,21 +17,15 @@
|
||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
interface AlsaSequencerPortSelectionJson {
|
||||
id: string;
|
||||
name: string;
|
||||
sortOrder: number;
|
||||
}
|
||||
|
||||
export class AlsaSequencerPortSelection {
|
||||
deserialize(json: AlsaSequencerPortSelectionJson) {
|
||||
deserialize(json: any) {
|
||||
this.id = json.id;
|
||||
this.name = json.name;
|
||||
this.sortOrder = json.sortOrder;
|
||||
return this;
|
||||
};
|
||||
static deserialize_array(input: AlsaSequencerPortSelectionJson[]): AlsaSequencerPortSelection[] {
|
||||
const result: AlsaSequencerPortSelection[] = [];
|
||||
static deserialize_array(input: any): AlsaSequencerPortSelection[] {
|
||||
let result: AlsaSequencerPortSelection[] = [];
|
||||
for (let i = 0; i < input.length; ++i) {
|
||||
result[i] = new AlsaSequencerPortSelection().deserialize(input[i]);
|
||||
}
|
||||
@@ -42,17 +36,13 @@ export class AlsaSequencerPortSelection {
|
||||
sortOrder: number = 0;
|
||||
};
|
||||
|
||||
interface AlsaSequencerConfigurationJson {
|
||||
connections: AlsaSequencerPortSelectionJson[];
|
||||
}
|
||||
|
||||
export class AlsaSequencerConfiguration {
|
||||
deserialize(input: AlsaSequencerConfigurationJson) {
|
||||
deserialize(input: any) {
|
||||
this.connections = AlsaSequencerPortSelection.deserialize_array(input.connections);
|
||||
return this;
|
||||
}
|
||||
deserialize_array(input: AlsaSequencerConfigurationJson[]): AlsaSequencerConfiguration[] {
|
||||
const result: AlsaSequencerConfiguration[] = [];
|
||||
deserialize_array(input: any): AlsaSequencerConfiguration[] {
|
||||
let result: AlsaSequencerConfiguration[] = [];
|
||||
for (let i = 0; i < input.length; ++i) {
|
||||
result[i] = new AlsaSequencerConfiguration().deserialize(input[i]);
|
||||
}
|
||||
|
||||
@@ -54,13 +54,12 @@ export class FakeAndroidHost implements AndroidHostInterface
|
||||
return true;
|
||||
}
|
||||
setDisconnected(_isDisconnected: boolean): void {
|
||||
void _isDisconnected;
|
||||
|
||||
}
|
||||
showSponsorship() : void { }
|
||||
|
||||
launchExternalUrl(_url:string): boolean
|
||||
{
|
||||
void _url;
|
||||
return false;
|
||||
}
|
||||
private theme = 1;
|
||||
@@ -72,7 +71,6 @@ export class FakeAndroidHost implements AndroidHostInterface
|
||||
}
|
||||
setServerVersion(_serverVersion: string): void {
|
||||
// No-op for fake host
|
||||
void _serverVersion;
|
||||
}
|
||||
|
||||
private keepScreenOn = false;
|
||||
|
||||
@@ -154,7 +154,7 @@ const theme = createTheme(
|
||||
/* make the selection state for MuiListItemButtons a smidgen darker (light theme only) */
|
||||
MuiListItemButton: {
|
||||
styleOverrides: {
|
||||
root: () => ({
|
||||
root: ({ theme }) => ({
|
||||
'&.Mui-selected': {
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.2)', // Adjust for desired darkness
|
||||
'&:hover': {
|
||||
@@ -220,17 +220,19 @@ const theme = createTheme(
|
||||
|
||||
|
||||
|
||||
type AppThemeProps = Record<string, never>;
|
||||
type AppThemeProps = {
|
||||
|
||||
};
|
||||
|
||||
|
||||
function isTone3000Auth() {
|
||||
const url = new URL(window.location.href);
|
||||
const param = url.searchParams.get("api_key");
|
||||
let url = new URL(window.location.href);
|
||||
let param = url.searchParams.get("api_key");
|
||||
return (param !== null && param !== "")
|
||||
}
|
||||
function isFontTest() {
|
||||
const url = new URL(window.location.href);
|
||||
const param = url.searchParams.get("fontTest");
|
||||
let url = new URL(window.location.href);
|
||||
let param = url.searchParams.get("fontTest");
|
||||
return (param !== null)
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,8 @@ import { IDialogStackable, popDialogStack, pushDialogStack } from './DialogStack
|
||||
|
||||
|
||||
|
||||
type AppProps = WithStyles<typeof appStyles>;
|
||||
interface AppProps extends WithStyles<typeof appStyles> {
|
||||
};
|
||||
|
||||
const appStyles = ((theme: Theme) => (
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ export function createStyles<T>(style: T): T {
|
||||
}
|
||||
|
||||
export default
|
||||
interface WithStyles<T extends (...args: unknown[]) => unknown> {
|
||||
interface WithStyles<T extends (...args: any) => any> {
|
||||
className?: string;
|
||||
classes?: Partial<Record<keyof ReturnType<T>, string>>;
|
||||
|
||||
|
||||
@@ -54,7 +54,9 @@ interface ZoomedDialProps extends WithStyles<typeof styles> {
|
||||
onSetValue(value: number): void
|
||||
}
|
||||
|
||||
type ZoomedDialState = Record<string, never>;
|
||||
interface ZoomedDialState {
|
||||
|
||||
}
|
||||
|
||||
const ZoomedDial = withStyles(
|
||||
|
||||
@@ -157,7 +159,7 @@ const ZoomedDial = withStyles(
|
||||
|
||||
}
|
||||
|
||||
onTouchStart() {
|
||||
onTouchStart(e: TouchEvent<SVGSVGElement>) {
|
||||
//must be defined to get onTouchMove
|
||||
}
|
||||
onTouchMove(e: TouchEvent<SVGSVGElement>) {
|
||||
@@ -375,7 +377,8 @@ const ZoomedDial = withStyles(
|
||||
}
|
||||
|
||||
|
||||
onBodyPointerDownCapture(e: PointerEvent): any {
|
||||
onBodyPointerDownCapture(e_: any): any {
|
||||
let e = e_ as PointerEvent;
|
||||
if (this.isExtraTouch(e)) {
|
||||
this.captureElement!.setPointerCapture(e.pointerId);
|
||||
this.capturedPointers.push(e.pointerId);
|
||||
|
||||
@@ -94,21 +94,21 @@ const ZoomedUiControl = withTheme(withStyles(
|
||||
if (!this.props.controlInfo) {
|
||||
return 0;
|
||||
} else {
|
||||
const uiControl = this.props.controlInfo.uiControl;
|
||||
const instanceId = this.props.controlInfo.instanceId;
|
||||
let uiControl = this.props.controlInfo.uiControl;
|
||||
let instanceId = this.props.controlInfo.instanceId;
|
||||
if (instanceId === -2 && uiControl.symbol === "volume_db") {
|
||||
return this.model.pedalboard.get()?.input_volume_db??0;
|
||||
}
|
||||
|
||||
const pedalboardItem = this.model.pedalboard.get()?.getItem(instanceId);
|
||||
const value: number = pedalboardItem?.getControlValue(uiControl.symbol) ?? 0;
|
||||
let pedalboardItem = this.model.pedalboard.get()?.getItem(instanceId);
|
||||
let value: number = pedalboardItem?.getControlValue(uiControl.symbol) ?? 0;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onSelectChanged(val: string | number) {
|
||||
const v = Number.parseFloat(val.toString());
|
||||
let v = Number.parseFloat(val.toString());
|
||||
this.setState({ value: v });
|
||||
if (this.props.controlInfo) {
|
||||
this.model.setPedalboardControl(
|
||||
@@ -119,7 +119,7 @@ const ZoomedUiControl = withTheme(withStyles(
|
||||
}
|
||||
|
||||
onCheckChanged(checked: boolean): void {
|
||||
const v = checked ? 1: 0;
|
||||
let v = checked ? 1: 0;
|
||||
this.setState({ value: v });
|
||||
if (this.props.controlInfo) {
|
||||
this.model.setPedalboardControl(
|
||||
@@ -142,9 +142,9 @@ const ZoomedUiControl = withTheme(withStyles(
|
||||
|
||||
}
|
||||
|
||||
componentDidUpdate(oldProps: ZoomedUiControlProps) {
|
||||
componentDidUpdate(oldProps: ZoomedUiControlProps, oldState: ZoomedUiControlState) {
|
||||
if (this.hasControlChanged(oldProps, this.props)) {
|
||||
const currentValue = this.getCurrentValue();
|
||||
let currentValue = this.getCurrentValue();
|
||||
if (this.state.value !== currentValue) {
|
||||
this.setState({ value: this.getCurrentValue() });
|
||||
}
|
||||
@@ -204,10 +204,10 @@ const ZoomedUiControl = withTheme(withStyles(
|
||||
}
|
||||
}
|
||||
onDoubleTap() {
|
||||
const controlInfo = this.props.controlInfo;
|
||||
let controlInfo = this.props.controlInfo;
|
||||
if (!controlInfo) return;
|
||||
const instanceId = controlInfo?.instanceId;
|
||||
const uiControl = controlInfo?.uiControl;
|
||||
let instanceId = controlInfo?.instanceId;
|
||||
let uiControl = controlInfo?.uiControl
|
||||
|
||||
this.model.setPedalboardControl(instanceId,uiControl.symbol,uiControl.default_value);
|
||||
}
|
||||
@@ -216,9 +216,9 @@ const ZoomedUiControl = withTheme(withStyles(
|
||||
if (!this.props.controlInfo) {
|
||||
return false;
|
||||
}
|
||||
const uiControl = this.props.controlInfo.uiControl;
|
||||
let uiControl = this.props.controlInfo.uiControl;
|
||||
|
||||
const displayValue = uiControl.formatDisplayValue(this.state.value) ?? "";
|
||||
let displayValue = uiControl.formatDisplayValue(this.state.value) ?? "";
|
||||
if (uiControl.isOnOffSwitch())
|
||||
{
|
||||
displayValue = this.state.value !== 0 ? "On": "Off";
|
||||
|
||||
Reference in New Issue
Block a user