Merge remote-tracking branch 'origin/master' into oasis

# Conflicts:
#	.php_cs.cache
#	public/mix-manifest.json
#	resources/js/components/FilesView/FilePreviewMedia.vue
#	resources/js/components/Sidebar/SidebarNavigation.vue
#	resources/js/helpers.js
This commit is contained in:
Peter Papp
2021-05-06 16:06:17 +02:00
17 changed files with 482 additions and 240 deletions
@@ -176,8 +176,10 @@ export default {
if (!this.$isMobile()) {
// After click deselect new folder rename input
document.getSelection().removeAllRanges();
// After click deselect new folder rename input
if (document.getSelection().toString().length) {
document.getSelection().removeAllRanges();
}
if (e.ctrlKey || e.metaKey && !e.shiftKey) {
// Click + Ctrl
@@ -176,7 +176,9 @@ export default {
if (!this.$isMobile()) {
// After click deselect new folder rename input
document.getSelection().removeAllRanges();
if (document.getSelection().toString().length) {
document.getSelection().removeAllRanges();
}
if ((e.ctrlKey || e.metaKey) && !e.shiftKey) {
@@ -69,7 +69,7 @@ import {events} from '@/bus'
import pdf from 'pdfvuer'
export default {
name: 'MediaFullPreview',
name: 'FilePreviewMedia',
components: {
ChevronRightIcon,
ChevronLeftIcon,
@@ -194,27 +194,40 @@ export default {
}
})
},
getDocumentSize() {
if (window.innerWidth < 960) {
this.documentSize = 100
}
if (window.innerWidth > 960){
this.documentSize = localStorage.getItem('documentSize')
? parseInt(localStorage.getItem('documentSize'))
: 50;
}
}
},
created() {
// Set zoom size
this.documentSize = window.innerWidth < 960 ? 100 : 70
events.$on('file-preview:next', () => this.next())
events.$on('file-preview:next', () => this.next())
events.$on('file-preview:prev', () => this.prev())
events.$on('document-zoom:in', () => {
if (this.documentSize < 100)
this.documentSize += 10
if (this.documentSize < 100) {
this.documentSize += 10
localStorage.setItem('documentSize', this.documentSize)
}
})
events.$on('document-zoom:out', () => {
if (this.documentSize > 40)
this.documentSize -= 10
if (this.documentSize > 40) {
this.documentSize -= 10
localStorage.setItem('documentSize', this.documentSize)
}
})
this.getDocumentSize()
this.getFilesForView()
}
}
</script>
@@ -253,13 +266,13 @@ export default {
#pdf-wrapper {
border-radius: 8px;
overflow-y: scroll;
margin: 0 auto;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
margin: 0 auto;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
padding: 40px;
.pdf-file {
@@ -17,8 +17,8 @@
<div class="navigation-icons">
<div v-if="isPdf" class="navigation-tool-wrapper">
<ToolbarButton @click.native="increaseSizeOfPDF" source="zoom-in" :action="$t('pdf_zoom_in')" />
<ToolbarButton @click.native="decreaseSizeOfPDF" source="zoom-out" :action="$t('pdf_zoom_out')" />
<ToolbarButton @click.native="increaseSizeOfPDF" source="zoom-in" :action="$t('pdf_zoom_in')" />
</div>
<div class="navigation-tool-wrapper">
<ToolbarButton @click.native="downloadItem" class="mobile-hide" source="download" :action="$t('actions.download')" />
@@ -1,5 +1,5 @@
<template>
<svg class="preview-list-icon" fill="none" stroke="currentColor" stroke-width="1.5" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" width="20px" height="20px" viewBox="0 0 20 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg class="preview-list-icon" fill="none" stroke="currentColor" stroke-width="1.5" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" width="15px" height="15px" viewBox="0 0 20 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect x="9.77777778" y="0" width="6.22222222" height="6.22222222"></rect>
<rect x="9.77777778" y="9.77777778" width="6.22222222" height="6.22222222"></rect>
<line x1="0" y1="2" x2="6" y2="2"></line>
@@ -57,7 +57,7 @@
@import '@assets/vuefilemanager/_mixins';
.content-group {
margin-bottom: 30px;
margin-bottom: 15px;
transition: all 300ms;
.group-title {
@@ -10,13 +10,7 @@
<router-link :to="{name: 'Files'}" :title="$t('locations.home')" class="icon-navigation-item home">
<div class="button-icon text-theme">
<hard-drive-icon size="19" class="text-theme" />
</div>
</router-link>
<router-link :to="{name: 'SharedFiles'}" :title="$t('locations.shared')" class="icon-navigation-item shared">
<div class="button-icon">
<share-icon size="19" />
<hard-drive-icon size="19" class="text-theme"></hard-drive-icon>
</div>
</router-link>
@@ -28,13 +22,13 @@
<router-link :to="{name: 'Profile'}" :class="{'is-active': isUserProfileRoute}" :title="$t('locations.profile')" class="icon-navigation-item settings">
<div class="button-icon">
<user-icon size="19" />
<user-icon size="19"></user-icon>
</div>
</router-link>
<router-link v-if="user.data.attributes.role === 'admin'" :to="{name: 'Dashboard'}" :class="{'is-active': $isThisRoute($route, adminRoutes)}" :title="$t('locations.settings')" class="icon-navigation-item users">
<div class="button-icon">
<settings-icon size="19" />
<settings-icon size="19"></settings-icon>
</div>
</router-link>
</div>
@@ -43,7 +37,7 @@
<ul class="icon-navigation logout">
<li @click="$store.dispatch('logOut')" :title="$t('locations.logout')" class="icon-navigation-item">
<div class="button-icon">
<power-icon size="19" />
<power-icon size="19"></power-icon>
</div>
</li>
</ul>
@@ -206,16 +200,6 @@
}
}
&.shared {
.button-icon {
background: rgba($yellow, 0.1);
path, line, polyline, rect, circle {
stroke: $yellow;
}
}
}
&.trash {
.button-icon {
background: rgba($red, 0.1);