diff --git a/package-lock.json b/package-lock.json index a22b9d68..fef7fe84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "agpl", "dependencies": { "@nextcloud/l10n": "^1.6.0", + "@nextcloud/paths": "^2.1.0", "@nextcloud/vue": "^6.0.0-beta.6", "path-posix": "^1.0.0", "reflect-metadata": "^0.1.13", @@ -2217,6 +2218,14 @@ "core-js": "^3.6.4" } }, + "node_modules/@nextcloud/paths": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nextcloud/paths/-/paths-2.1.0.tgz", + "integrity": "sha512-8wX0gqwez0bTuAS8A0OEiqbbp0ZsqLr07zSErmS6OYhh9KZcSt/kO6lQV5tnrFqIqJVsxwz4kHUjtZXh6DSf9Q==", + "dependencies": { + "core-js": "^3.6.4" + } + }, "node_modules/@nextcloud/router": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@nextcloud/router/-/router-2.0.0.tgz", @@ -13596,6 +13605,14 @@ "core-js": "^3.6.4" } }, + "@nextcloud/paths": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nextcloud/paths/-/paths-2.1.0.tgz", + "integrity": "sha512-8wX0gqwez0bTuAS8A0OEiqbbp0ZsqLr07zSErmS6OYhh9KZcSt/kO6lQV5tnrFqIqJVsxwz4kHUjtZXh6DSf9Q==", + "requires": { + "core-js": "^3.6.4" + } + }, "@nextcloud/router": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@nextcloud/router/-/router-2.0.0.tgz", diff --git a/package.json b/package.json index 258f7748..def17bcf 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ }, "dependencies": { "@nextcloud/l10n": "^1.6.0", + "@nextcloud/paths": "^2.1.0", "@nextcloud/vue": "^6.0.0-beta.6", "path-posix": "^1.0.0", "reflect-metadata": "^0.1.13", diff --git a/src/components/Photo.vue b/src/components/Photo.vue index 15153273..c6012506 100644 --- a/src/components/Photo.vue +++ b/src/components/Photo.vue @@ -39,9 +39,10 @@ import { Component, Prop, Emit, Mixins } from 'vue-property-decorator'; import { IDay, IPhoto } from "../types"; +import { showError } from '@nextcloud/dialogs' +import { getPreviewUrl } from "../services/FileUtils"; import * as dav from "../services/DavRequests"; import errorsvg from "../assets/error.svg"; -import { getPreviewUrl } from "../services/FileUtils"; import GlobalMixin from '../mixins/GlobalMixin'; @Component({}) @@ -132,7 +133,7 @@ export default class Photo extends Mixins(GlobalMixin) { // Get this photo in the fileInfos const photo = fileInfos.find(d => Number(d.fileid) === Number(this.data.fileid)); if (!photo) { - alert('Cannot find this photo anymore!'); + showError('Cannot find this photo anymore!'); return; } diff --git a/src/components/Settings.vue b/src/components/Settings.vue index 5ad5affa..73ce747c 100644 --- a/src/components/Settings.vue +++ b/src/components/Settings.vue @@ -42,6 +42,8 @@ input[type=text] {