diff --git a/js/photos.js b/js/photos.js
index a86dc5de..6794e75f 100644
Binary files a/js/photos.js and b/js/photos.js differ
diff --git a/js/photos.js.map b/js/photos.js.map
index 1e39cb93..6259cef4 100644
Binary files a/js/photos.js.map and b/js/photos.js.map differ
diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php
index 5fd2ca0d..212bc564 100644
--- a/lib/Controller/PageController.php
+++ b/lib/Controller/PageController.php
@@ -73,6 +73,10 @@ class PageController extends Controller {
$this->initialStateService->provideInitialState($this->appName, 'mimes', Application::MIMES);
$this->initialStateService->provideInitialState($this->appName, 'maps', $this->config->getAppValue('maps', 'enabled', 'no') === 'yes');
+
+ // used by the sidebar to parse files requests
+ // TODO: move to a standalone dav fileinfo parser
+ Util::addScript('files', 'files/client');
Util::addScript($this->appName, 'photos');
Util::addStyle($this->appName, 'icons');
diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue
index f3fb3da7..85c8b004 100644
--- a/src/components/Navigation.vue
+++ b/src/components/Navigation.vue
@@ -32,6 +32,13 @@
{{ name }}
+
+
+ {{ t('photos', 'Share this folder') }}
+
+
@@ -56,6 +63,10 @@ export default {
type: String,
required: true,
},
+ showActions: {
+ type: Boolean,
+ default: false,
+ },
rootTitle: {
type: String,
default: t('photos', 'Photos'),
@@ -85,7 +96,7 @@ export default {
},
backToText() {
if (this.parentPath === '/') {
- return t('photos', 'Back to home')
+ return t('photos', 'Back to {folder}', { folder: this.rootTitle })
}
return t('photos', 'Back to {folder}', { folder: this.parentName })
},
@@ -123,6 +134,10 @@ export default {
folderUp() {
this.$router.push(this.to)
},
+ showSidebar() {
+ OCA.Files.Sidebar.open(this.filename)
+
+ },
},
}
@@ -140,6 +155,9 @@ export default {
&__title {
margin: 0;
}
+ &__share {
+ margin-left: 10px;
+ }
}
// generate variants based on grid sizes
diff --git a/src/main.js b/src/main.js
index 5e4a96d3..301632ed 100644
--- a/src/main.js
+++ b/src/main.js
@@ -46,6 +46,15 @@ sync(store, router)
Vue.prototype.t = translate
Vue.prototype.n = translatePlural
+// TODO: remove when we have a proper fileinfo standalone library
+window.addEventListener('DOMContentLoaded', () => {
+ // register unused client for the sidebar to have access to its parser methods
+ if (!window.OCA.Files) {
+ window.OCA.Files = {}
+ }
+ Object.assign(window.OCA.Files, { App: { fileList: { filesClient: OC.Files.getClient() } } }, window.OCA.Files)
+})
+
export default new Vue({
el: '#content',
// eslint-disable-next-line vue/match-component-file-name
diff --git a/src/mixins/FileFolder.scss b/src/mixins/FileFolder.scss
index 7dc06c06..dcac1981 100644
--- a/src/mixins/FileFolder.scss
+++ b/src/mixins/FileFolder.scss
@@ -26,6 +26,7 @@
display: flex;
align-items: center;
justify-content: center;
+ user-select: none;
.cover {
z-index: 2;
diff --git a/src/router/index.js b/src/router/index.js
index c6cc453c..1d3c20cd 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -57,6 +57,7 @@ export default new Router({
path: `/${route.params.path ? route.params.path : ''}`,
// if path is empty
isRoot: !route.params.path,
+ rootTitle: t('photos', 'Your albums'),
}),
},
{
@@ -68,6 +69,7 @@ export default new Router({
path: `/${route.params.path ? route.params.path : ''}`,
// if path is empty
isRoot: !route.params.path,
+ rootTitle: t('photos', 'Shared albums'),
showShared: true,
}),
},
@@ -87,6 +89,7 @@ export default new Router({
path: `${route.params.path ? route.params.path : ''}`,
// if path is empty
isRoot: !route.params.path,
+ rootTitle: t('photos', 'Tagged photos'),
}),
},
{
diff --git a/src/views/Albums.vue b/src/views/Albums.vue
index 54ff735c..fa5ad09f 100644
--- a/src/views/Albums.vue
+++ b/src/views/Albums.vue
@@ -34,7 +34,11 @@
-
+
+ :root-title="rootTitle" />