diff --git a/.gitignore b/.gitignore
index b9d1bac..43eb6f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,5 +41,6 @@ testem.log
.DS_Store
Thumbs.db
-src/environments/*
+src/environments/
+src/index.*.html
*.code-workspace
\ No newline at end of file
diff --git a/angular.json b/angular.json
index 2c425b7..1aaf3e5 100644
--- a/angular.json
+++ b/angular.json
@@ -47,7 +47,7 @@
"budgets": [
{
"type": "initial",
- "maximumWarning": "500kB",
+ "maximumWarning": "1024kB",
"maximumError": "1MB"
},
{
@@ -56,6 +56,15 @@
"maximumError": "4kB"
}
],
+ "optimization": true,
+ "sourceMap": false,
+ "namedChunks": false,
+ "aot": true,
+ "extractLicenses": true,
+ "index": {
+ "input": "src/index.prod.html",
+ "output": "index.html"
+ },
"outputHashing": "all"
},
"development": {
@@ -112,4 +121,4 @@
}
}
}
-}
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 133ceb9..b585675 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -23,7 +23,6 @@
"angular-oauth2-oidc": "^17.0.2",
"express": "^4.18.2",
"ngx-socket-io": "^4.7.0",
- "randomstring": "^1.3.1",
"rxjs": "~7.8.0",
"rxjs-websockets": "^9.0.0",
"tslib": "^2.3.0",
@@ -10353,6 +10352,14 @@
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
"dev": true,
"license": "MIT"
+ },
+ "peerDependencies": {
+ "@angular/animations": "^19.0.1",
+ "@angular/common": "^19.0.1",
+ "@angular/core": "^19.0.1",
+ "@angular/forms": "^19.0.1",
+ "rxjs": "^6.5.3 || ^7.4.0"
+ }
},
"node_modules/ngx-socket-io": {
"version": "4.8.2",
@@ -11534,26 +11541,12 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"safe-buffer": "^5.1.0"
}
},
- "node_modules/randomstring": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/randomstring/-/randomstring-1.3.1.tgz",
- "integrity": "sha512-lgXZa80MUkjWdE7g2+PZ1xDLzc7/RokXVEQOv5NN2UOTChW1I8A9gha5a9xYBOqgaSoI6uJikDmCU8PyRdArRQ==",
- "license": "MIT",
- "dependencies": {
- "randombytes": "2.1.0"
- },
- "bin": {
- "randomstring": "bin/randomstring"
- },
- "engines": {
- "node": "*"
- }
- },
"node_modules/range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
diff --git a/package.json b/package.json
index 7e548f2..1d4df2c 100644
--- a/package.json
+++ b/package.json
@@ -3,9 +3,9 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
- "start": "ng serve",
+ "start": "ng serve -c production --host 0.0.0.0 --watch false",
"build": "ng build",
- "watch": "ng build --watch --configuration development",
+ "watch": "ng serve -c development --host 0.0.0.0",
"test": "ng test",
"serve:ssr:hermes-web-angular": "node dist/hermes-web-angular/server/server.mjs"
},
diff --git a/src/app/actions/action-dropdown/action-dropdown.component.ts b/src/app/actions/action-dropdown/action-dropdown.component.ts
index 36df2d7..88d1ffb 100644
--- a/src/app/actions/action-dropdown/action-dropdown.component.ts
+++ b/src/app/actions/action-dropdown/action-dropdown.component.ts
@@ -4,7 +4,7 @@ import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { ActivatedRoute } from '@angular/router';
-import RedeemableAction from '../../shared/models/redeemable_action';
+import RedeemableAction from '../../shared/models/redeemable-action';
@Component({
selector: 'action-dropdown',
diff --git a/src/app/actions/action-item-edit/action-item-edit.component.ts b/src/app/actions/action-item-edit/action-item-edit.component.ts
index 538c868..61d824f 100644
--- a/src/app/actions/action-item-edit/action-item-edit.component.ts
+++ b/src/app/actions/action-item-edit/action-item-edit.component.ts
@@ -1,6 +1,6 @@
import { Component, inject, OnInit } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
-import RedeemableAction from '../../shared/models/redeemable_action';
+import RedeemableAction from '../../shared/models/redeemable-action';
import { MatCardModule } from '@angular/material/card';
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import { MatButtonModule } from '@angular/material/button';
@@ -235,9 +235,10 @@ export class ActionItemEditComponent implements OnInit {
}
deleteAction(action: RedeemableAction): void {
- if (this.isNew)
+ if (this.isNew || this.waitForResponse)
return;
+ this.waitForResponse = true;
this.client.first((d: any) => d.op == 4 && d.d.request.type == 'delete_redeemable_action' && d.d.request.data.name == this.action.name)
.subscribe({
next: () => this.dialogRef.close(),
@@ -248,12 +249,15 @@ export class ActionItemEditComponent implements OnInit {
}
save(): void {
- if (this.formGroup.invalid) {
+ if (this.formGroup.invalid || this.waitForResponse) {
return;
}
+ this.waitForResponse = true;
+
const fields = this.actionEntries[this.action.type];
if (fields.some(f => f.control.invalid)) {
+ this.waitForResponse = false;
return;
}
@@ -265,6 +269,7 @@ export class ActionItemEditComponent implements OnInit {
}
if (!(this.action.type in this.actionEntries)) {
+ this.waitForResponse = false;
return;
}
diff --git a/src/app/actions/action-list/action-list.component.scss b/src/app/actions/action-list/action-list.component.scss
index b7ccfb8..894a345 100644
--- a/src/app/actions/action-list/action-list.component.scss
+++ b/src/app/actions/action-list/action-list.component.scss
@@ -7,7 +7,6 @@ main {
justify-content: center;
text-align: center;
justify-self: center;
- background-color: #fafafa;
width: 80%;
& .container {
diff --git a/src/app/actions/action-list/action-list.component.ts b/src/app/actions/action-list/action-list.component.ts
index c85345d..87bc474 100644
--- a/src/app/actions/action-list/action-list.component.ts
+++ b/src/app/actions/action-list/action-list.component.ts
@@ -1,6 +1,6 @@
import { Component, EventEmitter, inject, Input, Output } from '@angular/core';
import { MatListModule } from '@angular/material/list';
-import RedeemableAction from '../../shared/models/redeemable_action';
+import RedeemableAction from '../../shared/models/redeemable-action';
import { MatButtonModule } from '@angular/material/button';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
diff --git a/src/app/actions/actions.module.ts b/src/app/actions/actions.module.ts
index 562f7a0..da7deb7 100644
--- a/src/app/actions/actions.module.ts
+++ b/src/app/actions/actions.module.ts
@@ -1,5 +1,4 @@
import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
import { ActionsComponent } from './actions/actions.component';
import { ActionListComponent } from './action-list/action-list.component';
import { ActionItemEditComponent } from './action-item-edit/action-item-edit.component';
diff --git a/src/app/actions/actions/actions.component.html b/src/app/actions/actions/actions.component.html
index 3752838..1c13110 100644
--- a/src/app/actions/actions/actions.component.html
+++ b/src/app/actions/actions/actions.component.html
@@ -27,5 +27,5 @@
-
+