vuefilemanager v1.5-alpha.1

This commit is contained in:
carodej
2020-04-29 11:32:08 +02:00
parent 2614efe601
commit 0f3cbaec3d
50 changed files with 426 additions and 355 deletions
+2 -2
View File
@@ -56,7 +56,7 @@
this.button = this.$t('alerts.error_confirm')
this.emoji = '😢😢😢'
this.buttonStyle = 'danger'
this.buttonStyle = 'danger-solid'
if (args.emoji) {
this.emoji = args.emoji
@@ -109,7 +109,7 @@
top: 50%;
transform: translateY(-50%) scale(1);
margin: 0 auto;
padding: 40px;
padding: 20px;
box-shadow: $light_mode_popup_shadow;
border-radius: 8px;
text-align: center;
@@ -34,7 +34,7 @@
{{ $t('context_menu.delete') }}
</li>
<li class="menu-option" @click="shareItem" v-if="item">
{{ item.shared ? 'Edit Sharing' : $t('context_menu.share') }}
{{ item.shared ? $t('context_menu.share_edit') : $t('context_menu.share') }}
</li>
<li class="menu-option" @click="ItemDetail" v-if="item">
{{ $t('context_menu.detail') }}
@@ -59,7 +59,7 @@
{{ $t('context_menu.move') }}
</li>
<li class="menu-option" @click="shareItem" v-if="item">
{{ item.shared ? 'Edit Sharing' : $t('context_menu.share') }}
{{ item.shared ? $t('context_menu.share_edit') : $t('context_menu.share') }}
</li>
<li class="menu-option" @click="ItemDetail" v-if="item">
{{ $t('context_menu.detail') }}
@@ -28,17 +28,17 @@
<div class="toolbar-button-wrapper" v-if="$checkPermission(['master', 'editor'])">
<ToolbarButtonUpload
source="upload"
action="Upload file"
:action="$t('actions.upload')"
/>
<ToolbarButton
source="trash-alt"
action="Delete"
:action="$t('actions.delete')"
@click.native="deleteItems"
/>
<ToolbarButton
@click.native="createFolder"
source="folder-plus"
action="Create folder"
:action="$t('actions.create_folder')"
/>
</div>
@@ -46,7 +46,7 @@
<div class="toolbar-button-wrapper">
<ToolbarButton
:source="preview"
action="Change Preview"
:action="$t('actions.preview')"
@click.native="$store.dispatch('changePreviewType')"
/>
<ToolbarButton
@@ -1,47 +1,55 @@
<template>
<div class="empty-message">
<div class="message">
<FontAwesomeIcon class="icon" :icon="icon" />
<p>{{ message }}</p>
</div>
</div>
<div class="empty-message">
<div class="message">
<FontAwesomeIcon class="icon" :icon="icon"/>
<p>{{ message }}</p>
</div>
</div>
</template>
<script>
export default {
name: 'EmptyMessage',
props: ['icon', 'message']
}
export default {
name: 'EmptyMessage',
props: ['icon', 'message']
}
</script>
<style scoped lang="scss">
@import "@assets/app.scss";
@import "@assets/app.scss";
.empty-message {
text-align: center;
display: flex;
align-items: center;
height: 100%;
.empty-message {
text-align: center;
display: flex;
align-items: center;
height: 100%;
.message {
margin: 0 auto;
.message {
margin: 0 auto;
p {
margin-top: 10px;
max-width: 130px;
@include font-size(14);
font-weight: 500;
color: $text-muted;
}
p {
margin-top: 10px;
max-width: 130px;
@include font-size(14);
font-weight: 500;
color: $text-muted;
}
.icon {
@include font-size(36);
color: $text;
.icon {
@include font-size(36);
color: $text;
path {
color: $text;
}
}
}
}
path {
fill: $text;
}
}
}
}
@media (prefers-color-scheme: dark) {
.empty-message .message .icon {
path {
fill: $dark_mode_text_secondary;
}
}
}
</style>
@@ -4,7 +4,7 @@
<!--Shared empty message-->
<div class="text-content" v-if="$isThisLocation(['shared']) && ! isLoading">
<h1 class="title">You Haven't Shared Anything Yet</h1>
<h1 class="title">{{ $t('shared.empty_shared') }}</h1>
</div>
<!--Trash empty message-->
@@ -203,26 +203,6 @@
// On items delete
events.$on('items:delete', () => {
this.$store.dispatch('deleteItem', this.fileInfoDetail)
//let ids = []
//let items = []
// Get ids
/*this.$children[0].$children.filter(item => {
if (item.isClicked) {
ids.push(item.data.unique_id)
items.push({
unique_id: item.data.unique_id,
type: item.data.type,
})
}
})*/
// Dispatch action
/*this.$store.dispatch('removeItems', [ids, items])*/
})
}
}
@@ -299,4 +279,10 @@
.file-leave-active {
position: absolute;
}
@media only screen and (max-width: 660px) {
.file-info-container {
display: none;
}
}
</style>
@@ -1,7 +1,6 @@
<template>
<div class="file-info-content" v-if="fileInfoDetail">
<div class="file-headline" spellcheck="false">
<FilePreview />
<!--File info-->
@@ -29,8 +28,8 @@
<!--Latest change-->
<li v-if="$checkPermission(['master']) && fileInfoDetail.user_scope !== 'master'" class="list-info-item">
<b>Author</b>
<span>Public Participant</span>
<b>{{ $t('file_detail.author') }}</b>
<span>{{ $t('file_detail.author_participant') }}</span>
</li>
<!--Latest change-->
@@ -50,7 +49,7 @@
<!--Parent-->
<li v-if="$checkPermission('master') && fileInfoDetail.shared" class="list-info-item">
<b>Shared</b>
<b>{{ $t('file_detail.shared') }}</b>
<div class="action-button" @click="shareItemOptions">
<FontAwesomeIcon class="icon" :icon="sharedIcon" />
<span>{{ sharedInfo }}</span>
@@ -77,7 +76,7 @@
CopyInput,
},
computed: {
...mapGetters(['fileInfoDetail']),
...mapGetters(['fileInfoDetail', 'permissionOptions']),
filePreviewIcon() {
switch (this.fileInfoDetail.type) {
case 'folder':
@@ -98,16 +97,13 @@
}
},
sharedInfo() {
switch (this.fileInfoDetail.shared.permission) {
case 'editor':
return 'Can edit and upload files'
break
case 'visitor':
return 'Can only view and download'
break
default:
return 'Can download file'
}
// Get permission title
let title = this.permissionOptions.find(option => {
return option.value === this.fileInfoDetail.shared.permission
})
return title ? title.label : this.$t('shared.can_download')
},
sharedIcon() {
switch (this.fileInfoDetail.shared.permission) {
@@ -133,7 +129,6 @@
moveItem() {
// Move item fire popup
events.$emit('popup:open', {name: 'move', item: this.fileInfoDetail})
}
}
}
@@ -229,7 +224,7 @@
margin-right: 2px;
path {
fill: $theme_light;
fill: $theme;
}
}
}
@@ -313,5 +308,22 @@
}
}
}
.sharelink {
.lock-icon {
path {
fill: $dark_mode_text_primary;
}
&:hover {
path {
fill: $theme;
}
}
}
}
}
</style>
@@ -52,7 +52,7 @@
<!--Shared Icon-->
<div v-if="$checkPermission('master') && data.shared" class="item-shared">
<FontAwesomeIcon class="shared-icon" icon="user-friends"/>
<FontAwesomeIcon class="shared-icon" icon="share"/>
</div>
<!--Participant owner Icon-->
@@ -86,7 +86,9 @@
name: 'FileItemGrid',
props: ['data'],
computed: {
...mapGetters(['FilePreviewType']),
...mapGetters([
'FilePreviewType', 'sharedDetail'
]),
isFolder() {
return this.data.type === 'folder'
},
@@ -97,7 +99,10 @@
return this.data.type === 'image'
},
canEditName() {
return !this.$isMobile() && !this.$isThisLocation(['trash', 'trash-root']) && !this.$checkPermission('visitor')
return !this.$isMobile()
&& !this.$isThisLocation(['trash', 'trash-root'])
&& !this.$checkPermission('visitor')
&& (this.sharedDetail && this.sharedDetail.type !== 'file')
},
canDrag() {
return !this.isDeleted && this.$checkPermission(['master', 'editor'])
@@ -51,7 +51,7 @@
<!--Shared Icon-->
<div v-if="$checkPermission('master') && data.shared" class="item-shared">
<FontAwesomeIcon class="shared-icon" icon="user-friends"/>
<FontAwesomeIcon class="shared-icon" icon="share"/>
</div>
<!--Participant owner Icon-->
@@ -31,7 +31,7 @@
{{ $t('context_menu.rename') }}
</li>
<li class="menu-option" @click="shareItem" v-if="fileInfoDetail">
{{ fileInfoDetail.shared ? 'Edit Sharing' : $t('context_menu.share') }}
{{ fileInfoDetail.shared ? $t('context_menu.share_edit') : $t('context_menu.share') }}
</li>
<li class="menu-option" @click="downloadItem" v-if="! isFolder">
{{ $t('context_menu.download') }}
@@ -53,7 +53,7 @@
{{ $t('context_menu.move') }}
</li>
<li class="menu-option" @click="shareItem" v-if="fileInfoDetail">
{{ fileInfoDetail.shared ? 'Edit Sharing' : $t('context_menu.share') }}
{{ fileInfoDetail.shared ? $t('context_menu.share_edit') : $t('context_menu.share') }}
</li>
<li class="menu-option" @click="downloadItem" v-if="! isFolder">
{{ $t('context_menu.download') }}