diff --git a/controllers/lnd/graphInfo.js b/controllers/lnd/graphInfo.js index 9d42e663..e2c76bbe 100644 --- a/controllers/lnd/graphInfo.js +++ b/controllers/lnd/graphInfo.js @@ -1,6 +1,6 @@ var request = require('request-promise'); -var options = require("../../connect"); var common = require('../../common'); +var options = {}; exports.getGraphInfo = (req, res, next) => { options = common.getOptions(); diff --git a/src/app/clightning/peers-channels/channels/channel-manage/channel-manage.component.html b/src/app/clightning/peers-channels/channels/channel-manage/channel-manage.component.html index b4163bbb..04e80042 100644 --- a/src/app/clightning/peers-channels/channels/channel-manage/channel-manage.component.html +++ b/src/app/clightning/peers-channels/channels/channel-manage/channel-manage.component.html @@ -12,11 +12,11 @@ Alias is required. - + (Wallet Bal: {{totalBalance}}, Remaining Bal: {{totalBalance - ((fundingAmount) ? fundingAmount : 0)}}) {{information?.smaller_currency_unit | titlecase}} Amount is required. - Amount must be less than or equal to {{totalBalance}}. + Amount must be less than or equal to {{totalBalance}}.
Private Channel diff --git a/src/app/lnd/peers-channels/channels/channel-manage/channel-manage.component.html b/src/app/lnd/peers-channels/channels/channel-manage/channel-manage.component.html index 1db048ec..ca1e3ee1 100644 --- a/src/app/lnd/peers-channels/channels/channel-manage/channel-manage.component.html +++ b/src/app/lnd/peers-channels/channels/channel-manage/channel-manage.component.html @@ -12,11 +12,11 @@ Alias is required. - + (Wallet Bal: {{totalBalance}}, Remaining Bal: {{totalBalance - ((fundingAmount) ? fundingAmount : 0)}}) {{information?.smaller_currency_unit | titlecase}} Amount is required. - Amount must be less than or equal to {{totalBalance}}. + Amount must be less than or equal to {{totalBalance}}.
Private Channel diff --git a/src/app/shared/components/data-modal/confirmation-message/confirmation-message.component.html b/src/app/shared/components/data-modal/confirmation-message/confirmation-message.component.html index 688b225e..5954487f 100644 --- a/src/app/shared/components/data-modal/confirmation-message/confirmation-message.component.html +++ b/src/app/shared/components/data-modal/confirmation-message/confirmation-message.component.html @@ -11,7 +11,7 @@

{{data.titleMessage}}

- + {{getInput.placeholder}} is required.
diff --git a/src/app/shared/components/data-modal/open-channel-cl/open-channel.component.html b/src/app/shared/components/data-modal/open-channel-cl/open-channel.component.html index dddccc95..a99bf182 100644 --- a/src/app/shared/components/data-modal/open-channel-cl/open-channel.component.html +++ b/src/app/shared/components/data-modal/open-channel-cl/open-channel.component.html @@ -47,11 +47,11 @@
- + (Wallet Bal: {{totalBalance}}, Remaining Bal: {{totalBalance - ((fundingAmount) ? fundingAmount : 0)}}) {{information?.smaller_currency_unit | titlecase}} Amount is required. - Amount must be less than or equal to {{totalBalance}}. + Amount must be less than or equal to {{totalBalance}}.
Private Channel diff --git a/src/app/shared/components/data-modal/open-channel-lnd/open-channel.component.html b/src/app/shared/components/data-modal/open-channel-lnd/open-channel.component.html index 642155b7..1f82bb55 100644 --- a/src/app/shared/components/data-modal/open-channel-lnd/open-channel.component.html +++ b/src/app/shared/components/data-modal/open-channel-lnd/open-channel.component.html @@ -47,11 +47,11 @@
- + (Remaining Bal: {{totalBalance - ((fundingAmount) ? fundingAmount : 0)}}) {{information?.smaller_currency_unit}} Amount is required. - Amount must be less than or equal to {{totalBalance}}. + Amount must be less than or equal to {{totalBalance}}.
Private Channel diff --git a/src/app/shared/components/login/login.component.html b/src/app/shared/components/login/login.component.html index 77dbf95e..cba586ea 100644 --- a/src/app/shared/components/login/login.component.html +++ b/src/app/shared/components/login/login.component.html @@ -8,7 +8,7 @@
- + Password is required.
diff --git a/src/app/shared/directive/clipboard.directive.spec.ts b/src/app/shared/directive/clipboard.directive.spec.ts deleted file mode 100644 index 79021ddf..00000000 --- a/src/app/shared/directive/clipboard.directive.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ClipboardDirective } from './clipboard.directive'; - -describe('ClipboardDirective', () => { - it('should create an instance', () => { - const directive = new ClipboardDirective(); - expect(directive).toBeTruthy(); - }); -}); diff --git a/src/app/shared/directive/max-amount.directive.ts b/src/app/shared/directive/max-amount.directive.ts new file mode 100644 index 00000000..dda8100a --- /dev/null +++ b/src/app/shared/directive/max-amount.directive.ts @@ -0,0 +1,14 @@ +import { Directive, Input } from "@angular/core"; +import { NG_VALIDATORS, Validator, Validators, AbstractControl } from '@angular/forms'; + +@Directive({ + selector: "input[max]", + providers: [{provide: NG_VALIDATORS, useExisting: MaxValidator, multi: true}] +}) +export class MaxValidator implements Validator { + @Input() max:number; + + validate(control: AbstractControl): any { + return this.max ? Validators.max(+this.max)(control) : null; + } +} \ No newline at end of file diff --git a/src/app/shared/directive/min-amount.directive.ts b/src/app/shared/directive/min-amount.directive.ts new file mode 100644 index 00000000..a8e5084d --- /dev/null +++ b/src/app/shared/directive/min-amount.directive.ts @@ -0,0 +1,14 @@ +import { Directive, Input } from '@angular/core'; +import { NG_VALIDATORS, Validator, Validators, AbstractControl } from '@angular/forms'; + +@Directive({ + selector: 'input[min]', + providers: [{provide: NG_VALIDATORS, useExisting: MinValidator, multi: true}] +}) +export class MinValidator implements Validator { + @Input() min:number; + + validate(control: AbstractControl): any { + return this.min ? Validators.min(+this.min)(control) : null; + } +} diff --git a/src/app/shared/directive/non-negative-amount.directive.ts b/src/app/shared/directive/non-negative-amount.directive.ts deleted file mode 100644 index 7dc4132c..00000000 --- a/src/app/shared/directive/non-negative-amount.directive.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Directive, Input } from "@angular/core"; -import { Validator, AbstractControl, NG_VALIDATORS } from "@angular/forms"; - -@Directive({ - selector: "[nonNegativeAmount]", - providers: [{ - provide: NG_VALIDATORS, - useExisting: NonNegativeAmountValidator, - multi: true - }] -}) -export class NonNegativeAmountValidator implements Validator { - @Input('nonNegativeAmount') nonNegativeAmount: number; - - validate(c: AbstractControl): any { - return (this.nonNegativeAmount && (this.nonNegativeAmount - +c.value < 0 )) ? { 'negative' : true } : null; - } -} \ No newline at end of file diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 8438da9c..2c88137e 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -45,13 +45,14 @@ import { ChannelRebalanceComponent } from './components/data-modal/channel-rebal import { CLOpenChannelComponent } from './components/data-modal/open-channel-cl/open-channel.component'; import { OpenChannelComponent } from './components/data-modal/open-channel-lnd/open-channel.component'; import { ShowPubkeyComponent } from './components/data-modal/show-pubkey/show-pubkey.component'; +import { AuthSettingsComponent } from './components/settings/auth-settings/auth-settings.component'; import { ClipboardDirective } from './directive/clipboard.directive'; import { AutoFocusDirective } from './directive/auto-focus.directive'; -import { NonNegativeAmountValidator } from './directive/non-negative-amount.directive'; +import { MaxValidator } from './directive/max-amount.directive'; +import { MinValidator } from './directive/min-amount.directive'; import { RemoveLeadingZerosPipe } from './pipes/app.pipe'; import { LoggerService, ConsoleLoggerService } from '../shared/services/logger.service'; -import { AuthSettingsComponent } from './components/settings/auth-settings/auth-settings.component'; @NgModule({ imports: [ @@ -153,7 +154,8 @@ import { AuthSettingsComponent } from './components/settings/auth-settings/auth- CurrencyUnitConverterComponent, ClipboardDirective, AutoFocusDirective, - NonNegativeAmountValidator, + MaxValidator, + MinValidator, QRCodeModule, RemoveLeadingZerosPipe, PerfectScrollbarModule @@ -179,7 +181,8 @@ import { AuthSettingsComponent } from './components/settings/auth-settings/auth- ErrorComponent, ClipboardDirective, AutoFocusDirective, - NonNegativeAmountValidator, + MaxValidator, + MinValidator, RemoveLeadingZerosPipe, CLOpenChannelComponent, OpenChannelComponent, diff --git a/src/app/shared/theme/styles/change-theme.scss b/src/app/shared/theme/styles/change-theme.scss index 126e6a7f..191c395a 100644 --- a/src/app/shared/theme/styles/change-theme.scss +++ b/src/app/shared/theme/styles/change-theme.scss @@ -463,6 +463,12 @@ overflow: hidden; } + .mat-icon-button { + width: 18px; + height: 18px; + line-height: 18px; + } + .balances-info-pie-chart { & .legend-label:nth-child(1) .legend-label-color { background-color: mat-color($primary, 200) !important; diff --git a/src/environments/version.ts b/src/environments/version.ts index 38f39bbc..329ea341 100644 --- a/src/environments/version.ts +++ b/src/environments/version.ts @@ -1 +1 @@ -export const VERSION = '0.6.5-beta'; \ No newline at end of file +export const VERSION = '0.6.5-beta';