From d4ad1f9fce723f0bef45856d60267e8fba498125 Mon Sep 17 00:00:00 2001 From: Tzahi12345 Date: Wed, 6 May 2020 02:38:39 -0400 Subject: [PATCH] Added additional sentence to custom args hint and fixed issue where empty args could be added through the args modifier --- .../arg-modifier-dialog/arg-modifier-dialog.component.ts | 5 +++++ src/app/download-item/download-item.component.html | 2 +- src/app/main/main.component.html | 2 +- src/app/settings/settings.component.html | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/dialogs/arg-modifier-dialog/arg-modifier-dialog.component.ts b/src/app/dialogs/arg-modifier-dialog/arg-modifier-dialog.component.ts index 47dcc43..ea1cced 100644 --- a/src/app/dialogs/arg-modifier-dialog/arg-modifier-dialog.component.ts +++ b/src/app/dialogs/arg-modifier-dialog/arg-modifier-dialog.component.ts @@ -161,6 +161,11 @@ export class ArgModifierDialogComponent implements OnInit, AfterViewInit { add(event) { const input = event.input; const arg = event.value; + + if (!arg || arg.trim().length === 0) { + return; + } + this.args_array.push(arg); if (this.modified_args.length > 0) { this.modified_args += ',,' diff --git a/src/app/download-item/download-item.component.html b/src/app/download-item/download-item.component.html index 9c0b9c9..f23e3df 100644 --- a/src/app/download-item/download-item.component.html +++ b/src/app/download-item/download-item.component.html @@ -24,7 +24,7 @@
- An error has occured: + An error has occurred:
{{download.error}}
diff --git a/src/app/main/main.component.html b/src/app/main/main.component.html index e945967..2d8770f 100644 --- a/src/app/main/main.component.html +++ b/src/app/main/main.component.html @@ -116,7 +116,7 @@ - No need to include URL, just everything after. + No need to include URL, just everything after. Args are delimited using two commas like so: ,, diff --git a/src/app/settings/settings.component.html b/src/app/settings/settings.component.html index f184822..0643afe 100644 --- a/src/app/settings/settings.component.html +++ b/src/app/settings/settings.component.html @@ -143,7 +143,7 @@
- Global custom args for downloads on the home page. + Global custom args for downloads on the home page. Args are delimited using two commas like so: ,,