Skip to content

Commit

Permalink
4.5.0 (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-ptera authored Dec 19, 2023
1 parent ce01cb8 commit 7902a02
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 9 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Change Log

## v4.5.0 (December 19, 2023)

### Added

- Added receiver alias (if known) to Send transaction workflow.
- Added copy address button to each entry in the Address Book.
- Added tooltips to Address Book row actions.

### Fixed

- No loading indicator visible when loading an account whose representative is offline.

### Changed

- Border / divider weight for light themes.

## v4.4.0 (December 8, 2023)

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thebananostand",
"version": "4.4.0",
"version": "4.5.0",
"scripts": {
"ng": "ng",
"start": "ng serve --open --host 0.0.0.0",
Expand Down
25 changes: 25 additions & 0 deletions src/app/overlays/actions/send/send.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,21 @@ export type SendOverlayData = {
[(ngModel)]="recipient"
></textarea>
</mat-form-field>
<div *ngIf="getAccountAlias(recipient)">
<div style="display: flex; align-items: center" class="mat-body-1">
Known as "{{ getAccountAlias(recipient) }}"
<a
style="margin-left: 4px"
[href]="'https://creeper.banano.cc/known-accounts#' + recipient"
target="_blank"
>
on Creeper</a
>
<mat-icon style="font-size: 14px; height: 14px; width: 14px; margin-left: 4px"
>open_in_new</mat-icon
>
</div>
</div>
</ng-container>
<select
Expand Down Expand Up @@ -187,6 +202,10 @@ export type SendOverlayData = {
style="word-break: break-all; font-family: monospace"
[innerHTML]="util.formatHtmlAddress(recipient)"
></div>
<ng-container *ngIf="getAccountAlias(recipient)">
<div style="font-weight: 600; margin-top: 16px">Known as</div>
<div style="margin-bottom: 16px;">{{ getAccountAlias(recipient) }}</div>
</ng-container>
</div>
</div>
<div class="overlay-footer">
Expand Down Expand Up @@ -394,6 +413,12 @@ export class SendComponent implements OnInit, OnDestroy {
}
}

getAccountAlias(address: string): string {
if (address) {
return this._appStoreService.knownAccounts.get(address);
}
}

private _hasUserEnteredValidSendAmount(): boolean {
if (!this.sendAmount) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/account/account.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
color="primary"
mode="indeterminate"
data-cy="loading-indicator"
style="left: 0"
style="left: 0; z-index: 1000"
[style.position]="vp.sm ? 'fixed' : 'absolute'"
[style.top.px]="vp.sm ? 40 : 0"
>
Expand Down
21 changes: 18 additions & 3 deletions src/app/pages/address-book/address-book.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import { WalletStorageService } from '@app/services/wallet-storage.service';
import { AddressBookEntry } from '@app/types/AddressBookEntry';

import { saveAs } from 'file-saver';
import { REMOVE_ADDRESS_BOOK_ENTRY, UPDATE_ADDRESS_BOOK } from '@app/services/wallet-events.service';
import {
COPY_ADDRESS_TO_CLIPBOARD,
REMOVE_ADDRESS_BOOK_ENTRY,
UPDATE_ADDRESS_BOOK,
} from '@app/services/wallet-events.service';
import { AppStateService } from '@app/services/app-state.service';
import { MatDialog } from '@angular/material/dialog';
import { MatBottomSheet } from '@angular/material/bottom-sheet';
Expand Down Expand Up @@ -110,10 +114,17 @@ import { UtilService } from '@app/services/util.service';
</div>
</div>
<div style="display: flex">
<button mat-icon-button (click)="openRenameWalletOverlay(entry)">
<button mat-icon-button (click)="copy(entry)" matTooltip="Copy address">
<mat-icon color="icon-secondary">content_copy</mat-icon>
</button>
<button
mat-icon-button
(click)="openRenameWalletOverlay(entry)"
matTooltip="Edit alias"
>
<mat-icon class="icon-secondary">edit</mat-icon>
</button>
<button mat-icon-button (click)="remove(entry)">
<button mat-icon-button (click)="remove(entry)" matTooltip="Remove entry">
<mat-icon color="warn">close</mat-icon>
</button>
</div>
Expand Down Expand Up @@ -159,6 +170,10 @@ export class AddressBookComponent {
this._location.back();
}

copy(entry: AddressBookEntry): void {
COPY_ADDRESS_TO_CLIPBOARD.next({ address: entry.account });
}

remove(entry: AddressBookEntry): void {
REMOVE_ADDRESS_BOOK_ENTRY.next(entry);
}
Expand Down
4 changes: 2 additions & 2 deletions src/assets/themes/palettes/jungle-green.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ $jungle-green-theme: mat.define-light-theme((
--hint: #{map-get(blui.$blui-black, 200)};
--icon-primary: #{map-get(blui.$blui-black, 500)};
--icon-secondary: #{map-get(blui.$blui-black, 300)};
--divider: rgba(66, 78, 84, 0.15);
--divider-border: rgba(66, 78, 84, 0.15);
--divider: rgba(66, 78, 84, 0.3);
--divider-border: rgba(66, 78, 84, 0.3);
--input-focus-bg: #{map-get(blui.$blui-gray, 50)};
}
4 changes: 2 additions & 2 deletions src/assets/themes/palettes/nano-blue.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ $nano-blue-theme: mat.define-light-theme((
--link: #{map-get(blui.$blui-blue, 500)};
--icon-primary: #{map-get(blui.$blui-black, 500)};
--icon-secondary: #{map-get(blui.$blui-black, 300)};
--divider: rgba(66, 78, 84, 0.15);
--divider-border: rgba(66, 78, 84, 0.15);
--divider: rgba(66, 78, 84, 0.3);
--divider-border: rgba(66, 78, 84, 0.3);
--input-focus-bg: #{map-get(blui.$blui-gray, 50)};

.mat-mdc-card {
Expand Down

0 comments on commit 7902a02

Please sign in to comment.