@@ -20,9 +20,17 @@
{{ item.newspaper.name }}
- {{ $d(item.date, 'long') }}
+ {{ $d(item.date, 'long') }}
– {{ pages }}
-
{{ $t(`buckets.accessRight.${item.accessRight}`) }}
+
+ {{ $t(`buckets.accessRight.${item.accessRight}`) }} — {{ $t('providedBy') }}
+
+
String(label));
+ this.labels = labels.map(label => String(label))
+ this.dataProvider = dataProvider
if (newspaper instanceof Newspaper) {
- this.newspaper = newspaper;
+ this.newspaper = newspaper
} else {
- this.newspaper = new Newspaper(newspaper);
+ this.newspaper = new Newspaper(newspaper)
}
- this.pages = pages.map((page) => {
+ this.pages = pages.map(page => {
if (page instanceof Page) {
- return page;
+ return page
}
- return new Page(page);
- });
+ return new Page(page)
+ })
- this.regions = regions.map((region) => {
+ this.regions = regions.map(region => {
if (region instanceof Region) {
- return region;
+ return region
}
- return new Region(region);
- });
+ return new Region(region)
+ })
- this.tags = tags.map((tag) => {
+ this.tags = tags.map(tag => {
if (tag instanceof Tag) {
- return tag;
+ return tag
}
- return new Tag(tag);
- });
+ return new Tag(tag)
+ })
- this.topics = topics.map((topic) => {
+ this.topics = topics.map(topic => {
if (topic instanceof ArticleTopic) {
- return topic;
+ return topic
}
- return new ArticleTopic(topic);
- });
+ return new ArticleTopic(topic)
+ })
- this.images = images;
+ this.images = images
}
}
diff --git a/src/services/index.js b/src/services/index.js
index f1eefbff3..1a15bb579 100644
--- a/src/services/index.js
+++ b/src/services/index.js
@@ -11,8 +11,11 @@ import NamesService from './names'
// e.g io api base is http://localhost
// and path is something like /path/to/socket.io defined in the backend
-const SocketBasePath =
- process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_MIDDLELAYER_API
+// const SocketBasePath =
+// process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_MIDDLELAYER_API
+const SocketBasePath = process.env.VUE_APP_USE_PROXY_MIDDLEWARE
+ ? ''
+ : process.env.VUE_APP_MIDDLELAYER_API
const socket = io(SocketBasePath, {
path: process.env.VUE_APP_MIDDLELAYER_API_SOCKET_PATH,
})
diff --git a/vue.config.js b/vue.config.js
index 652f3cc6f..6136614c4 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -2,7 +2,11 @@ const readFile = require('fs').readFileSync
const PackageJsonPath = `${__dirname}/package.json`
const SocketIoProxyPath = `^${process.env.VUE_APP_MIDDLELAYER_API_SOCKET_PATH}`
-const ApiIiifProxyPath = `^${process.env.VUE_APP_MIDDLELAYER_API_PATH}/proxy/`
+const ApiIiifProxyPath = [
+ '^',
+ String(process.env.VUE_APP_MIDDLELAYER_API_PATH).replace(/\/+$/, ''),
+ '/proxy/',
+].join('')
function getVersion() {
try {
@@ -24,6 +28,11 @@ process.env.VUE_APP_VERSION = getVersion()
console.log('[vue.config] SocketIoProxyPath', SocketIoProxyPath)
console.log('[vue.config] ApiIiifProxyPath', ApiIiifProxyPath)
+console.log('[vue.config] process.env.NODE_ENV', process.env.NODE_ENV)
+console.log(
+ '[vue.config] process.env.VUE_APP_USE_PROXY_MIDDLEWARE (check src/services/index.js)',
+ process.env.VUE_APP_USE_PROXY_MIDDLEWARE,
+)
console.log('[vue.config] process.env.VUE_APP_MIDDLELAYER_API', process.env.VUE_APP_MIDDLELAYER_API)
console.log(
'[vue.config] process.env.VUE_APP_MIDDLELAYER_API_SOCKET_PATH',
@@ -64,7 +73,6 @@ module.exports = {
},
devServer: {
public: 'http://localhost:8080',
-
proxy: {
[SocketIoProxyPath]: {
target: process.env.VUE_APP_MIDDLELAYER_API,