Loading .env +1 −0 Changes for .env: 1 added line, 0 removed lines. Original line number Diff line number Diff line VITE_VERBOSE=0 VITE_DATASET_FILES="/datasets/datasets.json" VITE_TITLE_TAG= .gitlab-ci.yml +17 −4 Changes for .gitlab-ci.yml: 17 added lines, 4 removed lines. Original line number Diff line number Diff line variables: DEV_PUBLISH_BRANCH: main PUBLISH_BRANCH: deploy workflow: rules: - if: $CI_COMMIT_BRANCH == $PUBLISH_BRANCH stages: - deploy deploy to server: stage: deploy rules: - if: $CI_COMMIT_BRANCH == $PUBLISH_BRANCH environment: production tags: - internal Loading @@ -27,3 +26,17 @@ deploy to server: script: - echo "Deploying to $DEPLOY_SERVER..." - 'echo "$CI_COMMIT_SHA" | ssh -i ~/.ssh/privkey -o StrictHostKeyChecking=yes -T "$DEPLOY_USERHOST"' deploy to pages: stage: deploy rules: - if: $CI_COMMIT_BRANCH == $DEV_PUBLISH_BRANCH tags: - docker image: node:21 script: - cp -v "$PAGES_ENV_LOCAL" ./.env.local - npm install - npx vite build -m development --outDir dist pages: publish: dist index.html +1 −1 Changes for index.html: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ </head> <body v-scope> <div class="body-content" :style="{cursor: cursor}"> <h1 class="title" title="Image Viewer with Online Interactive Relighting">IVOIRe</h1> <h1 class="title" title="Image Viewer with Online Interactive Relighting">{{title}}</h1> <header class="navbar" v-cloak> <div> Loading src/app.ts +1 −0 Changes for src/app.ts: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -219,6 +219,7 @@ export class App { const rx = { fn, phase: 'initial' as RunPhase, title: 'IVOIRe' + (import.meta.env.VITE_TITLE_TAG && ` (${import.meta.env.VITE_TITLE_TAG})`), datasets: { server: new Array<{ id: string; name: LocString }>(), memory: new Array<{ id: string; name: LocString }>(), Loading src/dataset.ts +4 −11 Changes for src/dataset.ts: 4 added lines, 11 removed lines. Original line number Diff line number Diff line import {DownloadManager} from "./download.ts"; import {TextureSource, TileGrid, TileTree} from "./tiling.ts"; import {DataPair} from "./utils.ts"; import { DownloadManager } from './download.ts'; import { TextureSource, TileGrid, TileTree } from './tiling.ts'; import { DataPair } from './utils.ts'; type OptionalKeys<Type, Keys extends keyof Type> = Omit<Type, Keys> & { [key in Keys]?: Type[key] } type OptionalType<Data extends Dataset> = OptionalKeys<Data['data'], "type">; Loading Loading @@ -33,6 +33,7 @@ export abstract class Dataset { this.id = data.id; this.name = data.name; this.description = data.description; // noinspection PointlessBooleanExpressionJS this.flipY = data.flipY !== false; } Loading Loading @@ -217,14 +218,6 @@ export class TiledDataset extends Dataset { } private static parseDZIXML(doc: XMLDocument): DeepZoomInfo { /*<?xml version="1.0" encoding="UTF-8"?> <Image xmlns="http://schemas.microsoft.com/deepzoom/2008" Format="jpg" Overlap="2" TileSize="256" > <Size Height="9221" Width="7026"/> </Image>*/ function getRequiredAttr(el: Element, attr: string): string { const val = el.getAttribute(attr); if (!val) throw new Error(`Missing required attribute ${attr} on element ${el.tagName}`); Loading Loading
.env +1 −0 Changes for .env: 1 added line, 0 removed lines. Original line number Diff line number Diff line VITE_VERBOSE=0 VITE_DATASET_FILES="/datasets/datasets.json" VITE_TITLE_TAG=
.gitlab-ci.yml +17 −4 Changes for .gitlab-ci.yml: 17 added lines, 4 removed lines. Original line number Diff line number Diff line variables: DEV_PUBLISH_BRANCH: main PUBLISH_BRANCH: deploy workflow: rules: - if: $CI_COMMIT_BRANCH == $PUBLISH_BRANCH stages: - deploy deploy to server: stage: deploy rules: - if: $CI_COMMIT_BRANCH == $PUBLISH_BRANCH environment: production tags: - internal Loading @@ -27,3 +26,17 @@ deploy to server: script: - echo "Deploying to $DEPLOY_SERVER..." - 'echo "$CI_COMMIT_SHA" | ssh -i ~/.ssh/privkey -o StrictHostKeyChecking=yes -T "$DEPLOY_USERHOST"' deploy to pages: stage: deploy rules: - if: $CI_COMMIT_BRANCH == $DEV_PUBLISH_BRANCH tags: - docker image: node:21 script: - cp -v "$PAGES_ENV_LOCAL" ./.env.local - npm install - npx vite build -m development --outDir dist pages: publish: dist
index.html +1 −1 Changes for index.html: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ </head> <body v-scope> <div class="body-content" :style="{cursor: cursor}"> <h1 class="title" title="Image Viewer with Online Interactive Relighting">IVOIRe</h1> <h1 class="title" title="Image Viewer with Online Interactive Relighting">{{title}}</h1> <header class="navbar" v-cloak> <div> Loading
src/app.ts +1 −0 Changes for src/app.ts: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -219,6 +219,7 @@ export class App { const rx = { fn, phase: 'initial' as RunPhase, title: 'IVOIRe' + (import.meta.env.VITE_TITLE_TAG && ` (${import.meta.env.VITE_TITLE_TAG})`), datasets: { server: new Array<{ id: string; name: LocString }>(), memory: new Array<{ id: string; name: LocString }>(), Loading
src/dataset.ts +4 −11 Changes for src/dataset.ts: 4 added lines, 11 removed lines. Original line number Diff line number Diff line import {DownloadManager} from "./download.ts"; import {TextureSource, TileGrid, TileTree} from "./tiling.ts"; import {DataPair} from "./utils.ts"; import { DownloadManager } from './download.ts'; import { TextureSource, TileGrid, TileTree } from './tiling.ts'; import { DataPair } from './utils.ts'; type OptionalKeys<Type, Keys extends keyof Type> = Omit<Type, Keys> & { [key in Keys]?: Type[key] } type OptionalType<Data extends Dataset> = OptionalKeys<Data['data'], "type">; Loading Loading @@ -33,6 +33,7 @@ export abstract class Dataset { this.id = data.id; this.name = data.name; this.description = data.description; // noinspection PointlessBooleanExpressionJS this.flipY = data.flipY !== false; } Loading Loading @@ -217,14 +218,6 @@ export class TiledDataset extends Dataset { } private static parseDZIXML(doc: XMLDocument): DeepZoomInfo { /*<?xml version="1.0" encoding="UTF-8"?> <Image xmlns="http://schemas.microsoft.com/deepzoom/2008" Format="jpg" Overlap="2" TileSize="256" > <Size Height="9221" Width="7026"/> </Image>*/ function getRequiredAttr(el: Element, attr: string): string { const val = el.getAttribute(attr); if (!val) throw new Error(`Missing required attribute ${attr} on element ${el.tagName}`); Loading