Skip to content

Commit

Permalink
Add support for sidepanel
Browse files Browse the repository at this point in the history
  • Loading branch information
sondreb committed Jan 8, 2025
1 parent 96ab0cb commit 425ba22
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
5 changes: 5 additions & 0 deletions angular/src/app/loading/loading.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ export class LoadingComponent implements OnInit, OnDestroy {
})).subscribe((res: { params: Params; data: Data }) => {
const { params, data } = res;

debugger;

// NOTE: This logic is executed every time / is navigated to.
if (this.document.body.classList.contains('popup-mode') || this.document.body.classList.contains('full-mode')) {
return;
Expand All @@ -81,6 +83,9 @@ export class LoadingComponent implements OnInit, OnDestroy {
// If it's verified that we're in a popup.
if (data['popup'] === true) {
this.document.body.classList.add('popup-mode');
} else if (data['side'] === true) {
this.document.body.classList.add('full-mode');
this.document.body.classList.add('side-mode');
} else {
this.document.body.classList.add('full-mode');
}
Expand Down
6 changes: 5 additions & 1 deletion angular/src/manifest/blockcore/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
"permissions": [
"storage",
"unlimitedStorage",
"alarms"
"alarms",
"sidePanel"
],
"side_panel": {
"default_path": "index.html?#/side"
},
"background": {
"service_worker": "background.js"
},
Expand Down
8 changes: 6 additions & 2 deletions angular/src/manifest/coinvault/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
"permissions": [
"storage",
"unlimitedStorage",
"alarms"
"alarms",
"sidePanel"
],
"side_panel": {
"default_path": "index.html?#/side"
},
"background": {
"service_worker": "background.js"
},
Expand Down Expand Up @@ -54,4 +58,4 @@
]
}
]
}
}
8 changes: 6 additions & 2 deletions angular/src/manifest/freecity/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
"permissions": [
"storage",
"unlimitedStorage",
"alarms"
"alarms",
"sidePanel"
],
"side_panel": {
"default_path": "index.html?#/side"
},
"background": {
"service_worker": "background.js"
},
Expand Down Expand Up @@ -57,4 +61,4 @@
]
}
]
}
}
4 changes: 4 additions & 0 deletions angular/src/styles/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ a:hover {
visibility: hidden;
}

.side-mode {

}

.maximize {
position: fixed;
bottom: 0px;
Expand Down

0 comments on commit 425ba22

Please sign in to comment.