diff --git a/Dockerfile b/Dockerfile index 5500dce717e8d7b79bfc75ce166fa67572d9b77b..a32859e79b8164a6c2f2489ff785ed09ba6da154 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,11 @@ ENV BACKEND_URL=$BACKEND_URL ARG USE_LOGO ENV USE_LOGO=${USE_LOGO:-hbp} -ARG STRIC_LOCAL -ENV STRIC_LOCAL={STRIC_LOCAL:-false} +ARG STRICT_LOCAL +ENV STRICT_LOCAL=${STRICT_LOCAL:-false} + +ARG KIOSK_MODE +ENV KIOSK_MODE=${KIOSK_MODE:-false} COPY . /iv WORKDIR /iv diff --git a/src/atlasViewer/atlasViewer.component.ts b/src/atlasViewer/atlasViewer.component.ts index 1fb529182a79e49977936b9407bf196c9205b7b4..446e18a5c0215801d14aef82d7dc8dda4d2211e4 100644 --- a/src/atlasViewer/atlasViewer.component.ts +++ b/src/atlasViewer/atlasViewer.component.ts @@ -269,25 +269,28 @@ export class AtlasViewer implements OnDestroy, OnInit, AfterViewInit { ngOnInit() { this.meetsRequirement = this.meetsRequirements() - this.subscriptions.push( - merge( - fromEvent(window.document, 'mouseup'), - this.slService.onClick - ).pipe( - startWith(true), - switchMapTo(timer(1000 * 5 * 60).pipe( - take(1) - )) - ).subscribe(() => { - this.slService.showBackdrop(this.idelTmpl) - }) - ) - - this.subscriptions.push( - this.slService.onClick.subscribe(() => { - this.slService.hideBackdrop() - }) - ) + if (KIOSK_MODE) { + + this.subscriptions.push( + merge( + fromEvent(window.document, 'mouseup'), + this.slService.onClick + ).pipe( + startWith(true), + switchMapTo(timer(1000 * 5 * 60).pipe( + take(1) + )) + ).subscribe(() => { + this.slService.showBackdrop(this.idelTmpl) + }) + ) + + this.subscriptions.push( + this.slService.onClick.subscribe(() => { + this.slService.hideBackdrop() + }) + ) + } if (!this.meetsRequirement) { merge( diff --git a/src/ui/databrowserModule/singleDataset/singleDataset.base.ts b/src/ui/databrowserModule/singleDataset/singleDataset.base.ts index b428a1ab20e4912ece7d74aab734ec334f793c23..6313d689e7c7366d5ccb89c3950e0a1b080ec0e9 100644 --- a/src/ui/databrowserModule/singleDataset/singleDataset.base.ts +++ b/src/ui/databrowserModule/singleDataset/singleDataset.base.ts @@ -36,7 +36,7 @@ export class SingleDatasetBase implements OnInit { public preview: boolean = false private humanReadableFileSizePipe: HumanReadableFileSizePipe = new HumanReadableFileSizePipe() - public strictLocal: boolean = STRIC_LOCAL + public strictLocal: boolean = STRICT_LOCAL /** * sic! diff --git a/typings/index.d.ts b/typings/index.d.ts index 9d7e3f3e5484ca52b69acd9eba99e0e431d82957..c6153f52b65a634cc35153c9f83275b3327b9c85 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -14,4 +14,5 @@ declare var VERSION : string declare var PRODUCTION: boolean declare var BACKEND_URL: string declare var USE_LOGO: string -declare var STRIC_LOCAL: boolean \ No newline at end of file +declare var STRICT_LOCAL: boolean +declare var KIOSK_MODE: boolean \ No newline at end of file diff --git a/webpack.staticassets.js b/webpack.staticassets.js index a6e069e8afaea68384b16baf78d0d8238e130cc4..f043dbc4d2e95346dacfb4ccc90c3179f6b5d8dc 100644 --- a/webpack.staticassets.js +++ b/webpack.staticassets.js @@ -55,9 +55,12 @@ module.exports = { filename: 'theme.css' }), new webpack.DefinePlugin({ + // TODO deprecate PLUGINDEV : process.env.PLUGINDEV ? JSON.stringify(process.env.PLUGINDEV) : false, + + // TODO deprecate BUNDLEDPLUGINS : process.env.BUNDLEDPLUGINS ? JSON.stringify(process.env.BUNDLEDPLUGINS.split(',')) : JSON.stringify([]), @@ -66,12 +69,15 @@ module.exports = { : process.env.GIT_HASH ? JSON.stringify(process.env.GIT_HASH) : JSON.stringify('unspecificied hash'), - PRODUCTION: process.env.PRODUCTION - ? true - : false, + PRODUCTION: !!process.env.PRODUCTION, BACKEND_URL: (process.env.BACKEND_URL && JSON.stringify(process.env.BACKEND_URL)) || 'null', USE_LOGO: JSON.stringify(process.env.USE_LOGO || 'hbp' || 'ebrains' || 'fzj'), - STRIC_LOCAL: process.env.STRIC_LOCAL === 'true' ? 'true' : 'false' + + // strick local hides "explore" and "download" btns, which requires internet + STRICT_LOCAL: process.env.STRICT_LOCAL === 'true' ? 'true' : 'false', + + // invite user to touch/interact after 5 min of inactivity + KIOSK_MODE: process.env.KIOSK_MODE === 'true' ? 'true' : 'false' }) ], resolve: {