Skip to content

Commit

Permalink
Feat/4.11.1 (#132)
Browse files Browse the repository at this point in the history
* Mobile table styles

* 4.11.1

* 4.11.1

* 4.11.1
  • Loading branch information
dev-ptera authored Feb 14, 2024
1 parent 5d3afe7 commit f36ca96
Show file tree
Hide file tree
Showing 14 changed files with 74 additions and 22 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Change Log

## v4.11.1 (February 14, 2024)

### Changed

- Changed new wallet styles and secure secret verbiage.
- Changed mobile dashboard's table-view styles.

### Fixed

- Fixed excessive warn logging of missing TheBananoStand API query params.
- Fixed warn color palettes not applying since `4.11.0`.
- Fixed copy-icon button vertical alignment.
- Fixed expansion panel indicator icon alignment.

## v4.11.0 (February 12, 2024)

### Changed
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.11.0",
"version": "4.11.1",
"scripts": {
"ng": "ng",
"start": "ng serve --open --host 0.0.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
button {
margin-left: 8px;
}
@include common.small-icon-button(16px, 32px);
@include common.small-icon-button();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import { SecretService } from '@app/services/secret.service';
<div class="create-wallet-overlay overlay-action-container">
<div class="overlay-header">Create a new wallet?</div>
<div class="overlay-body">
<div class="mat-body-2" style="margin-top: 0px; margin-bottom: 16px">
This secret text allows you to access your Banano using any wallet, like
<a href="https://kalium.banano.cc/" target="_blank" class="link">Kalium</a>.
</div>
<mat-accordion style="margin-bottom: 24px">
<mat-expansion-panel [expanded]="true" class="mat-elevation-z0 divider-border">
<mat-expansion-panel-header>
Expand Down Expand Up @@ -50,13 +54,9 @@ import { SecretService } from '@app/services/secret.service';
</div>
</mat-expansion-panel>
</mat-accordion>
<div class="mat-body-2" style="margin-top: 24px; margin-bottom: 16px">
This secret text allows you to access your Banano using any wallet, like
<a href="https://kalium.banano.cc/" target="_blank" class="link">Kalium</a>.
</div>
<div class="mat-body-2">
<div class="mat-body-2" style="margin-top: 16px;">
Losing this secret means losing access to your accounts.
<strong>Save your secret phrase in a secure place & don't lose it!</strong>
<strong>Save your seed and/or mnemonic phrase in a secure place & don't lose it!</strong>
</div>
<mat-checkbox style="margin: 16px 0" [(ngModel)]="hasConfirmedBackup">
I have saved my secret
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/account/account.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
display: flex;
justify-content: space-between;
padding: 4px 36px 4px 36px !important;
@include common.small-icon-button(16px, 32px);
@include common.small-icon-button();
* {
color: var(--text-contrast);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
.copy-address-button {
margin-left: 4px;
@include small-icon-button.small-icon-button(16px, 32px);
@include small-icon-button.small-icon-button();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,16 @@
border-radius: 1rem;
th,
td {
padding: 0 8px !important;
font-size: 13px;
padding: 0 4px;
}
th:first-child,
td:first-child {
padding-left: 32px;
}
th:last-child,
td:last-child {
padding-right: 4px;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ import * as Colors from '@brightlayer-ui/colors';
</th>
<td mat-cell *matCellDef="let element">
<div style="display: flex; align-items: center; flex-wrap: wrap">
<div style="margin-right: 16px">{{ element.balance | appComma }}</div>
<div [style.marginRight.px]="vp.sm || element.balance === 0 ? 0 : 16">
{{ element.balance | appComma }}
</div>
<div
class="hint mat-caption"
*ngIf="!vp.sm && element.balance !== 0"
Expand Down
12 changes: 6 additions & 6 deletions src/app/pages/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ export class DashboardComponent {
}

private _checkForApiRequestViaQueryParams(params: Params): void {
if (!this._isValidParams(params)) {
if (params) {
console.warn('Invalid query parameters provided while creating a BananoStand API request.');
console.warn('Parameter Options: "request (send | change), address, amount (send only)');
console.warn('Parameters provided: ', params);
}
if (this._util.isEmpty(params)) {
return;
}
if (!this._isValidParams(params)) {
console.warn('Invalid query parameters provided while creating a BananoStand API request.');
console.warn('Parameter Options: "request (send | change), address, amount (send only)');
console.warn('Parameters provided: ', params);
}
if (this.vp.sm) {
setTimeout(() => {
this._sheet.open(ApiRequestBottomSheetComponent);
Expand Down
9 changes: 9 additions & 0 deletions src/app/services/util.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ export class UtilService {
return address && address.length === 64 && address.startsWith('ban_');
}

isEmpty(obj: object): boolean {
for (const prop in obj) {
if (Object.hasOwn(obj, prop)) {
return false;
}
}
return true;
}

isValidHex(hex: string): boolean {
const validHexChars: string[] = [
'0',
Expand Down
13 changes: 13 additions & 0 deletions src/assets/themes/mixins/mdc-customization.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
@mixin mdc-overrides() {

.mat-expansion-panel-header.mat-expanded {
.mat-expansion-indicator {
margin-top: 12px;
}
}
.mat-expansion-panel-header {
.mat-expansion-indicator {
transition: all 200ms;
margin-top: 0px;
margin-bottom: 4px;
}
}

.mat-mdc-menu-item .mat-icon-no-color, .mat-mdc-menu-submenu-icon {
color: var(--icon-secondary);
}
Expand Down
5 changes: 3 additions & 2 deletions src/assets/themes/mixins/small-icon-button.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@mixin small-icon-button($icon-size, $button-size) {
@mixin small-icon-button() {
$icon-size: 16px;
mat-icon {
font-size: $icon-size;
width: $icon-size;
Expand All @@ -7,7 +8,7 @@
}
.mat-mdc-icon-button,
.mat-mdc-icon-button .mat-mdc-button-touch-target {
--mdc-icon-button-state-layer-size: #{$button-size};
--mdc-icon-button-state-layer-size: 28px;
padding: 0;
height: var(--mdc-icon-button-state-layer-size);
width: var(--mdc-icon-button-state-layer-size);
Expand Down
6 changes: 5 additions & 1 deletion src/assets/themes/palettes/palette-classes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.primary * {
color: var(--primary);
}
.warn, .warn * {
.warn, .warn *, .mat-warn {
color: var(--warn);
}

Expand All @@ -19,6 +19,10 @@
color: var(--icon-primary);
}

.mat-icon.mat-warn {
color: var(--warn);
}

.icon-secondary {
color: var(--icon-secondary);
}
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"importHelpers": true,
"target": "es2015",
"module": "es2020",
"lib": ["es2022", "dom"],
"allowSyntheticDefaultImports": true,
"paths": {
"@angular/*": ["../node_modules/@angular/*"],
Expand All @@ -22,7 +23,6 @@
"@app/overlays/*": ["app/overlays/*"],
"stream": ["node_modules/stream-browserify"]
},
"lib": ["es2021", "dom"]
},
"exclude": [
"cypress",
Expand Down

0 comments on commit f36ca96

Please sign in to comment.