support custom quick save button styles on the mobile transaction edit page
This commit is contained in:
@@ -67,6 +67,38 @@ export class TransactionTagFilterType implements TypeAndName {
|
||||
}
|
||||
}
|
||||
|
||||
export class TransactionQuickSaveButtonStyle implements TypeAndName {
|
||||
private static readonly allInstances: TransactionQuickSaveButtonStyle[] = [];
|
||||
private static readonly allInstancesByType: Record<number, TransactionQuickSaveButtonStyle> = {};
|
||||
|
||||
public static readonly Disabled = new TransactionQuickSaveButtonStyle(0, 'Disabled');
|
||||
public static readonly BottomFixed = new TransactionQuickSaveButtonStyle(1, 'Bottom Fixed');
|
||||
public static readonly BottomLeftFloating = new TransactionQuickSaveButtonStyle(2, 'Bottom Left Floating');
|
||||
public static readonly BottomCenterFloating = new TransactionQuickSaveButtonStyle(3, 'Bottom Center Floating');
|
||||
public static readonly BottomRightFloating = new TransactionQuickSaveButtonStyle(4, 'Bottom Right Floating');
|
||||
|
||||
public static readonly Default = TransactionQuickSaveButtonStyle.BottomRightFloating;
|
||||
|
||||
public readonly type: number;
|
||||
public readonly name: string;
|
||||
|
||||
private constructor(type: number, name: string) {
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
|
||||
TransactionQuickSaveButtonStyle.allInstances.push(this);
|
||||
TransactionQuickSaveButtonStyle.allInstancesByType[type] = this;
|
||||
}
|
||||
|
||||
public static values(): TransactionQuickSaveButtonStyle[] {
|
||||
return TransactionQuickSaveButtonStyle.allInstances;
|
||||
}
|
||||
|
||||
public static valueOf(type: number): TransactionQuickSaveButtonStyle | undefined {
|
||||
return TransactionQuickSaveButtonStyle.allInstancesByType[type];
|
||||
}
|
||||
}
|
||||
|
||||
export class TransactionQuickAddButtonActionType implements TypeAndName {
|
||||
private static readonly allInstances: TransactionQuickAddButtonActionType[] = [];
|
||||
private static readonly allInstancesByType: Record<number, TransactionQuickAddButtonActionType> = {};
|
||||
|
||||
Reference in New Issue
Block a user