Commit 6ec8900b authored by nwindis's avatar nwindis
Browse files

chore: merge dev state into feature

parents 8dcb61a2 9b3e4104
Pipeline #190377 passed with stages
in 2 minutes and 14 seconds
#!/bin/bash
# This script has originally been a template at .gitlab-ci.yml.
# In order to use it within a Bash conditional we moved it to this script file.
bash .ci-scripts/set_entrypoint_ci.sh
npm install
npm run build
npm run tweak:build
\ No newline at end of file
#!/bin/bash
FILE="src/index.template.html"
if grep -q '"entrypoint": ""' "$FILE"; then
echo "No entry point update required."
echo "CONTINUE_BUILD=true" >> build.env
else
echo "Entry point has to be removed."
mkdir -p /tmp/this && cd /tmp/this || exit
git clone git@gitlab.gwdg.de:subugoe/emo/QViewer.git
cd QViewer || exit
sed -i 's/"entrypoint": ".*"/"entrypoint": ""/' src/index.template.html
git add src/index.template.html && git commit -m "ci: remove entry point" && git push
echo "CONTINUE_BUILD=false" >> build.env
fi
\ No newline at end of file
......@@ -3,16 +3,33 @@ cache:
- node_modules/
stages:
- clean
- build
- deploy
- preserve-pages
# Templates
.build: &build
- bash .ci-scripts/set_entrypoint_ci.sh
- npm install
- npm run build
- npm run tweak:build
.git: &git
- eval $(ssh-agent -s)
- echo "$DEPLOY_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan gitlab.gwdg.de >> ~/.ssh/known_hosts
- git config --global user.email "tido@gitlab.gwdg.de"
- git config --global user.name "Gitlab CI"
clean_up:
image: docker.gitlab.gwdg.de/mrodzis/docker-images/debian
stage: clean
only:
- main
- develop
script:
- *git
- bash .ci-scripts/remove_entrypoint.sh
artifacts:
reports:
dotenv: build.env
build_test:
image: docker.gitlab.gwdg.de/subugoe/emo/qviewer/node:latest
......@@ -21,7 +38,7 @@ build_test:
- develop
stage: build
script:
- *build
- bash .ci-scripts/build.sh
artifacts:
paths:
- dist/
......@@ -33,7 +50,7 @@ build_main_and_develop:
- develop
stage: build
script:
- *build
- if [[ $CONTINUE_BUILD == "true" ]]; then bash .ci-scripts/build.sh; fi
artifacts:
paths:
- dist/
......@@ -83,21 +100,6 @@ pushback:
paths:
- updated-artifact.zip
.production:
image: node:latest
only:
- main
stage: deploy
script:
- npm install
- npm run build
- npm run tweak:build
- mkdir tido && mv dist/* tido/
artifacts:
expire_in: 5 yrs
paths:
- tido
# when a git flow release is made, a tag will be pushed starting this job. it
# will keep the resulting artifact from the job declared in `JOB_NUMBER_TO_PRESERVE`
# and it will set up a Gitlab release at the repo. therefore the merge message starting
......
......@@ -165,22 +165,26 @@ import '@subugoe/tido/dist/tido'
{
"connector": [1],
"panel_label": "Contents",
"show": true
"show": true,
"toggle": true
},
{
"connector": [3],
"panel_label": "Image",
"show": true
"show": true,
"toggle": true
},
{
"connector": [4],
"panel_label": "Text",
"show": true
"show": true,
"toggle": false
},
{
"connector": [2],
"panel_label": "Metadata",
"show": true
"show": true,
"toggle": true
}
],
"rtl": false,
......@@ -306,7 +310,7 @@ As a rule of thumb, each key with a boolean value (e.g. *true* or *false*) defau
```html
<script id="tido-config" type="application/json">
{
"entrypoint": "https://{server}{/prefix}/{collection}/collection.json",
"entrypoint": "https://subugoe.pages.gwdg.de/emo/backend/sampledata/collection.json",
"colors": {
"primary": "",
"secondary": "",
......@@ -348,22 +352,26 @@ As a rule of thumb, each key with a boolean value (e.g. *true* or *false*) defau
{
"connector": [1],
"panel_label": "Contents",
"show": true
"show": true,
"toggle": true
},
{
"connector": [3],
"panel_label": "Image",
"show": true
"show": true,
"toggle": true
},
{
"connector": [4],
"panel_label": "Text",
"show": true
"show": true,
"toggle": false
},
{
"connector": [2],
"panel_label": "Metadata",
"show": true
"show": true,
"toggle": true
}
],
"rtl": false,
......@@ -479,22 +487,26 @@ As a rule of thumb, each key with a boolean value (e.g. *true* or *false*) defau
{
"connector": [1],
"panel_label": "Contents",
"show": true
"show": true,
"toggle": true
},
{
"connector": [3],
"panel_label": "Image",
"show": true
"show": true,
"toggle": true
},
{
"connector": [4],
"panel_label": "Text",
"show": true
"show": true,
"toggle": false
},
{
"connector": [2],
"panel_label": "Metadata",
"show": true
"show": true,
"toggle": true
}
],
......@@ -540,6 +552,12 @@ Each object inside that constant consists of similar keys: `connector`, `pane_la
toggles (`show` or rather `hide`) the appropriate panel respectively
- **toggle**
whether to show the related panel toggle or not
Defaults to `true`.
**Note**:
## Viewer Components
......
......@@ -2,7 +2,8 @@
<div>
<q-btn-dropdown
v-if="$q.screen.width < 1200"
:dropdown-icon="dropicon"
:dropdown-icon="fasCaretDown"
outline
flat
:class="$q.dark.isActive ? 'bg-black' : 'bg-secondary text-black'"
label="Show/Hide Panels"
......@@ -23,10 +24,9 @@
import { fasCaretDown } from '@quasar/extras/fontawesome-v5';
export default {
computed: {
dropicon() {
return fasCaretDown;
},
// keep icon from reactivity
created() {
this.fasCaretDown = fasCaretDown;
},
};
</script>
......@@ -7,6 +7,7 @@
:key="`toggle${i}`"
>
<q-item
v-if="p.toggle"
v-close-popup
clickable
flat
......@@ -24,6 +25,7 @@
</div>
<q-item
v-if="toggleCounter"
v-close-popup
clickable
flat
......@@ -67,6 +69,12 @@ export default {
default: () => [],
},
},
computed: {
toggleCounter() {
const toggleCount = this.panels.filter((panel) => panel.toggle === true);
return toggleCount.length > 0;
},
},
created() {
// mount the fonts
this.fasCheckCircle = fasCheckCircle;
......
......@@ -63,22 +63,26 @@
{
"connector": [1],
"panel_label": "Contents",
"show": true
"show": true,
"toggle": true
},
{
"connector": [3],
"panel_label": "Image",
"show": true
"show": true,
"toggle": true
},
{
"connector": [4],
"panel_label": "Text",
"show": true
"show": true,
"toggle": true
},
{
"connector": [2],
"panel_label": "Metadata",
"show": true
"show": true,
"toggle": true
}
],
"rtl": false,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment