feat: add embed URL parameter to hide header and back button
All checks were successful
Build / Build-and-ng-test (pull_request) Successful in 4m3s
Build / Build-and-test-development (pull_request) Successful in 10m6s
Lighthouse Checks / lighthouse (24.5.0) (pull_request) Successful in 18m39s

Closes #214
This commit is contained in:
s
2026-04-02 11:26:28 +02:00
parent 52ae3404ee
commit b0dc441d68
5 changed files with 19 additions and 5 deletions

View File

@@ -55,6 +55,7 @@ export interface HandsontableStaticConfig {
* Cached viyaApi collections, search and selected endpoint
*/
export const globals: {
embed: boolean
rootParam: string
dcLib: string
xlmaps: XLMapListItem[]
@@ -69,6 +70,7 @@ export const globals: {
handsontable: HandsontableStaticConfig
[key: string]: any
} = {
embed: false,
rootParam: <string>'',
dcLib: '',
xlmaps: [],

View File

@@ -107,7 +107,7 @@
</div>
</ng-container>
<header class="app-header">
<header class="app-header" *ngIf="!embed">
<!-- <button
*ngIf="
isMainRoute('view') ||
@@ -213,9 +213,10 @@
</header>
<nav
*ngIf="
router.url.includes('submitted') ||
!embed &&
(router.url.includes('submitted') ||
router.url.includes('approve') ||
router.url.includes('history')
router.url.includes('history'))
"
class="subnav"
>

View File

@@ -70,6 +70,7 @@ export class AppComponent {
public syssite = this.appService.syssite
public licenceState = this.licenceService.licenceState
public embed = globals.embed
constructor(
private appService: AppService,
@@ -143,6 +144,13 @@ export class AppComponent {
}
})
const embedParam = this.route.snapshot.queryParams['embed']
if (embedParam !== undefined) {
const isEmbed = embedParam !== 'false'
globals.embed = isEmbed
this.embed = isEmbed
}
this.subscribeToShowAbortModal()
this.subscribeToRequestsModal()
this.subscribeToStartupData()

View File

@@ -165,7 +165,7 @@
class="card-header clr-row buttonBar headerBar clr-flex-md-row clr-justify-content-center clr-justify-content-lg-end"
>
<div
*ngIf="tableTrue"
*ngIf="tableTrue && !embed"
class="clr-col-12 clr-col-md-3 clr-col-lg-4 backBtn"
>
<span

View File

@@ -264,6 +264,9 @@ export class EditorComponent implements OnInit, AfterViewInit, OnDestroy {
public badEdit = false
public badEditCause: string | undefined
public badEditTitle: string | undefined
get embed() {
return globals.embed
}
public tableTrue: boolean | undefined
public saveLoading = false
public approvers: string[] = []