diff --git a/bundles/org.openhab.ui.basic/gulpfile.js b/bundles/org.openhab.ui.basic/gulpfile.js index 1667955636..58e75b430b 100644 --- a/bundles/org.openhab.ui.basic/gulpfile.js +++ b/bundles/org.openhab.ui.basic/gulpfile.js @@ -33,6 +33,11 @@ .pipe(gulp.dest("./src/main/resources/web")); }); + gulp.task("tile", function() { + return gulp.src("web-src/tile.png") + .pipe(gulp.dest("./src/main/resources/web")); + }); + gulp.task("eslint", function() { return gulp.src(sources.js) .pipe(eslint({ @@ -48,5 +53,5 @@ .pipe(gulp.dest("./src/main/resources/web")); }); - gulp.task("default", gulp.parallel("css", "copyFontLibs", gulp.series("eslint", "js"))); + gulp.task("default", gulp.parallel("css", "tile", "copyFontLibs", gulp.series("eslint", "js"))); })(); diff --git a/bundles/org.openhab.ui/web/src/res/img/basicui.png b/bundles/org.openhab.ui.basic/web-src/tile.png similarity index 100% rename from bundles/org.openhab.ui/web/src/res/img/basicui.png rename to bundles/org.openhab.ui.basic/web-src/tile.png diff --git a/bundles/org.openhab.ui.habpanel/web/app/services/icon.service.js b/bundles/org.openhab.ui.habpanel/web/app/services/icon.service.js index bf0b884c77..6294ac93ac 100755 --- a/bundles/org.openhab.ui.habpanel/web/app/services/icon.service.js +++ b/bundles/org.openhab.ui.habpanel/web/app/services/icon.service.js @@ -25,7 +25,7 @@ function getIconUrl(iconset, icon, state) { if (iconset === 'custom-icon') { - return '/icon/' + icon + '?format=svg' + ((state) ? '&state=' + state : ''); + return '../icon/' + icon + '?format=svg' + ((state) ? '&state=' + state : ''); } else if (iconset === 'custom-url') { return icon; } @@ -34,7 +34,7 @@ if (set.type === 'builtin') { return 'assets/icons/' + set.id + '/' + icon + '.svg'; } else { - return '/icon/' + icon + '?format=svg' + ((state) ? '&state=' + state : ''); + return '../icon/' + icon + '?format=svg' + ((state) ? '&state=' + state : ''); } } diff --git a/bundles/org.openhab.ui.habpanel/web/app/services/oh2storage.service.js b/bundles/org.openhab.ui.habpanel/web/app/services/oh2storage.service.js index a609692cbf..0ec1196620 100644 --- a/bundles/org.openhab.ui.habpanel/web/app/services/oh2storage.service.js +++ b/bundles/org.openhab.ui.habpanel/web/app/services/oh2storage.service.js @@ -31,7 +31,7 @@ $http({ method: 'GET', - url: '/rest/services/' + SERVICE_NAME + '/config', + url: '../rest/services/' + SERVICE_NAME + '/config', headers: headers }).then(function (resp) { console.log('openHAB 2 service configuration loaded'); @@ -77,7 +77,7 @@ OH3StorageService.getAccessToken().then(function (accessToken) { $http({ method: 'PUT', - url: '/rest/services/' + SERVICE_NAME + '/config', + url: '../rest/services/' + SERVICE_NAME + '/config', data: OH2ServiceConfiguration, headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + accessToken } }).then (function (resp) { diff --git a/bundles/org.openhab.ui.habpanel/web/app/services/oh3storage.service.js b/bundles/org.openhab.ui.habpanel/web/app/services/oh3storage.service.js index 26902a1272..d580837c78 100644 --- a/bundles/org.openhab.ui.habpanel/web/app/services/oh3storage.service.js +++ b/bundles/org.openhab.ui.habpanel/web/app/services/oh3storage.service.js @@ -26,7 +26,7 @@ } else { $http({ method: 'POST', - url: '/rest/auth/token', + url: '../rest/auth/token', data: 'grant_type=refresh_token&client_id=' + window.location.origin + '&redirect_uri=' + window.location.origin + '&refresh_token=' + refreshToken, headers: { 'Content-Type': 'application/x-www-form-urlencoded' } @@ -49,7 +49,7 @@ if (!refreshToken) { $rootScope.lockEditing = true; } - $http.get('/rest/ui/components/habpanel:panelconfig').then(function (data) { + $http.get('../rest/ui/components/habpanel:panelconfig').then(function (data) { console.log('Panel configurations loaded'); $rootScope.panelsRegistry = transformUIComponentsToPanelRegistry(data.data); deferred.resolve($rootScope.panelsRegistry); @@ -77,11 +77,11 @@ headers['Authorization'] = 'Bearer ' + accessToken } - $http.get('/rest/ui/components/habpanel:panelconfig/' + getCurrentPanelConfig()).then(function (data) { + $http.get('../rest/ui/components/habpanel:panelconfig/' + getCurrentPanelConfig()).then(function (data) { // update $http({ method: 'PUT', - url: '/rest/ui/components/habpanel:panelconfig/' + getCurrentPanelConfig(), + url: '../rest/ui/components/habpanel:panelconfig/' + getCurrentPanelConfig(), data: transformPanelConfigurationToUIComponent(getCurrentPanelConfig(), panelConfiguration), headers: headers }).then (function (resp) { @@ -95,7 +95,7 @@ // assume the error is 404? $http({ method: 'POST', - url: '/rest/ui/components/habpanel:panelconfig', + url: '../rest/ui/components/habpanel:panelconfig', data: transformPanelConfigurationToUIComponent(getCurrentPanelConfig(), panelConfiguration), headers: headers }).then (function (resp) { @@ -127,7 +127,7 @@ $http({ method: 'DELETE', - url: '/rest/ui/components/habpanel:panelconfig/' + id, + url: '../rest/ui/components/habpanel:panelconfig/' + id, headers: headers }).then (function (resp) { console.log('Panel configuration deleted'); diff --git a/bundles/org.openhab.ui.habpanel/web/app/services/openhab.service.js b/bundles/org.openhab.ui.habpanel/web/app/services/openhab.service.js index 56981fcc8d..9d98828c19 100755 --- a/bundles/org.openhab.ui.habpanel/web/app/services/openhab.service.js +++ b/bundles/org.openhab.ui.habpanel/web/app/services/openhab.service.js @@ -32,7 +32,7 @@ $timeout($rootScope.$emit('openhab-update')); } - $http.get('/rest/items') + $http.get('../rest/items') .then(function (data) { if (angular.isArray(data.data)) { console.log("Loaded " + data.data.length + " openHAB items"); @@ -71,7 +71,7 @@ function sendCmd(item, cmd) { $http({ method : 'POST', - url : '/rest/items/' + item, + url : '../rest/items/' + item, data : cmd, headers: { 'Content-Type': 'text/plain' } }).then(function (data) { @@ -92,7 +92,7 @@ if (locale) { deferred.resolve(locale); } else { - $http.get('/rest/') + $http.get('../rest/') .then(function (response) { if (!response.data.locale) { if (navigator && navigator.languages) { @@ -145,7 +145,7 @@ function sendVoice(text) { $http({ method : 'POST', - url : '/rest/voice/interpreters', + url : '../rest/voice/interpreters', data : text, headers: { 'Content-Type': 'text/plain' } }).then(function (data) { @@ -161,7 +161,7 @@ function registerEventSource() { if (typeof(EventSource) !== "undefined") { - var source = new EventSource('/rest/events?topics=openhab/items/*/statechanged,openhab/items/*/*/statechanged,openhab/webaudio/playurl'); + var source = new EventSource('../rest/events?topics=openhab/items/*/statechanged,openhab/items/*/*/statechanged,openhab/webaudio/playurl'); liveUpdatesEnabled = true; source.onmessage = function (event) { @@ -192,7 +192,7 @@ } } else { // fetch the new transformed state - $http.get('/rest/items/' + item.name).then(function (response) { + $http.get('../rest/items/' + item.name).then(function (response) { if (response.data && response.data.transformedState) { item.transformedState = response.data.transformedState; $rootScope.$emit('openhab-update', item); diff --git a/bundles/org.openhab.ui.habpanel/web/app/settings/settings.widgets.gallery.controller.js b/bundles/org.openhab.ui.habpanel/web/app/settings/settings.widgets.gallery.controller.js index a7e4533120..3d7d80c35c 100755 --- a/bundles/org.openhab.ui.habpanel/web/app/settings/settings.widgets.gallery.controller.js +++ b/bundles/org.openhab.ui.habpanel/web/app/settings/settings.widgets.gallery.controller.js @@ -20,7 +20,7 @@ vm.progressMax = 1; vm.progressCurrent = 1; - $http.get('/rest/habpanel/gallery/community/widgets') + $http.get('../rest/habpanel/gallery/community/widgets') .then(function (resp) { vm.busy = false; if (resp.data) { @@ -52,7 +52,7 @@ vm.progressMax = 1; vm.progressCurrent = 1; - $http.get('/rest/habpanel/gallery/community/widgets/' + id) + $http.get('../rest/habpanel/gallery/community/widgets/' + id) .then(function (resp) { vm.galleryItemDetails = resp.data; if (vm.galleryItemDetails.authorAvatarUrl) diff --git a/bundles/org.openhab.ui.habpanel/web/app/widgets/chart/chart.widget.js b/bundles/org.openhab.ui.habpanel/web/app/widgets/chart/chart.widget.js index 30e15d9cd5..78aa7d24f9 100755 --- a/bundles/org.openhab.ui.habpanel/web/app/widgets/chart/chart.widget.js +++ b/bundles/org.openhab.ui.habpanel/web/app/widgets/chart/chart.widget.js @@ -117,7 +117,7 @@ vm.rawdata = []; for (var i = 0; i < vm.widget.series.length; i++) { - vm.rawdata[i] = $http.get('/rest/persistence/items/' + vm.widget.series[i].item + "?starttime=" + startDate.toISOString() + (vm.widget.service ? '&serviceId=' + vm.widget.service : '')); + vm.rawdata[i] = $http.get('../rest/persistence/items/' + vm.widget.series[i].item + "?starttime=" + startDate.toISOString() + (vm.widget.service ? '&serviceId=' + vm.widget.service : '')); } $q.all(vm.rawdata).then(function (values) { diff --git a/bundles/org.openhab.ui.habpanel/web/app/widgets/timeline/timeline.widget.js b/bundles/org.openhab.ui.habpanel/web/app/widgets/timeline/timeline.widget.js index be5713be0a..a257bc834f 100755 --- a/bundles/org.openhab.ui.habpanel/web/app/widgets/timeline/timeline.widget.js +++ b/bundles/org.openhab.ui.habpanel/web/app/widgets/timeline/timeline.widget.js @@ -218,7 +218,7 @@ vm.rawdata = []; for (var i = 0; i < vm.widget.series.length; i++) { - vm.rawdata[i] = $http.get('/rest/persistence/items/' + vm.widget.series[i].item + "?boundary=true&starttime=" + startDate.toISOString() + (vm.widget.service ? '&serviceId=' + vm.widget.service : '')); + vm.rawdata[i] = $http.get('../rest/persistence/items/' + vm.widget.series[i].item + "?boundary=true&starttime=" + startDate.toISOString() + (vm.widget.service ? '&serviceId=' + vm.widget.service : '')); } diff --git a/bundles/org.openhab.ui/web/.eslintrc.js b/bundles/org.openhab.ui/web/.eslintrc.js index d8ee6f16e5..c8011e51d4 100644 --- a/bundles/org.openhab.ui/web/.eslintrc.js +++ b/bundles/org.openhab.ui/web/.eslintrc.js @@ -31,7 +31,8 @@ module.exports = { 'ga': true, // Google Analytics 'cordova': true, '__statics': true, - 'process': true + 'process': true, + 'baseUrl': true }, // add your custom rules here diff --git a/bundles/org.openhab.ui/web/build/webpack.config.js b/bundles/org.openhab.ui/web/build/webpack.config.js index f77dd59c91..d84f961cff 100644 --- a/bundles/org.openhab.ui/web/build/webpack.config.js +++ b/bundles/org.openhab.ui/web/build/webpack.config.js @@ -204,7 +204,7 @@ module.exports = { new HtmlWebpackPlugin({ filename: './index.html', template: './src/index.html', - inject: true, + inject: false, minify: env === 'production' ? { collapseWhitespace: true, removeComments: true, @@ -219,8 +219,8 @@ module.exports = { }), new CopyWebpackPlugin([ { - from: resolvePath('src/res'), - to: resolvePath(isCordova ? 'cordova/www/res' : 'www/res') + from: resolvePath('src/images'), + to: resolvePath(isCordova ? 'cordova/www/images' : 'www/images') }, { from: resolvePath('src/manifest.json'), diff --git a/bundles/org.openhab.ui/web/src/components/app.vue b/bundles/org.openhab.ui/web/src/components/app.vue index b107de8124..4bf08aa550 100644 --- a/bundles/org.openhab.ui/web/src/components/app.vue +++ b/bundles/org.openhab.ui/web/src/components/app.vue @@ -307,6 +307,7 @@ export default { iosSwipeBack: !this.$device.ios || this.$device.cordova, auroraSwipeBack: !this.$device.ios || this.$device.cordova, pushState: true, // !this.$device.cordova + pushStateRoot: baseUrl, pushStateSeparator: '' }, // Enable panel left visibility breakpoint @@ -510,7 +511,7 @@ export default { this.cleanSession().then(() => { this.loggedIn = false this.$f7.views.main.router.navigate('/', { animate: false, clearPreviousHistory: true }) - window.location = window.location.origin + window.location = window.location.origin + baseUrl + '/' if (this.$device.cordova) { this.loginScreenOpened = true } diff --git a/bundles/org.openhab.ui/web/src/components/auth-mixin.js b/bundles/org.openhab.ui/web/src/components/auth-mixin.js index 7d9c6920ea..95c1033805 100644 --- a/bundles/org.openhab.ui/web/src/components/auth-mixin.js +++ b/bundles/org.openhab.ui/web/src/components/auth-mixin.js @@ -31,8 +31,8 @@ export default { const payload = Utils.serializeObject({ 'grant_type': 'authorization_code', - 'client_id': window.location.origin, - 'redirect_uri': window.location.origin, + 'client_id': window.location.origin + baseUrl, + 'redirect_uri': window.location.origin + baseUrl + '/', 'code': queryParams.code, 'code_verifier': codeVerifier }) @@ -65,8 +65,8 @@ export default { const refreshToken = this.getRefreshToken() const payload = Utils.serializeObject({ 'grant_type': 'refresh_token', - 'client_id': window.location.origin, - 'redirect_uri': window.location.origin, + 'client_id': window.location.origin + baseUrl, + 'redirect_uri': window.location.origin + baseUrl + '/', 'refresh_token': refreshToken }) diff --git a/bundles/org.openhab.ui/web/src/components/widgets/system/oh-icon.vue b/bundles/org.openhab.ui/web/src/components/widgets/system/oh-icon.vue index df3857627e..c1ddbba5fd 100644 --- a/bundles/org.openhab.ui/web/src/components/widgets/system/oh-icon.vue +++ b/bundles/org.openhab.ui/web/src/components/widgets/system/oh-icon.vue @@ -89,8 +89,8 @@ export default { updateIcon () { if (!this.currentIcon) return this.$oh.media.getIcon(this.currentIcon, this.iconFormat, this.currentState).then((url) => { - if (url !== this.iconUrl) { - this.iconUrl = url + if (baseUrl + url !== this.iconUrl) { + this.iconUrl = baseUrl + url } }) } diff --git a/bundles/org.openhab.ui/web/src/css/icons.css b/bundles/org.openhab.ui/web/src/css/icons.css index f3c1e7645f..cad1ffa3b1 100644 --- a/bundles/org.openhab.ui/web/src/css/icons.css +++ b/bundles/org.openhab.ui/web/src/css/icons.css @@ -5,9 +5,9 @@ font-weight: 400; src: local('Material Icons'), local('MaterialIcons-Regular'), - url(../fonts/MaterialIcons-Regular.woff2) format('woff2'), - url(../fonts/MaterialIcons-Regular.woff) format('woff'), - url(../fonts/MaterialIcons-Regular.ttf) format('truetype'); + url("../fonts/MaterialIcons-Regular.woff2") format('woff2'), + url("../fonts/MaterialIcons-Regular.woff") format('woff'), + url("../fonts/MaterialIcons-Regular.ttf") format('truetype'); } .material-icons { font-family: 'Material Icons'; diff --git a/bundles/org.openhab.ui/web/src/res/icons/128x128.png b/bundles/org.openhab.ui/web/src/images/icons/128x128.png similarity index 100% rename from bundles/org.openhab.ui/web/src/res/icons/128x128.png rename to bundles/org.openhab.ui/web/src/images/icons/128x128.png diff --git a/bundles/org.openhab.ui/web/src/res/icons/144x144.png b/bundles/org.openhab.ui/web/src/images/icons/144x144.png similarity index 100% rename from bundles/org.openhab.ui/web/src/res/icons/144x144.png rename to bundles/org.openhab.ui/web/src/images/icons/144x144.png diff --git a/bundles/org.openhab.ui/web/src/res/icons/152x152.png b/bundles/org.openhab.ui/web/src/images/icons/152x152.png similarity index 100% rename from bundles/org.openhab.ui/web/src/res/icons/152x152.png rename to bundles/org.openhab.ui/web/src/images/icons/152x152.png diff --git a/bundles/org.openhab.ui/web/src/res/icons/192x192.png b/bundles/org.openhab.ui/web/src/images/icons/192x192.png similarity index 100% rename from bundles/org.openhab.ui/web/src/res/icons/192x192.png rename to bundles/org.openhab.ui/web/src/images/icons/192x192.png diff --git a/bundles/org.openhab.ui/web/src/res/icons/256x256.png b/bundles/org.openhab.ui/web/src/images/icons/256x256.png similarity index 100% rename from bundles/org.openhab.ui/web/src/res/icons/256x256.png rename to bundles/org.openhab.ui/web/src/images/icons/256x256.png diff --git a/bundles/org.openhab.ui/web/src/res/icons/512x512.png b/bundles/org.openhab.ui/web/src/images/icons/512x512.png similarity index 100% rename from bundles/org.openhab.ui/web/src/res/icons/512x512.png rename to bundles/org.openhab.ui/web/src/images/icons/512x512.png diff --git a/bundles/org.openhab.ui/web/src/res/icons/apple-touch-icon.png b/bundles/org.openhab.ui/web/src/images/icons/apple-touch-icon.png similarity index 100% rename from bundles/org.openhab.ui/web/src/res/icons/apple-touch-icon.png rename to bundles/org.openhab.ui/web/src/images/icons/apple-touch-icon.png diff --git a/bundles/org.openhab.ui/web/src/res/icons/favicon.svg b/bundles/org.openhab.ui/web/src/images/icons/favicon.svg similarity index 100% rename from bundles/org.openhab.ui/web/src/res/icons/favicon.svg rename to bundles/org.openhab.ui/web/src/images/icons/favicon.svg diff --git a/bundles/org.openhab.ui/web/src/index.html b/bundles/org.openhab.ui/web/src/index.html index 756e93531b..38d27a0de7 100644 --- a/bundles/org.openhab.ui/web/src/index.html +++ b/bundles/org.openhab.ui/web/src/index.html @@ -21,18 +21,29 @@ <% if (process.env.TARGET === 'web') { %> - - - - + + + + <% } %> +
<% if (process.env.TARGET === 'cordova') { %> <% } %> - + diff --git a/bundles/org.openhab.ui/web/src/js/app.js b/bundles/org.openhab.ui/web/src/js/app.js index 8d2306d17b..54da7c8a6a 100644 --- a/bundles/org.openhab.ui/web/src/js/app.js +++ b/bundles/org.openhab.ui/web/src/js/app.js @@ -1,3 +1,4 @@ +import './public-path.js' import './compatibility' // Import Vue diff --git a/bundles/org.openhab.ui/web/src/js/openhab/api.js b/bundles/org.openhab.ui/web/src/js/openhab/api.js index c7a803c240..7cfdb80f3b 100644 --- a/bundles/org.openhab.ui/web/src/js/openhab/api.js +++ b/bundles/org.openhab.ui/web/src/js/openhab/api.js @@ -28,24 +28,24 @@ Framework7.request.setup({ export default { get (uri, data) { - return wrapPromise(Framework7.request.promise.json(uri, data)) + return wrapPromise(Framework7.request.promise.json(baseUrl + uri, data)) }, getPlain (uri, data, contentType) { return wrapPromise(Framework7.request.promise({ method: 'GET', - url: uri, + url: baseUrl + uri, data, processData: false, contentType: contentType || 'text/plain' })) }, post (uri, data, dataType) { - return wrapPromise(Framework7.request.promise.postJSON(uri, data, dataType)) + return wrapPromise(Framework7.request.promise.postJSON(baseUrl + uri, data, dataType)) }, postPlain (uri, data, dataType, contentType) { return wrapPromise(Framework7.request.promise({ method: 'POST', - url: uri, + url: baseUrl + uri, data, processData: false, contentType: contentType || 'text/plain', @@ -55,7 +55,7 @@ export default { put (uri, data) { return wrapPromise(Framework7.request.promise({ method: 'PUT', - url: uri, + url: baseUrl + uri, data: JSON.stringify(data), processData: false, // dataType: 'json', @@ -65,7 +65,7 @@ export default { putPlain (uri, data, dataType, contentType) { return wrapPromise(Framework7.request.promise({ method: 'PUT', - url: uri, + url: baseUrl + uri, data, processData: false, // dataType: 'json', @@ -76,13 +76,13 @@ export default { head (uri) { return wrapPromise(Framework7.request.promise({ method: 'HEAD', - url: uri + url: baseUrl + uri })) }, delete (uri, data) { return wrapPromise(Framework7.request.promise({ method: 'DELETE', - url: uri, + url: baseUrl + uri, processData: false, // dataType: 'json', contentType: 'application/json' diff --git a/bundles/org.openhab.ui/web/src/js/openhab/auth.js b/bundles/org.openhab.ui/web/src/js/openhab/auth.js index c8f2461fad..1c0cc8ce6a 100644 --- a/bundles/org.openhab.ui/web/src/js/openhab/auth.js +++ b/bundles/org.openhab.ui/web/src/js/openhab/auth.js @@ -35,10 +35,10 @@ export function authorize (setup) { sessionStorage.setItem('openhab.ui:codeVerifier', pkceChallenge.code_verifier) sessionStorage.setItem('openhab.ui:authState', authState) - window.location = '/auth' + + window.location = baseUrl + '/auth' + '?response_type=code' + - '&client_id=' + encodeURIComponent(window.location.origin) + - '&redirect_uri=' + encodeURIComponent(window.location.origin) + + '&client_id=' + encodeURIComponent(window.location.origin + baseUrl) + + '&redirect_uri=' + encodeURIComponent(window.location.origin + baseUrl + '/') + '&scope=admin' + '&code_challenge_method=S256' + '&code_challenge=' + encodeURIComponent(pkceChallenge.code_challenge) + diff --git a/bundles/org.openhab.ui/web/src/js/openhab/sse.js b/bundles/org.openhab.ui/web/src/js/openhab/sse.js index 4444b7b24b..256a7e87a1 100644 --- a/bundles/org.openhab.ui/web/src/js/openhab/sse.js +++ b/bundles/org.openhab.ui/web/src/js/openhab/sse.js @@ -53,10 +53,10 @@ function newSSEConnection (path, readyCallback, messageCallback, errorCallback) export default { connect (path, topics, messageCallback, errorCallback) { - return newSSEConnection(path, null, messageCallback, errorCallback) + return newSSEConnection(baseUrl + path, null, messageCallback, errorCallback) }, connectStateTracker (path, readyCallback, updateCallback, errorCallback) { - return newSSEConnection(path, readyCallback, updateCallback, errorCallback) + return newSSEConnection(baseUrl + path, readyCallback, updateCallback, errorCallback) }, close (client, callback) { if (!client) return diff --git a/bundles/org.openhab.ui/web/src/js/public-path.js b/bundles/org.openhab.ui/web/src/js/public-path.js new file mode 100644 index 0000000000..40ddec01d7 --- /dev/null +++ b/bundles/org.openhab.ui/web/src/js/public-path.js @@ -0,0 +1,2 @@ +/* global __webpack_public_path__:writable */ +__webpack_public_path__ = baseUrl + '/' diff --git a/bundles/org.openhab.ui/web/src/js/routes.js b/bundles/org.openhab.ui/web/src/js/routes.js index 72409641fd..58d338c4cf 100644 --- a/bundles/org.openhab.ui/web/src/js/routes.js +++ b/bundles/org.openhab.ui/web/src/js/routes.js @@ -299,7 +299,7 @@ export default [ }, /* For Cordova */ { - path: '/res/(.*)', + path: '/images/(.*)', redirect: '/' }, { diff --git a/bundles/org.openhab.ui/web/src/manifest.json b/bundles/org.openhab.ui/web/src/manifest.json index b5104ecff0..00b5fd721e 100644 --- a/bundles/org.openhab.ui/web/src/manifest.json +++ b/bundles/org.openhab.ui/web/src/manifest.json @@ -9,32 +9,32 @@ "theme_color": "#e64a19", "icons": [ { - "src": "/res/icons/128x128.png", + "src": "images/icons/128x128.png", "sizes": "128x128", "type": "image/png" }, { - "src": "/res/icons/144x144.png", + "src": "images/icons/144x144.png", "sizes": "144x144", "type": "image/png" }, { - "src": "/res/icons/152x152.png", + "src": "images/icons/152x152.png", "sizes": "152x152", "type": "image/png" }, { - "src": "/res/icons/192x192.png", + "src": "images/icons/192x192.png", "sizes": "192x192", "type": "image/png" }, { - "src": "/res/icons/256x256.png", + "src": "images/icons/256x256.png", "sizes": "256x256", "type": "image/png" }, { - "src": "/res/icons/512x512.png", + "src": "images/icons/512x512.png", "sizes": "512x512", "type": "image/png" } diff --git a/bundles/org.openhab.ui/web/src/pages/about.vue b/bundles/org.openhab.ui/web/src/pages/about.vue index 9818f0007f..faa7db76bc 100644 --- a/bundles/org.openhab.ui/web/src/pages/about.vue +++ b/bundles/org.openhab.ui/web/src/pages/about.vue @@ -6,7 +6,7 @@ - +

openHAB {{ $store.state.runtimeInfo.version }}
{{ $store.state.runtimeInfo.buildString }}

diff --git a/bundles/org.openhab.ui/web/src/pages/panel-right.vue b/bundles/org.openhab.ui/web/src/pages/panel-right.vue index 1ea7f8d669..50faa0867c 100644 --- a/bundles/org.openhab.ui/web/src/pages/panel-right.vue +++ b/bundles/org.openhab.ui/web/src/pages/panel-right.vue @@ -24,7 +24,11 @@ export default { }, created () { this.$oh.api.get('/rest/ui/tiles').then((data) => { - this.apps = data + this.apps = data.map((tile) => { + tile.url = baseUrl + tile.url + tile.imageUrl = baseUrl + tile.imageUrl + return tile + }) }) } } diff --git a/bundles/org.openhab.ui/web/src/pages/profile.vue b/bundles/org.openhab.ui/web/src/pages/profile.vue index 492edd9bca..245173cfcf 100644 --- a/bundles/org.openhab.ui/web/src/pages/profile.vue +++ b/bundles/org.openhab.ui/web/src/pages/profile.vue @@ -20,7 +20,7 @@ - + {{ $t('profile.changePassword') }} @@ -77,7 +77,7 @@ - + {{ $t('profile.apiTokens.create') }} @@ -216,7 +216,7 @@ export default { this.cleanSession().then(() => { this.loggedIn = false this.$f7.views.main.router.navigate('/', { animate: false, clearPreviousHistory: true }) - window.location = window.location.origin + window.location = window.location.origin + baseUrl if (this.$device.cordova) { this.loginScreenOpened = true } @@ -224,6 +224,12 @@ export default { this.$f7.preloader.hide() this.$f7.dialog.alert(this.$t('profile.sessions.signOut.error') + err) }) + }, + changePasswordUrl () { + return baseUrl + '/changePassword' + }, + createApiTokenUrl () { + return baseUrl + '/createApiToken' } } } diff --git a/bundles/org.openhab.ui/web/src/res/img/cometvisu.png b/bundles/org.openhab.ui/web/src/res/img/cometvisu.png deleted file mode 100644 index 80247b42b0..0000000000 Binary files a/bundles/org.openhab.ui/web/src/res/img/cometvisu.png and /dev/null differ