mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-20 00:42:16 +00:00
add change folder icon to rename item popup
This commit is contained in:
@@ -27,8 +27,10 @@
|
||||
<img loading="lazy" v-if="isImage && data.thumbnail" class="image" :src="data.thumbnail" :alt="data.name"/>
|
||||
|
||||
<!--Else show only folder icon-->
|
||||
<FontAwesomeIcon v-if="isFolder" :class="{ 'is-deleted': isDeleted }" class="folder-icon" icon="folder"/>
|
||||
<!-- <div v-if="isFolder" :class="{ 'is-deleted': isDeleted }" class="folder-icon">🐢</div> -->
|
||||
<FontAwesomeIcon v-if="isFolder && !folderIconHandle" :ref="`folder${this.data.unique_id}`" :class="{ 'is-deleted': isDeleted }" class="folder-icon" icon="folder"/>
|
||||
|
||||
<!-- If folder have set emoji -->
|
||||
<div class="emoji" v-if="isFolder && folderIconHandle"> {{folderIconHandle}}</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -86,6 +88,21 @@ export default {
|
||||
computed: {
|
||||
...mapGetters(['FilePreviewType', 'fileInfoDetail']),
|
||||
...mapGetters({ allData: 'data' }),
|
||||
folderIconHandle(){
|
||||
|
||||
// If folder have set some icon color
|
||||
if(this.data.folder_icon_color) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs[`folder${this.data.unique_id}`].firstElementChild.style.fill = `${this.data.folder_icon_color}`
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
// If folder have set some emoji
|
||||
if(this.data.folder_icon_emoji)
|
||||
return JSON.parse(this.data.folder_icon_emoji).char
|
||||
|
||||
},
|
||||
isClicked() {
|
||||
return this.fileInfoDetail.some(element => element.unique_id == this.data.unique_id)
|
||||
},
|
||||
@@ -447,6 +464,10 @@ export default {
|
||||
line-height: 0;
|
||||
margin-right: 20px;
|
||||
|
||||
.emoji {
|
||||
@include font-size(35)
|
||||
}
|
||||
|
||||
.folder-icon {
|
||||
@include font-size(52);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user