Commit 5f82df7a authored by Anton's avatar Anton

Update from source-browser branch

# Conflicts:
#	package-lock.json
#	package.json
#	src/components/mosys-old/partials/CellEditor.vue
#	src/components/mosys-old/partials/GridDisplay.vue
#	src/components/mosys-old/partials/GridEditor.vue
#	src/components/mosys-old/partials/GridEditorDefaultSource.vue
#	src/components/mosys-old/partials/GridEditorMagicSource.vue
#	src/components/mosys-old/partials/GridEditorSourcePieceMaker.vue
#	src/components/mosys-old/partials/GridEditorSourceVimeo.vue
#	src/components/mosys-old/partials/GridEditorSourceYouTube.vue
#	src/components/mosys-old/partials/GridEditorSources.vue
#	src/components/mosys-old/partials/cells/Cell2DGrid.vue
#	src/components/mosys-old/partials/cells/CellAnnotationList.vue
#	src/components/mosys-old/partials/cells/CellHtml.vue
#	src/components/mosys-old/partials/cells/CellIFrame.vue
#	src/components/mosys-old/partials/cells/CellImage.vue
#	src/components/mosys-old/partials/cells/CellInternalLink.vue
#	src/components/mosys-old/partials/cells/CellRecording.vue
#	src/components/mosys-old/partials/cells/CellText.vue
#	src/components/mosys-old/partials/cells/CellTimeline.vue
#	src/components/mosys-old/partials/cells/CellTitle.vue
#	src/components/mosys-old/partials/cells/CellUIFeedback.vue
#	src/components/mosys-old/partials/cells/CellVideo.vue
#	src/components/mosys-old/partials/cells/CellVimeo.vue
#	src/components/mosys-old/partials/cells/CellVisualization.vue
#	src/components/mosys-old/partials/index.js
#	src/components/shared-old/forms/Calendar.vue
#	src/components/shared-old/forms/CalendarTimeMain.vue
#	src/components/shared-old/forms/CancelButton.vue
#	src/components/shared-old/forms/FormAdd.vue
#	src/components/shared-old/forms/FormMain.vue
#	src/components/shared-old/forms/FormRow.vue
#	src/components/shared-old/forms/FormRowCheckbox.vue
#	src/components/shared-old/forms/SliderTime.vue
#	src/components/shared-old/forms/SliderTimeRow.vue
#	src/components/shared-old/forms/SubmitButton.vue
#	src/components/shared-old/forms/Tagging.vue
#	src/components/shared-old/forms/autocomplete.json
#	src/components/shared-old/forms/index.js
#	src/components/shared-old/partials/AccessControl.vue
#	src/components/shared-old/partials/Annotation.vue
#	src/components/shared-old/partials/Avatar.vue
#	src/components/shared-old/partials/BrowserWarning.vue
#	src/components/shared-old/partials/ContentBar.vue
#	src/components/shared-old/partials/CurrentUser.vue
#	src/components/shared-old/partials/Modal.vue
#	src/components/shared-old/partials/ModalConfirm.vue
#	src/components/shared-old/partials/Tags.vue
#	src/components/shared-old/partials/UserNav.vue
#	src/components/shared-old/partials/UserRights.vue
#	src/components/shared-old/partials/UsersTable.vue
#	src/components/shared-old/partials/VideoPlayerNew.vue
#	src/components/shared-old/partials/index.js
#	src/pages/piecemaker/timelines/swimlanes.vue
#	src/store/index.js
parents 036f21d6 d40f921d
Pipeline #8660 passed with stage
in 10 minutes and 56 seconds
Subproject commit 7ce80d811314d22996bc6f3e70c03e439c31bbef
code_quality:
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts:
reports:
codequality: gl-code-quality-report.json
[submodule "src/components/shared"]
path = src/components/shared
url = git@gitlab.rlp.net:motionbank/mbjs/quasar-components-shared.git
[submodule "src/components/mosys"]
path = src/components/mosys
url = git@gitlab.rlp.net:motionbank/mbjs/quasar-components-mosys.git
[submodule ".docker-lib"]
path = .docker-lib
url = git@gitlab.rlp.net:motionbank/tools/docker-lib.git
......@@ -2,5 +2,8 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/.docker-lib" vcs="Git" />
<mapping directory="$PROJECT_DIR$/src/components/mosys" vcs="Git" />
<mapping directory="$PROJECT_DIR$/src/components/shared" vcs="Git" />
</component>
</project>
\ No newline at end of file
## Setup
Clone repo, then run:
```shell
git submodule init
git submodule update
npm install
```
......@@ -8,11 +12,16 @@ npm install
### Third-party webserver (recommended)
Point your webserver config to the ``dist/spa-mat`` directory. Configure your webserver to serve ``index.html`` with a 200 status code instead of a 404 error page.
Point your webserver config to the ``dist/spa-mat``
directory. Configure your webserver to serve
``index.html`` with a 200 status code instead of a
404 error page.
### Standalone server
Execute ``npm start`` to start the built-in webserver. Control server address through ``HOST`` and ``PORT`` env variables.
Execute ``npm start`` to start the built-in webserver.
Control server address through ``HOST`` and ``PORT``
env variables.
## Build
......@@ -34,7 +43,8 @@ For the available variables see `quasar.conf.js`.
## Development
Start a development server with automatic reload on localhost at port 8080.
Start a development server with automatic reload on
localhost at port 8080.
```shell
npm run dev
......@@ -42,10 +52,24 @@ npm run dev
### Changelog
Development is tracked in [CHANGELOG.md](https://gitlab.rlp.net/motionbank/systems-frontend/blob/master/CHANGELOG.md).
Development is tracked in
[CHANGELOG.md](https://gitlab.rlp.net/motionbank/systems-frontend/blob/master/CHANGELOG.md).
## Docker
[![](https://images.microbadger.com/badges/image/motionbank/systems-frontend.svg)](https://microbadger.com/images/motionbank/systems-frontend "Get your own image badge on microbadger.com")
The recommended way of deployment are our prebuilt
docker images.
[![](https://images.microbadger.com/badges/image/motionbank/systems-frontend.svg)](https://microbadger.com/images/motionbank/systems-frontend
"Get your own image badge on microbadger.com")
### Versions
* Stable: `motionbank/systems-frontend:release_1_2`
* Staging (beta): `motionbank/systems-frontend:staging`
* Experimental: `motionbank/systems-frontend:experimental`
### Configuration
The docker image can be pulled from `motionbank/systems-frontend:latest`
The image is not configurable.
The application listens on port `3030`.
# Changelog
This document tracks all important changes to the Motion Bank Systems Frontend.
This document tracks all important changes to the Motion
Bank Systems Frontend.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- Videos can now be tagged
- SwimLane component in post-annotator and on standalone page
## [1.3.1] - 2019-04-06
### Changed
- MoSys VideoCells only load content when visible
### Fixed
- Resource cache uses the right env variable
## [1.3.0] - 2019-03-26
### Added
#### MoSys
- AnnotationList and Video cells deactivate off visible area
- AnnotationList has an additional tab layout
- AnnotationList shows formatted Markdown
- Exported Grid packages contain all linked grids as well
- Grid URLs accept the query parameter `datetime` specifying an
ISO datetime string (urlencoded) to set the time for video
player cells
- Grid URLs accept the query parameter `x` specifying an initial
horizontal cell index
- Image and Title cells can have links
- AnnotationList cell allows filtering annotations by simple
string or [Regular Expression](https://www.regular-expressions.info/quickstart.html)
- CellEditor adds start and duration filters for AnnotationList
and Video cells
- Cells display additional info in editor (class name, author name)
- CellText uses [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)
to format text content
- Grids can have external and embedded stylesheets
defined on their 'edit' page (requires 'cssediting' feature)
- Cells additionally use their annotation target's
`styleClass` property (can be set in cell context menu,
requires 'cssediting' feature)
- Grids can be exported and imported like timelines
- Access control menu available for MoSys grids
- 'Documents' source tab (so far only shows images)
#### General
- Import timeline/grid now allows overriding author for all items
- Docker image already builds with the nginx SPA config
- The generic Vuex modules can use optional caching in memory
(activate with USE_RESOURCE_CACHE env variable)
- Generic vuex resources allow selection of returned
properties through array of strings
- Metadata store module caches responses from the
transcoder service until app reload
- UI version in site footer links to changelog
### Changed
- VideoCell hides volume control
- Text size in grids is relative to window height
- MoSys cell styling
- VideoPlayer styling
- Updated [mbjs-data-models](https://gitlab.rlp.net/motionbank/mbjs/data-models)
to 0.1.3 ([release_0_1](https://gitlab.rlp.net/motionbank/mbjs/data-models/commits/release_0_1)
branch)
- Video and AnnotationList cells now use [luxon](https://moment.github.io/luxon/)
DateTime and Interval objects
- AnnotationList cell's input field is now optional, defaults to off
- Layout for MoSys Cells: AnnotationList, Title, Video and InternalLink
- Renamed 'mosysGridEditorStore' vuex module to 'mosys'
- Updated
[mbjs-api-client](https://gitlab.rlp.net/motionbank/mbjs/api-client)
to version 2.0.0
- Renamed 'Assets' to 'Documents' in screens and
navigation, Auth0 feature now also needs to be 'documents'
- Updated
[mbjs-quasar](https://gitlab.rlp.net/motionbank/mbjs/quasar)
to version 1.4.3
- Moved ACL functionality to
[mbjs-quasar](https://gitlab.rlp.net/motionbank/mbjs/quasar)
module
### Fixed
- Time and date selection was broken in last release
- Active annotation highlighting in MoSys AnnotationList
- Deep links into post-annotator no longer fail when
lots of annotations need to be loaded
- Delete map no longer fails when encountering access
denied errors (still suffers from
[#119](https://gitlab.rlp.net/motionbank/systems-frontend/issues/119))
### Removed
- Obsolete `MessengerComponent` as component events travel
via `this.$root`
## [1.2.1] - 2019-02-15
### Fixed
- Post-annotator timestamps display correct values,
independent of timezone or DST
- currentIndex property no longer throws when attempting
to scroll to invalid annotation index
- Timestamps in post-annotator are no longer being cut
off, display hours as well
## [1.2.0] - 2019-02-14
### Added
- Post annotator accepts annotation UUIDs as a hash
value and automatically jumps there on load
- Property 'originalTitle' (if title is overridden)
added to result in metadata store
- Very basic search page for timelines added,
accessible only with 'search' feature permission
- API client (and its associated resources' "find"
actions) now accept regular expressions
- Resource 'documents' available in the store
- 'Assets' feature allows uploading of files to
personal S3 compatible bucket
- 'Packager' feature allows export of MoSys grids
as static packages to be hosted in any webspace,
without the need of Motion Bank APIs
### Fixed
- Automatic scrolling to annotations when video
player plays in post annotator
- Video titles are no longer removed when saving
video with same title as before
- Parameter 'feature' can be added to route metadata
to allow access control through Auth0 app metadata
- Exception when passing an id (URI) to ACL store
instead of a UUID
- Incompatibilities in MoSys cells (Video,
AnnotationList)
- App startup no longer breaks on Microsoft Edge
(works from version 15+)
- Perform date related queries to MongoDB with
properly formatted timezones (see:
[#106](https://gitlab.rlp.net/motionbank/systems-frontend/issues/106))
### Changed
- userHasFeature moved to
[mbjs-quasar](https://gitlab.rlp.net/motionbank/mbjs/quasar)
- "More Info" button on welcome page now links to
medium article
- MoSys components included through git submodule from
[quasar-components-mosys](https://gitlab.rlp.net/motionbank/mbjs/quasar-components-mosys)
- Shared components included through git submodule from
[quasar-components-shared](https://gitlab.rlp.net/motionbank/mbjs/quasar-components-shared)
### Updated
- [mbjs-api-client](https://gitlab.rlp.net/motionbank/mbjs/api-client)
now at version 1.1.0
## [1.1.1] - 2019-01-28
### Fixed
- Recursive setting of ACL for a timeline's associated
annotations now traverses the full relational depth.
## [1.1.0] - 2018-12-11
### Added
- Edit video screen allows moving video to another timeline
- Video list shows timeline title
- Data tables use an optional requestTransform function
to process rows on each data update
- Info button in the post-annotator shows video metadata
(so far only title)
- Hyperlinks in annotations are clickable in the
post-annotator
- Limited markdown support for annotations
(allowed tags: 'b', 'i', 'em', 'strong', 'a', 'br', 'p')
- Videos can be tagged
- Vuex module 'tags' - stores and retrieves tags as
annotations
### Changed
- Video list is sorted descending on reference
date by default
- Look of top right buttons in post-annotator
- Users need to explicitly click 'edit' to change
an annotation in the post-annotator
- External titles stored as annotations are retrieved
within the metadata store module
- BrowserWarning and MarkdownDisplay components moved to
[mbjs-quasar](https://gitlab.rlp.net/motionbank/mbjs/quasar)
- Readme info
- Pinned and updated runtime dependencies
### Fixed
- Timeline list now updates after deleting an item
- Post-annotation no longer fails when the duration
of a video cannot be retrieved
- Editing external title annotations
- Tables are properly searchable
- Timeline list updates after deleting an item
### Removed
......@@ -35,5 +242,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Start proper versioning at 1.0.0
[Unreleased]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.0.0...master
[Unreleased]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.1...master
[1.3.1]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.0...v1.3.1
[1.3.0]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.2.1...v1.3.0
[1.2.1]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.2.0...v1.2.1
[1.2.0]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.1.1...v1.2.0
[1.1.1]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.1.0...v1.1.1
[1.1.0]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.0.0...v1.1.0
[1.0.0]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/initial...v1.0.0
......@@ -4,4 +4,5 @@ MAINTAINER Motion Bank
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log
ADD ./.docker-lib/configs/nginx/quasar-spa.conf /etc/nginx/conf.d/default.conf
ADD ./dist/spa-mat /usr/html/
......@@ -9,7 +9,11 @@
## Setup
Clone repo, then run:
```shell
git submodule init
git submodule update
npm install
```
......@@ -17,11 +21,16 @@ npm install
### Third-party webserver (recommended)
Point your webserver config to the ``dist/spa-mat`` directory. Configure your webserver to serve ``index.html`` with a 200 status code instead of a 404 error page.
Point your webserver config to the ``dist/spa-mat``
directory. Configure your webserver to serve
``index.html`` with a 200 status code instead of a
404 error page.
### Standalone server
Execute ``npm start`` to start the built-in webserver. Control server address through ``HOST`` and ``PORT`` env variables.
Execute ``npm start`` to start the built-in webserver.
Control server address through ``HOST`` and ``PORT``
env variables.
## Build
......@@ -43,7 +52,8 @@ For the available variables see `quasar.conf.js`.
## Development
Start a development server with automatic reload on localhost at port 8080.
Start a development server with automatic reload on
localhost at port 8080.
```shell
npm run dev
......@@ -51,17 +61,31 @@ npm run dev
### Changelog
Development is tracked in [CHANGELOG.md](https://gitlab.rlp.net/motionbank/systems-frontend/blob/master/CHANGELOG.md).
Development is tracked in
[CHANGELOG.md](https://gitlab.rlp.net/motionbank/systems-frontend/blob/master/CHANGELOG.md).
## Docker
[![](https://images.microbadger.com/badges/image/motionbank/systems-frontend.svg)](https://microbadger.com/images/motionbank/systems-frontend "Get your own image badge on microbadger.com")
The recommended way of deployment are our prebuilt
docker images.
[![](https://images.microbadger.com/badges/image/motionbank/systems-frontend.svg)](https://microbadger.com/images/motionbank/systems-frontend
"Get your own image badge on microbadger.com")
### Versions
* Stable: `motionbank/systems-frontend:release_1_2`
* Staging (beta): `motionbank/systems-frontend:staging`
* Experimental: `motionbank/systems-frontend:experimental`
### Configuration
The docker image can be pulled from `motionbank/systems-frontend:latest`
The image is not configurable.
The application listens on port `3030`.
## License
:copyright: 2018 Mainz University of Applied Sciences (Motion Bank Project) –
:copyright: 2019 Mainz University of Applied Sciences (Motion Bank Project) –
Released under the [MIT](https://github.com/motionbank-js/motionbank-systems-frontend/blob/master/LICENSE) license
This diff is collapsed.
{
"name": "motionbank-systems-frontend",
"version": "1.1.0",
"version": "1.4.0",
"description": "Combined frontend project for Motion Bank web services",
"productName": "Motion Bank Systems Frontend",
"cordovaId": "org.motionbank.frontend",
......@@ -14,10 +14,10 @@
},
"homepage": "https://gitlab.rlp.net/motionbank/systems-frontend#readme",
"scripts": {
"build": "cross-env NODE_ENV=production quasar build",
"build-staging": "cross-env NODE_ENV=production IS_STAGING=true quasar build",
"build": "cross-env NODE_ENV=production node $NODE_DEBUG_OPTION ./node_modules/.bin/quasar build",
"build-staging": "cross-env NODE_ENV=production IS_STAGING=true node $NODE_DEBUG_OPTION ./node_modules/.bin/quasar build",
"clean": "quasar clean",
"dev": "cross-env NODE_ENV=production quasar dev",
"dev": "cross-env NODE_ENV=production node $NODE_DEBUG_OPTION ./node_modules/.bin/quasar dev",
"docker-build": "docker build -t motionbank/systems-frontend:latest .",
"docker-build-staging": "docker build -t motionbank/systems-frontend:staging .",
"docker-release": "npm run docker-build && docker push motionbank/systems-frontend:latest",
......@@ -33,31 +33,34 @@
]
},
"dependencies": {
"auth0-js": "^9.7.3",
"axios": "^0.18.0",
"bluebird": "^3.5.1",
"he": "^1.1.1",
"luxon": "^1.3.3",
"mbjs-api-client": "^1.0.5",
"mbjs-data-models": "0.0.12",
"auth0-js": "9.8.2",
"axios": "0.18.0",
"bluebird": "3.5.3",
"he": "1.2.0",
"luxon": "1.8.2",
"marked": "0.5.2",
"mbjs-api-client": "2.0.0",
"mbjs-data-models": "0.1.3",
"mbjs-media": "0.0.19",
"mbjs-quasar": "0.0.44",
"mbjs-utils": "^0.0.6",
"pug": "^2.0.3",
"raven-js": "^3.26.4",
"sift": "^5.1.0",
"tiny-emitter": "^2.0.2",
"mbjs-quasar": "1.5.1",
"mbjs-utils": "0.0.6",
"qs": "^6.6.0",
"raven-js": "3.27.0",
"sanitize-html": "1.19.2",
"sift": "^7.0.1",
"tiny-emitter": "2.0.2",
"uuid-validate": "0.0.2",
"videojs-framebyframe": "git+https://github.com/fjenett/videojs-framebyframe.git",
"videojs-record": "^2.4.1",
"videojs-vimeo": "git+https://github.com/PieceMeta/videojs-vimeo.git",
"videojs-youtube": "^2.4.1",
"vue-i18n": "^7.7.0",
"vue-shortkey": "^3.1.6",
"vue-video-player": "^5.0.2",
"vuelidate": "^0.7.2"
"videojs-framebyframe": "git+https://github.com/fjenett/videojs-framebyframe.git#fa81d657c50067bb5af07c9cf5e42924b353a70e",
"videojs-record": "2.4.1",
"videojs-vimeo": "git+https://github.com/PieceMeta/videojs-vimeo.git#72237a6cb98a62ef64c39054e2ce26d9020e4d2b",
"videojs-youtube": "2.6.0",
"vue-i18n": "7.8.1",
"vue-shortkey": "3.1.6",
"vue-video-player": "5.0.2",
"vuelidate": "0.7.4"
},
"devDependencies": {
"@babel/runtime": "^7.0.0-beta.54",
"babel-eslint": "^8.2.6",
"babel-plugin-dynamic-import-node": "^2.2.0",
"babel-plugin-syntax-flow": "^6.18.0",
......@@ -68,10 +71,10 @@
"eslint-config-standard": "^11.0.0",
"eslint-config-vue": "^2.0.2",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^2.1.0",
"eslint-loader": "^2.1.1",
"eslint-plugin-flowtype-errors": "^3.6.0",
"eslint-plugin-html": "^4.0.5",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-html": "^4.0.6",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.7.0",
"eslint-plugin-standard": "^3.0.1",
......@@ -79,6 +82,7 @@
"flow-bin": "^0.79.1",
"metapak": "^1.0.3",
"metapak-motionbank": "^1.11.8",
"pug": "^2.0.3",
"pug-plain-loader": "^1.0.0",
"quasar-cli": "0.17.20",
"static-server": "^2.2.1",
......
......@@ -52,6 +52,8 @@ module.exports = function (ctx) {
// Hosts
//
API_HOST: JSON.stringify(process.env.API_HOST || 'https://api.motionbank.org'),
STORAGE_HOST: JSON.stringify(process.env.STORAGE_HOST || 'https://storage.motionbank.org'),
PACKAGER_HOST: JSON.stringify(process.env.PACKAGER_HOST || 'https://packager.motionbank.org'),
TRANSCODER_HOST: JSON.stringify(process.env.TRANSCODER_HOST || 'https://transcoder.motionbank.org'),
PBA_HOST: JSON.stringify(process.env.PBA_HOST || 'https://pba-api.motionbank.org'),
UI_HOST: JSON.stringify(process.env.UI_HOST || 'https://app.motionbank.org'),
......@@ -76,6 +78,7 @@ module.exports = function (ctx) {
// App config
//
IS_STAGING: JSON.stringify(process.env.IS_STAGING || false),
USE_RESOURCE_CACHE: JSON.stringify(process.env.USE_RESOURCE_CACHE || false),
UI_VERSION: JSON.stringify(process.env.UI_VERSION || require('./package.json').version)
}
},
......@@ -178,6 +181,7 @@ module.exports = function (ctx) {
'Ripple',
'Scroll',
'TouchHold',
'TouchPan',
'CloseOverlay'
],
// Quasar plugins
......
import * as forms from './shared/forms'
import partials from './shared/partials'
import * as partials from './shared/partials'
export default {
forms,
......
<template lang="pug">
q-list
q-list-header
q-item
small Cell Content Editor
q-item-separator
template(v-for="(cell, index) in cells")
template(v-if="index > 0")
q-item-separator
q-item
q-field(
v-if="cell.type in itemSpecs",
:icon="typeToIconName[cell.type]",
:helper="itemSpecs[cell.type].help",
:error="itemSpecs[cell.type].error",
:error-label="itemSpecs[cell.type].errorMessage",
style="width: 100%")
q-input(
:float-label="itemSpecs[cell.type].label",
:type="itemSpecs[cell.type].inputType",
:min-rows="1",
:max-height="500",
:value="cell.content",
@change="value => {handleItemChanged(value, cell)}")
q-field(v-else) This cell type is not supported yet: {{ cell.type }}
</template>
<script>
export default {
props: ['cells'],
data () {
return {
typeToIconName: {
'Image': 'photo',
'IFrame': 'picture in picture',
'Internal-Link': 'link',
'Video': 'local movies',
'Text': 'subject',
'Title': 'title'
},
itemSpecs: {
'Title': {
inputType: 'text',
type: 'Title',
label: 'Title Cell',
help: '',
error: false,
errorMessage: '',
value: ''
},
'Text': {
inputType: 'textarea',
type: 'Text',
label: 'Text Cell',
help: '',
error: false,
errorMessage: '',
value: ''
},
'Video': {
inputType: 'url',
type: 'Video',
label: 'Video Cell',
help: 'Insert a URL to: a video file or a Vimeo / YouTube video page',
error: false,
errorMessage: 'Needs to be a valid URL',
value: ''
},
'Image': {
inputType: 'url',
type: 'Image',
label: 'Image Cell',
help: 'Insert a URL to an image file',
error: false,
errorMessage: 'Needs to be a valid URL',
value: ''
},
'Internal-Link': {
inputType: 'url',
type: 'Internal-Link',
label: 'Link Cell',
help: 'Insert a URL to a page in this system',
error: false,
errorMessage: 'Needs to be a valid URL',
value: ''
},
'IFrame': {
inputType: 'url',
type: 'IFrame',
label: 'IFrame Cell',
help: 'Insert some URL',
error: false,
errorMessage: 'Needs to be a valid URL',
value: ''
},
'Annotation-List': {
inputType: 'text',
type: 'Annotation-List',
label: 'Annotation List Cell',
help: 'Insert a Video UUID',
error: false,
errorMessage: '',
value: ''
}
}
}