mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-24 01:50:38 +00:00
Merge remote-tracking branch 'origin/exif_metadata'
# Conflicts: # public/mix-manifest.json # resources/js/App.vue # resources/js/components/FilesView/ImageMetaData.vue # resources/js/components/FilesView/InfoSidebar.vue # resources/js/components/FilesView/SearchBar.vue # resources/js/components/Spotlight/Spotlight.vue # resources/js/views/Shared.vue # src/Domain/Files/Resources/FileResource.php
This commit is contained in:
@@ -1,108 +1,93 @@
|
||||
<template>
|
||||
<div>
|
||||
<ul class="meta-data-list">
|
||||
<li v-if="clipboard.metadata.DateTimeOriginal">
|
||||
<li v-if="clipboard.data.attributes.date_time_original">
|
||||
<span>{{ $t('file_detail_meta.time_data') }}</span>
|
||||
<b>{{ clipboard.metadata.DateTimeOriginal }}</b>
|
||||
<b>{{ clipboard.data.attributes.date_time_original }}</b>
|
||||
</li>
|
||||
|
||||
<li v-if="clipboard.metadata.Artist">
|
||||
<li v-if="clipboard.data.attributes.artist">
|
||||
<span>{{ $t('file_detail_meta.author') }}</span>
|
||||
<b>{{ clipboard.metadata.Artist }}</b>
|
||||
<b>{{ clipboard.data.attributes.artist }}</b>
|
||||
</li>
|
||||
|
||||
<li v-if="clipboard.metadata.ExifImageWidth && clipboard.metadata.ExifImageLength">
|
||||
<li v-if="clipboard.data.attributes.width && clipboard.data.attributes.height">
|
||||
<span>{{ $t('file_detail_meta.dimension') }}</span>
|
||||
<b>{{ clipboard.metadata.ExifImageWidth }}x{{ clipboard.metadata.ExifImageLength }}</b>
|
||||
<b>{{ clipboard.data.attributes.width }}x{{ clipboard.data.attributes.height }}</b>
|
||||
</li>
|
||||
|
||||
<li v-if="clipboard.metadata.XResolution && clipboard.metadata.YResolution">
|
||||
<li v-if="clipboard.data.attributes.x_resolution && clipboard.data.attributes.y_resolution">
|
||||
<span>{{ $t('file_detail_meta.resolution') }}</span>
|
||||
<b>{{ clipboard.metadata.XResolution }}x{{ clipboard.metadata.YResolution }}</b>
|
||||
<b>{{ clipboard.data.attributes.x_resolution }}x{{ clipboard.data.attributes.y_resolution }}</b>
|
||||
</li>
|
||||
|
||||
<li v-if="clipboard.metadata.ColorSpace">
|
||||
<li v-if="clipboard.data.attributes.color_space">
|
||||
<span> {{ $t('file_detail_meta.color_space') }}</span>
|
||||
<b>{{ clipboard.metadata.ColorSpace }}</b>
|
||||
<b>{{ clipboard.data.attributes.color_space }}</b>
|
||||
</li>
|
||||
|
||||
<!--TODO: Colour profile:sRGB IEC61966-2.1-->
|
||||
|
||||
<li v-if="clipboard.metadata.Make">
|
||||
<li v-if="clipboard.data.attributes.make">
|
||||
<span>{{ $t('file_detail_meta.make') }}</span>
|
||||
<b>{{ clipboard.metadata.Make }}</b>
|
||||
<b>{{ clipboard.data.attributes.make }}</b>
|
||||
</li>
|
||||
|
||||
<li v-if="clipboard.metadata.Model">
|
||||
<li v-if="clipboard.data.attributes.model">
|
||||
<span>{{ $t('file_detail_meta.model') }}</span>
|
||||
<b>{{ clipboard.metadata.Model }}</b>
|
||||
<b>{{ clipboard.data.attributes.model }}</b>
|
||||
</li>
|
||||
|
||||
<li v-if="clipboard.metadata.ApertureValue">
|
||||
<li v-if="clipboard.data.attributes.aperture_value">
|
||||
<span>{{ $t('file_detail_meta.aperture_value') }}</span>
|
||||
<b v-html="parseInt(clipboard.metadata.ApertureValue) / 100"></b>
|
||||
<b> {{ clipboard.data.attributes.aperture_value }} </b>
|
||||
</li>
|
||||
|
||||
<li v-if="clipboard.metadata.ExposureTime">
|
||||
<li v-if="clipboard.data.attributes.exposure_time">
|
||||
<span>{{ $t('file_detail_meta.exposure') }}</span>
|
||||
<b>{{ clipboard.metadata.ExposureTime }}</b>
|
||||
<b>{{ clipboard.data.attributes.exposure_time }}</b>
|
||||
</li>
|
||||
|
||||
<li v-if="clipboard.metadata.FocalLength">
|
||||
<li v-if="clipboard.data.attributes.focal_length">
|
||||
<span>{{ $t('file_detail_meta.focal') }}</span>
|
||||
<b>{{ clipboard.metadata.FocalLength }}</b>
|
||||
<b>{{ clipboard.data.attributes.focal_length }}</b>
|
||||
</li>
|
||||
|
||||
<li v-if="clipboard.metadata.ISOSpeedRatings">
|
||||
<li v-if="clipboard.data.attributes.iso">
|
||||
<span>{{ $t('file_detail_meta.iso') }}</span>
|
||||
<b>{{ clipboard.metadata.ISOSpeedRatings }}</b>
|
||||
<b>{{ clipboard.data.attributes.iso }}</b>
|
||||
</li>
|
||||
|
||||
<li v-if="clipboard.metadata.COMPUTED.ApertureFNumber">
|
||||
<li v-if="clipboard.data.attributes.aperture_f_number">
|
||||
<span>{{ $t('file_detail_meta.aperature') }}</span>
|
||||
<b>{{ clipboard.metadata.COMPUTED.ApertureFNumber }}</b>
|
||||
<b>{{ clipboard.data.attributes.aperture_f_number }}</b>
|
||||
</li>
|
||||
|
||||
<li v-if="clipboard.metadata.COMPUTED.CCDWidth">
|
||||
<li v-if="clipboard.data.attributes.ccd_width">
|
||||
<span>{{ $t('file_detail_meta.camera_lens') }}</span>
|
||||
<b>{{ clipboard.metadata.COMPUTED.CCDWidth }}</b>
|
||||
<b>{{ clipboard.data.attributes.ccd_width }}</b>
|
||||
</li>
|
||||
|
||||
<li v-if="clipboard.metadata.GPSLongitude">
|
||||
<li v-if="clipboard.data.attributes.longitude">
|
||||
<span>{{ $t('file_detail_meta.longitude') }}</span>
|
||||
<b>{{ formatGps(clipboard.metadata.GPSLongitude, clipboard.metadata.GPSLongitudeRef) }}</b>
|
||||
<b>{{ clipboard.data.attributes.longitude }}</b>
|
||||
</li>
|
||||
|
||||
<li v-if="clipboard.metadata.GPSLatitude">
|
||||
<span>{{ $t('file_detail_meta.latitude') }}</span>
|
||||
<b>{{ formatGps(clipboard.metadata.GPSLatitude, clipboard.metadata.GPSLatitudeRef) }}</b>
|
||||
</li>
|
||||
<li v-if="clipboard.data.attributes.latitude">
|
||||
<span>{{ $t('file_detail_meta.latitude') }}</span>
|
||||
<b>{{ clipboard.data.attributes.latitude }}</b>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { split } from 'lodash'
|
||||
|
||||
export default {
|
||||
name: 'ImageMetaData',
|
||||
computed: {
|
||||
clipboard() {
|
||||
return this.$store.getters.clipboard[0].data.relationships
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
formatGps(location, ref) {
|
||||
let data = []
|
||||
|
||||
location.forEach((location) => {
|
||||
data.push(split(location, '/', 2)[0])
|
||||
})
|
||||
|
||||
return `${data[0]}° ${data[1]}' ${data[2].substr(0, 4) / 100}" ${ref} `
|
||||
},
|
||||
},
|
||||
name: 'ImageMetaData',
|
||||
computed: {
|
||||
clipboard() {
|
||||
return this.$store.getters.clipboard[0].data.relationships.exif
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -111,34 +96,33 @@ export default {
|
||||
@import '../../../sass/vuefilemanager/mixins';
|
||||
|
||||
.meta-data-list {
|
||||
list-style: none;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
list-style: none;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
|
||||
li {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 9px 0;
|
||||
border-bottom: 1px solid $light_mode_border;
|
||||
li {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 9px 0;
|
||||
border-bottom: 1px solid $light_mode_border;
|
||||
|
||||
b,
|
||||
span {
|
||||
@include font-size(14);
|
||||
color: $text;
|
||||
}
|
||||
}
|
||||
b, span {
|
||||
@include font-size(14);
|
||||
color: $text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dark {
|
||||
.meta-data-list {
|
||||
li {
|
||||
border-color: $dark_mode_border_color;
|
||||
|
||||
b,
|
||||
span {
|
||||
color: $dark_mode_text_primary !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.meta-data-list {
|
||||
li {
|
||||
border-color: $dark_mode_border_color;
|
||||
|
||||
b, span {
|
||||
color: $dark_mode_text_primary !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -113,44 +113,46 @@ import ListInfoItem from '../Others/ListInfoItem'
|
||||
import MemberAvatar from './MemberAvatar'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'InfoSidebar',
|
||||
components: {
|
||||
TeamMembersPreview,
|
||||
FilePreviewDetail,
|
||||
ImageMetaData,
|
||||
CopyShareLink,
|
||||
MemberAvatar,
|
||||
TitlePreview,
|
||||
ListInfoItem,
|
||||
UnlockIcon,
|
||||
EyeOffIcon,
|
||||
Edit2Icon,
|
||||
LockIcon,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permissionOptions', 'clipboard', 'user']),
|
||||
isEmpty() {
|
||||
return this.clipboard.length === 0
|
||||
},
|
||||
isSingleFile() {
|
||||
return this.clipboard.length === 1
|
||||
},
|
||||
singleFile() {
|
||||
return this.clipboard[0]
|
||||
},
|
||||
canShowMetaData() {
|
||||
return (
|
||||
this.clipboard[0].data.attributes.metadata && this.clipboard[0].data.attributes.metadata.ExifImageWidth
|
||||
)
|
||||
},
|
||||
isLocked() {
|
||||
return this.clipboard[0].data.relationships.shared.protected
|
||||
},
|
||||
sharedInfo() {
|
||||
let title = this.permissionOptions.find((option) => {
|
||||
return option.value === this.clipboard[0].data.relationships.shared.permission
|
||||
})
|
||||
export default {
|
||||
name: 'InfoSidebar',
|
||||
components: {
|
||||
TeamMembersPreview,
|
||||
FilePreviewDetail,
|
||||
ImageMetaData,
|
||||
CopyShareLink,
|
||||
MemberAvatar,
|
||||
TitlePreview,
|
||||
ListInfoItem,
|
||||
UnlockIcon,
|
||||
EyeOffIcon,
|
||||
Edit2Icon,
|
||||
LockIcon,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'permissionOptions',
|
||||
'clipboard',
|
||||
'user',
|
||||
]),
|
||||
isEmpty() {
|
||||
return this.clipboard.length === 0
|
||||
},
|
||||
isSingleFile() {
|
||||
return this.clipboard.length === 1
|
||||
},
|
||||
singleFile() {
|
||||
return this.clipboard[0]
|
||||
},
|
||||
canShowMetaData() {
|
||||
return this.clipboard[0].data.relationships.exif
|
||||
},
|
||||
isLocked() {
|
||||
return this.clipboard[0].data.relationships.shared.protected
|
||||
},
|
||||
sharedInfo() {
|
||||
let title = this.permissionOptions.find(option => {
|
||||
return option.value === this.clipboard[0].data.relationships.shared.permission
|
||||
})
|
||||
|
||||
return title ? this.$t(title.label) : this.$t('shared.can_download')
|
||||
},
|
||||
|
||||
@@ -22,15 +22,15 @@
|
||||
<script>
|
||||
import { SearchIcon } from 'vue-feather-icons'
|
||||
|
||||
export default {
|
||||
name: 'SearchBar',
|
||||
components: {
|
||||
SearchIcon,
|
||||
},
|
||||
computed: {
|
||||
metaKeyIcon() {
|
||||
return this.$isApple() ? '⌘' : '⊞'
|
||||
export default {
|
||||
name: 'SearchBar',
|
||||
components: {
|
||||
SearchIcon,
|
||||
},
|
||||
},
|
||||
}
|
||||
computed: {
|
||||
metaKeyIcon() {
|
||||
return this.$isApple() ? '⌘' : 'Ctrl'
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user