Commit 1445f40e authored by schneider210's avatar schneider210
Browse files

Merge branch 'develop' into issue/#265-move-misc-icons

parents fab89b39 2b3d2218
......@@ -30,7 +30,7 @@ done
rm "${FILES[@]}"
# print the result
ls $DIST_DIR
ls -l $DIST_DIR
# replace the included js files from the former build by the single one concatenated above
sed -ri 's:<script\s+src.*</script>:<script src="'${PROD_NAME}'.js"></script>:' ${DIST_DIR}/index.html
......
#!/bin/bash
# This script is resposible for determining which artifacts are too old to be
# kept any longer. The artifacts are needed and preserved for having the
# environments at hand any time.
#
# Some lines have been commented since they don't work properly at the moment.
# Currently artifacts are kept for two weeks since this is our average sprint
# duration.
#
# Some lines have been commented out since they don't work properly at the moment.
# We left them in there as a basis in case we want to improve the performance
# of the build process at a later stage.
#
......
#!/bin/bash
# This script remove any entry point given at src/index.template.html.
# If an entry point is removed, src/index.template.html is committed again
# to the repository which triggers a new pipeline. Here there variable
# $CONTINUE_BUILD comes into play.
# In order to avoid having to build the complete application although the
# current pipeline will trigger a new one, $CONTINUE_BUILD is set to "false"
# and prevents a complete build and deployment.
FILE="src/index.template.html"
if grep -q '"entrypoint": ""' "$FILE"; then
......
#!/bin/bash
# This script creates a basic 404 page for GitLab pages.
# It comes into play when a build isn't continued due to the entry point being removed.
# Since the removal of an entry point triggers a new pipeline, the respective GitLab page
# will be created accordingly. The page created by this script serves as a placeholder until
# the correct page has been created.
echo "Create 404 page"
mkdir public
echo "<!DOCTYPE html><html><head><title>TIDO 404</title><meta charset='utf-8'></head><body>404: no build contents have been provided</body>" > public/404.html
#!/bin/bash
# this script sets the entrypoint for TIDO
# This script sets the entry point for TIDO's GitLab pages. They are not part of version
# controlling.
#
# reason: if an entrypoint is provided, it will be compiled and integrated into the build
# the build takes precedence and prevents the according config option to take effect
# on the the other hand, the entrypoint is needed for the demo page to show data
# https://subugoe.pages.gwdg.de/emo/Qviewer/develop/#/
# Reason: If an entrypoint is provided, it will be compiled and integrated into the build.
# Since we still want to have data at our hands when developing and for the official TIDO
# link, the entry point has to be set without being present in the repository.
echo CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME}
......@@ -23,7 +23,7 @@ case $CI_COMMIT_REF_NAME in
echo "set entrypoint for testing"
# TIDO is developed in the context of the Ahiqar project, therefore we use the Ahiqar data for
# development purposes.
ENTRY_POINT=https://ahikar-test.sub.uni-goettingen.de/api/textapi/ahikar/arabic-karshuni/collection.json
ENTRY_POINT=https://ahikar-dev.sub.uni-goettingen.de/api/textapi/ahikar/arabic-karshuni/collection.json
sed -ri 's|.*("entrypoint"\s*:).*$|\t\t\t\1 "'${ENTRY_POINT}'",|' src/index.template.html
;;
esac
......
#!/bin/bash
# This script takes the old artifacts containing the data needed for the environments and
# adds the current branch's data to them.
dist_dir=$(grep distDir quasar.conf.js | cut -d "'" -f2)
project_id=10921
# get the latest 'deploy' artifact which contains the former states/environments
# get and extract the latest 'deploy' artifact which contains the former states/environments
jobs=$(curl --header "PRIVATE-TOKEN: $API_TOKEN" "https://gitlab.gwdg.de/api/v4/projects/${project_id}/jobs?scope=success" | jq 'sort_by(.finished_at) | reverse')
latest_deploy_job_id=$(echo $jobs | jq '.[] | select(.stage == "deploy").id' | sed -n 1p)
curl --output old-artifact.zip --header "PRIVATE-TOKEN: $API_TOKEN" "https://gitlab.gwdg.de/api/v4/projects/10921/jobs/${latest_deploy_job_id}/artifacts"
# add current data to artifact
unzip -u old-artifact.zip
# add current data to artifact. this only takes place if $CONTINUE_BUILD is set to 'true' or we are on a feature/bugfix/… branch.
# the differentiation between the branches is necessary because $CONTINUE_BUILD is only set on 'main' and 'develop'.
if [[ $CONTINUE_BUILD == "true" || ($CI_COMMIT_BRANCH != "main" && $CI_COMMIT_BRANCH != "develop") ]]; then
mkdir -p public/{${CI_COMMIT_SHORT_SHA},${CI_COMMIT_REF_SLUG}}
echo public/${CI_COMMIT_SHORT_SHA} public/${CI_COMMIT_REF_SLUG} | xargs -n 1 cp --remove-destination --recursive ${dist_dir}/*
......
# this file defines the CI/CD stages for the TIDO viewer.
# in some cases they invoke scripts provided at .ci-scripts/ in order to
# keep this file slim and clear. please have a look at these scripts for
# information that goes beyond the documentation of the single stages.
cache:
paths:
- node_modules/
......@@ -18,6 +23,13 @@ stages:
- git config --global user.email "tido@gitlab.gwdg.de"
- git config --global user.name "Gitlab CI"
# this stage checks if an entry point is set in src/index.template.html and removes it.
# the reasoning behind this is that the entry point should be empty on `develop` and `main`
# so that releases don't accidentally ship an entry point.
# during this stage, the variable $CONTINUE_BUILD is set and exported which determines if
# the following pipeline stages are fully executed. if an entry point has to be removed, it is
# set to 'false' since src/index.template.html is modified and recomitted which triggers a new
# pipeline.
clean_up:
image: docker.gitlab.gwdg.de/mrodzis/docker-images/debian
stage: clean
......@@ -31,6 +43,7 @@ clean_up:
reports:
dotenv: build.env
# builds TIDO on feature and bugfix branches.
build_test:
image: docker.gitlab.gwdg.de/subugoe/emo/qviewer/node:latest
except:
......@@ -43,6 +56,9 @@ build_test:
paths:
- dist/
# builds TIDO on `main` and `develop`.
# the software is only built if no entry point has been removed during
# the 'clean' stage.
build_main_and_develop:
image: docker.gitlab.gwdg.de/subugoe/emo/qviewer/node:latest
only:
......@@ -56,6 +72,11 @@ build_main_and_develop:
- dist/
expire_in: 1 mos
# this job triggers a new build of the Ahiqar specific TIDO viewer after a
# merge to `main` (which is only done during a release).
# this way the Ahiqar specific TIDO gets updated automatically if a new
# version of the generic TIDO is available.
# this connection will be removed at some point of the TIDO development.
update-ahikar:
stage: deploy
only:
......@@ -65,6 +86,10 @@ update-ahikar:
UPSTREAM_COMMIT_SHA: "${CI_COMMIT_SHA}"
trigger: "subugoe/ahiqar/ahiqar-tido"
# creates the GitLab pages for the environments.
# if an entry point has been removed during the 'clean' stage, we temporarily set a custom
# 404 page on `main` and `develop` which will replaced during the next pipeline. since
# removing the entry point triggers a new pipeline, the 404 state will only last for a few minutes.
pages:
image: docker.gitlab.gwdg.de/mrodzis/docker-images/debian
# at the very early stage lets deploy for every branch
......@@ -89,6 +114,8 @@ pages:
paths:
- public
# this stage serves for preserving the pages that have been created in the last two weeks.
# without this job the pages would get lost or be overwritten by the 'pages' job.
pushback:
before_script:
- dnf install -y zip
......
......@@ -2,6 +2,86 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [1.12.0](https://gitlab.gwdg.de/subugoe/emo/Qviewer/compare/v1.11.0...v1.12.0) (2021-06-17)
### Features
* add padding to list not to overlap with FAB ([0db4c91](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/0db4c9184adb9f952da39bc78707539db4793074))
* fab with highlight all/none ([463333d](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/463333dd75e57b784d40cf24fbd08bea38fa1e53))
* fab with highlight all/none ([3ad837f](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/3ad837fd856e50a9ae4939590a74c95a19230291)), closes [#158](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/issues/158)
* implement motifs tab in annotations ([f64e38a](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/f64e38a986af103ff27afa7c4ce7d4c9f475cd45))
* styled fab ([1aaeb65](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/1aaeb6575f9a3200a5d5fb737e3716feacd0bf73))
### Bug Fixes
* closes [#275](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/issues/275) by resetting the toggle state on text panel update ([6c6d888](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/6c6d888af5e6d12e0ed2ff57ec32e67c76e62e0a))
* highlight all or none in respective tab ([2dae09e](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/2dae09ee1b70434eb327b51140b5cb6f17c3c346))
* last element not cut off anymore and list is scrollable ([766d4a4](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/766d4a4a26dbf88ca3faccd3470dd2832ac97a1f))
* provide scroll area to scroll the list of annotaions wheever it excedd it's viewport ([fba060c](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/fba060cc0e11cb3e8aee0fa528ff293b5a690396))
### Styling
* accent color for floating action button annotations panel ([183ca40](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/183ca40ba77912191f9d132ab59d5f7ed164e994)), closes [#282](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/issues/282)
* adopt the styling from the text panel (content.vue) ([e16bed7](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/e16bed7a91984af7b77ea02de315208bad214f81))
* basic "style" (fix typo) ([afaa1fc](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/afaa1fca2b8f4150aef22a7a28923fa38b636dbc))
* changed color style to use quasar variable ([24b230d](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/24b230de819a9c2a2629fa5e3096e36a12f0a022))
* improve icon spacing of annotations in text panel ([d4ffdb8](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/d4ffdb8b44c1b9a5f8bd4384a250416fae64c66b))
* improve var name ([7bea027](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/7bea0276573e7ccfaf923b03d1d48e4541536a75))
* introduce new folder for several annotation components ([8cf0e2f](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/8cf0e2f4c55f4f6b044eadd75df030e19dd7e6b8))
### Refactoring
* addressing review comments ([55d865b](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/55d865b67a13f96db312390ae5427db3b2297159))
* annotation tabs have to be generic ([dcaad91](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/dcaad915595117cfe0eee48adf7f56d25bc6462a))
* highlight all or none code refactor ([469e825](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/469e82563d6c5429da8916269e6d17cc35d70aa8))
* improve maintainability due to modularization ([594a26e](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/594a26e8b48b2490c598fa33ffd5607f9af9c747))
* improvement: split the template into it's main parts (annotationlist) ([a44038d](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/a44038d4fb47b952dddd3eb161a536ea404b74a1))
* logic to add text class names ([5f9e3d8](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/5f9e3d8ab78fe2f4748234b3299afff420ea807c))
* provide a template for the upcoming annotation toggles to be treated in [#271](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/issues/271) ([39a10d1](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/39a10d146d498f675730f4f92c50a617659675b9))
* provide new component "annotationlist" ([9190f9e](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/9190f9e42b1e01241482525e9799b6845a1471b3))
* remove obsolete code ([28b9412](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/28b9412034b9cc94083616623cf309ef0a3ff315))
* renamed prop and added i18n to tab titles ([968ea86](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/968ea86834531ad46cb63d1829e4289f17d4a2ae))
* show notification if annotations aren't available ([fcff762](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/fcff76247efd9c4d378366bb9460455138657b6a))
* wrap text elements to if condition ([1d62df8](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/1d62df898f8a776cc8088bded87868965a2b55f2))
### Docs
* add docs about stages [skip ci] ([e775784](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/e775784402e02e4468720cabefcd3a4d8cbe82e4))
* extend docs for ci scripts ([65c3b9d](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/65c3b9de4a34469665d0eb7835395f8bc44fa83c))
* update README according to the changes in the congig object ([289ad26](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/289ad26a8848685face17b1586599916fb425a57))
* update README in regards to annotation type configuration ([3e7d78e](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/3e7d78ef90c59137bb5ce6312f1770e4d27799de))
* updated read me ([86ad976](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/86ad976cc2342f2cffbfbb0d5b025589a8032bb8))
* used suggested translation ([e42d087](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/e42d087e329785922297aece832fb644c8dce85d))
### Continuos Integration
* remove entry point ([2a7b302](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/2a7b302e6708978eea73f88c9db33fe44eeab534))
* remove entry point ([27d5fc4](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/27d5fc472ac11873b9d6558d19e52b04ce99b214))
* remove entry point ([aabf429](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/aabf4294af609dd14fb7f79871814f2ae4dd8c3e))
* remove entry point ([bfff14a](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/bfff14a3ccafa41adc5d175c34e6d148db40136a))
* remove entry point ([579b690](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/579b690e6db85c6953122892023663c0184b07e2))
* remove entry point ([f722a02](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/f722a025e8c8ca5523996b380f631c9270cf4428))
* remove entry point ([32d1ac8](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/32d1ac826565fbcba43f04dacbcaa099eb2d2937))
* remove entry point ([f6ec55e](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/f6ec55e725e189e40bc09ed486b2eddeb3f1e367))
* remove entry point ([cdf6950](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/cdf6950b650bf745486e1fdec2c0f993f79a1e98))
### Chore
* add entrypoint for dev ([888025b](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/888025bc2e5d94fbe0edc23a53008f1bef45d0fb))
* merge branch 'develop' into feature/[#272](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/issues/272)-annotation-motifs ([3596ab8](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/3596ab87b5433f51971611f381f7cb9aab9864a4))
* merge develop ([ecceda5](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/ecceda51e109913a14cfc348ff740239ea894194))
* relabel toggle buttons ([0a1df8c](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/0a1df8c18fa660e213dd5d992510d5d022fe151b))
* remove obsolete style block ([b1a9996](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/b1a9996201bfa622ca00ef5927d677ee75b5071e))
* typo ([3ef43aa](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/3ef43aa0f0ad288179fafd7da3830e59567aa430))
* wIP: try to tackle last list item which is still cut off ([89e018c](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/commit/89e018cbf0b7dc4dc17f166d2e4abfb09afbc99a))
## [1.11.0](https://gitlab.gwdg.de/subugoe/emo/Qviewer/compare/v1.10.0...v1.11.0) (2021-06-01)
......
......@@ -202,21 +202,30 @@ As a rule of thumb, each key with a boolean value (e.g. *true* or *false*) defau
"annotations": {
"types": [
{
"content-type": "Person",
"contenttype": "Person",
"icon": "fasUser",
"label": "Names"
},
{
"content-type": "Place",
"contenttype": "Place",
"icon": "fasMapMarkerAlt",
"label": "Places"
},
{
"content-type": "Editorial Comment",
"contenttype": "Editorial Comment",
"icon": "fasComment",
"label": "Comments"
},
{
"contenttype": "Motif",
"icon": "fasHighlighter",
"label": "Motifs"
}
]
],
"tabs": {
"Editorial": ["Person", "Place", "Editorial Comment"],
"Motif": ["Motif"]
}
},
"colors": {
"primary": "",
......@@ -310,6 +319,23 @@ As a rule of thumb, each key with a boolean value (e.g. *true* or *false*) defau
The label of the annotation type respectively
- **tabs**
the tabs-object represents different types of annotations to be displayed in tabs accordingly.
it consists of further extensible sub keys called group labels, either of it representing a single group of annotations, e.g. *editorial*, *motifs*.
these labels act as your tab heading and it's naming is up to your liking.
e.g.
```JSON
"tabs": {
"First group": ["Person", "Place", "Editorial Comment"],
"Second one": ["Motif"]
}
```
**Note**: The strings contained within the group label keys (e.g. *Person*, *Place*, ...) have to match it's API-counterpart explicitely. Please refer to the note above (content-type).
- **colors**
set the colors used in the frontend.
......
{
"name": "@subugoe/tido",
"version": "1.11.0",
"version": "1.12.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......
{
"name": "@subugoe/tido",
"version": "1.11.0",
"version": "1.12.0",
"description": "Text vIever for Digital Objects",
"productName": "TIDO",
"keywords": [
......@@ -98,7 +98,7 @@
"release": "npm run build && npm run tweak:build && npm publish",
"test": "npm run test:unit",
"test:unit": "jest --updateSnapshot",
"tweak:build": "./tweak_build.sh",
"tweak:build": "bash .build-scripts/tweak_build.sh",
"write-changelog": "HUSKY_SKIP_HOOKS=1 standard-version"
},
"files": [
......
......@@ -154,7 +154,6 @@ export default {
}
} catch (err) {
this.annotations = [];
this.$q.notify({ message: 'No annotations available' });
} finally {
this.annotationLoading = true;
}
......@@ -387,7 +386,6 @@ export default {
: this.getManifest(this.config.entrypoint);
},
},
};
</script>
......
<template>
<div class="annotations">
<div class="item">
<q-tabs
v-model="currentTab"
active-color="$q.dark.isActive ? 'white' : 'accent'"
......@@ -13,30 +13,19 @@
:key="annotationTab.key"
:label="$t(annotationTab.collectionTitle)"
:name="annotationTab.key"
@click="activeTab(annotationTab.key)"
@click="activeTab(annotationTab.key,annotationTab.type)"
/>
</q-tabs>
<div
v-if="currentAnnotations.length"
class="q-ma-sm"
>
<AnnotationToggles />
<AnnotationToggles />
<AnnotationList
:configured-annotations="currentAnnotations"
:get-icon="getIcon"
:status-check="statusCheck"
:toggle="toggle"
/>
<AnnotationOptions
:selected-all="selectedAll"
:selected-none="selectedNone"
:on-highlight-all="onHighlightAll"
:on-highlight-none="onHighlightNone"
/>
</div>
<AnnotationList
v-if="currentAnnotations.length"
:configured-annotations="currentAnnotations"
:get-icon="getIcon"
:status-check="statusCheck"
:toggle="toggle"
/>
<div
v-else
......@@ -44,6 +33,13 @@
>
<Notification :message="$t(messages.none)" />
</div>
<AnnotationOptions
:selected-all="selectedAll"
:selected-none="selectedNone"
:on-highlight-all="onHighlightAll"
:on-highlight-none="onHighlightNone"
/>
</div>
</template>
......@@ -87,7 +83,7 @@ export default {
},
selectedAll: false,
selectedNone: true,
currentTab: 'editorial',
currentTab: '',
};
},
computed: {
......@@ -97,21 +93,39 @@ export default {
currentAnnotations() {
const contentType = this.annotationTabs.find((collection) => collection.key === this.currentTab);
if (!contentType) {
return [];
}
return this.configuredAnnotations.filter((annotationCollection) => contentType.type.includes(annotationCollection.body['x-content-type']));
},
annotationTabConfig() {
return this.config?.annotations?.tabs || {};
},
annotationTabs() {
return [
{
collectionTitle: 'Editorial',
key: 'editorial',
type: ['Place', 'Person', 'Editorial Comment'],
},
{
collectionTitle: 'Motifs',
key: 'motifs',
type: ['Motif'],
},
];
const contentTypes = {};
const annotationTab = {};
Object.entries(this.annotationTabConfig).forEach(([key, types]) => {
types.forEach((type) => {
contentTypes[type] = key;
});
annotationTab[key] = {
key,
collectionTitle: key,
type: [],
};
});
this.annotations.forEach((curr) => {
const contentType = curr.body.['x-content-type'];
if (contentTypes[contentType]) {
annotationTab[contentTypes[contentType]].type.push(contentType);
}
});
return Object.values(annotationTab).filter((x) => x.type.length);
},
},
mounted() {
......@@ -127,38 +141,38 @@ export default {
const interval = setInterval(() => {
if (this.annotationLoading) {
const firstTab = this.annotationTabs.find((x) => x.type.length)?.key || '';
this.configuredAnnotations = this.filterAnnotationTypes();
this.highlightActiveTabContent('editorial');
this.highlightActiveTabContent(this.annotationTabConfig[firstTab] || []);
this.currentTab = firstTab;
clearInterval(interval);
}
}, 500);
this.currentTab = 'editorial';
});
},
methods: {
highlightActiveTabContent(key) {
const contentTypes = this.annotationTabs.find((content) => content.key === key).type;
highlightActiveTabContent(contentTypes) {
this.annotations.forEach((annotation) => {
const id = this.stripAnnotationId(annotation.target.id);
const textElement = document.getElementById(id);
if (contentTypes.includes(annotation.body['x-content-type'])) {
textElement.classList.add('annotation');
textElement.classList.add('annotation-disabled');
} else {
textElement.classList.remove('annotation');
textElement.classList.add('annotation-disabled');
if (textElement !== null) {
if (contentTypes.includes(annotation.body['x-content-type'])) {
textElement.classList.add('annotation', 'annotation-disabled');
} else {
textElement.classList.remove('annotation');
textElement.classList.add('annotation-disabled');
}
}
});
},
activeTab(key) {
activeTab(key, types) {
this.currentTab = key;
this.selectedAll = false;
this.selectedNone = true;
this.highlightActiveTabContent(key);
this.highlightActiveTabContent(types);
},
createSVG(name) {
const [path, viewBox] = Icons[name].split('|');
......@@ -275,8 +289,8 @@ export default {
updateToggleState(annotation, text = 'toggle', list = 'toggle') {
const id = this.stripAnnotationId(annotation.target.id);
document.getElementById(id).classList.[text]('annotation-disabled');
document.getElementById(`list${id}`).classList.[list]('bg-grey-2');
document.getElementById(id).classList[text]('annotation-disabled');
document.getElementById(`list${id}`).classList[list]('bg-grey-2');
},
},
};
......@@ -314,15 +328,9 @@ export default {
</style>
<style lang="scss" scoped>
.q-item {
min-height: unset;
}
.q-item__section--avatar {
min-width: 24px;
}
.q-item__section--side {
padding-right: unset;
.item {
display: flex;
flex: 1;
flex-direction: column;
}
</style>
<template>
<q-list>
<q-list class="item-content">
<q-item
v-for="annotation in configuredAnnotations"
:id="'list' + annotation.strippedId"
......@@ -54,3 +54,24 @@ export default {
},
};
</script>
<style lang="scss" scoped>
.q-item__section--avatar {
min-width: 24px;
}
.q-item__section--side {
padding-right: unset;
}
.q-item {
min-height: unset;
}
.item-content {
height: 100vh;
overflow: auto;
padding: 8px;
padding-bottom: 72px; // fab icon size + one times the offset of q-page-sticky
}
</style>
<template>
<q-page-sticky
:offset="[18, 18]"
:offset="[16, 16]"
position="bottom-right"
>
<q-fab
......
......@@ -55,7 +55,11 @@
"icon": "fasHighlighter",
"label": "Motifs"
}
]
],
"tabs":{
"Editorial": ["Person", "Place", "Editorial Comment"],
"Motif": ["Motif"]
}
},
"colors": {
"primary": "",</