Fix: ObjectStrage利用時にドライブファイルアイコンが表示されない (#4677)
This commit is contained in:
parent
4db972318f
commit
6982faf668
4 changed files with 7 additions and 12 deletions
|
@ -24,7 +24,7 @@
|
||||||
<div class="files" v-show="files.length != 0">
|
<div class="files" v-show="files.length != 0">
|
||||||
<x-draggable :list="files" :options="{ animation: 150 }">
|
<x-draggable :list="files" :options="{ animation: 150 }">
|
||||||
<div v-for="file in files" :key="file.id">
|
<div v-for="file in files" :key="file.id">
|
||||||
<div class="img" :style="{ backgroundImage: `url(${file.thumbnailUrl})` }" :title="file.name"></div>
|
<div class="img" :style="{ backgroundImage: `url(${file.thumbnailUrl || '/assets/thumbnail-not-available.png'})` }" :title="file.name"></div>
|
||||||
<img class="remove" @click="detachMedia(file.id)" src="/assets/desktop/remove.png" :title="$t('attach-cancel')" alt=""/>
|
<img class="remove" @click="detachMedia(file.id)" src="/assets/desktop/remove.png" :title="$t('attach-cancel')" alt=""/>
|
||||||
</div>
|
</div>
|
||||||
</x-draggable>
|
</x-draggable>
|
||||||
|
@ -263,17 +263,14 @@ export default define({
|
||||||
border solid 4px transparent
|
border solid 4px transparent
|
||||||
cursor move
|
cursor move
|
||||||
|
|
||||||
&:hover > .remove
|
|
||||||
display block
|
|
||||||
|
|
||||||
> .img
|
> .img
|
||||||
width 64px
|
width 64px
|
||||||
height 64px
|
height 64px
|
||||||
background-size cover
|
background-size cover
|
||||||
background-position center center
|
background-position center center
|
||||||
|
background-color: rgba(128, 128, 128, 0.3)
|
||||||
|
|
||||||
> .remove
|
> .remove
|
||||||
display none
|
|
||||||
position absolute
|
position absolute
|
||||||
top -6px
|
top -6px
|
||||||
right -6px
|
right -6px
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<div class="files" :class="{ with: poll }" v-show="files.length != 0">
|
<div class="files" :class="{ with: poll }" v-show="files.length != 0">
|
||||||
<x-draggable :list="files" :options="{ animation: 150 }">
|
<x-draggable :list="files" :options="{ animation: 150 }">
|
||||||
<div v-for="file in files" :key="file.id">
|
<div v-for="file in files" :key="file.id">
|
||||||
<div class="img" :style="{ backgroundImage: `url(${file.thumbnailUrl})` }" :title="file.name"></div>
|
<div class="img" :style="{ backgroundImage: `url(${file.thumbnailUrl || '/assets/thumbnail-not-available.png'})` }" :title="file.name"></div>
|
||||||
<img class="remove" @click="detachMedia(file.id)" src="/assets/desktop/remove.png" :title="$t('attach-cancel')" alt=""/>
|
<img class="remove" @click="detachMedia(file.id)" src="/assets/desktop/remove.png" :title="$t('attach-cancel')" alt=""/>
|
||||||
</div>
|
</div>
|
||||||
</x-draggable>
|
</x-draggable>
|
||||||
|
@ -640,17 +640,14 @@ export default Vue.extend({
|
||||||
border solid 4px transparent
|
border solid 4px transparent
|
||||||
cursor move
|
cursor move
|
||||||
|
|
||||||
&:hover > .remove
|
|
||||||
display block
|
|
||||||
|
|
||||||
> .img
|
> .img
|
||||||
width 64px
|
width 64px
|
||||||
height 64px
|
height 64px
|
||||||
background-size cover
|
background-size cover
|
||||||
background-position center center
|
background-position center center
|
||||||
|
background-color: rgba(128, 128, 128, 0.3)
|
||||||
|
|
||||||
> .remove
|
> .remove
|
||||||
display none
|
|
||||||
position absolute
|
position absolute
|
||||||
top -6px
|
top -6px
|
||||||
right -6px
|
right -6px
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<div class="attaches" v-show="files.length != 0">
|
<div class="attaches" v-show="files.length != 0">
|
||||||
<x-draggable class="files" :list="files" :options="{ animation: 150 }">
|
<x-draggable class="files" :list="files" :options="{ animation: 150 }">
|
||||||
<div class="file" v-for="file in files" :key="file.id">
|
<div class="file" v-for="file in files" :key="file.id">
|
||||||
<div class="img" :style="`background-image: url(${file.thumbnailUrl})`" @click="detachMedia(file)"></div>
|
<div class="img" :style="`background-image: url(${file.thumbnailUrl || '/assets/thumbnail-not-available.png'})`" @click="detachMedia(file)"></div>
|
||||||
</div>
|
</div>
|
||||||
</x-draggable>
|
</x-draggable>
|
||||||
</div>
|
</div>
|
||||||
|
@ -506,6 +506,7 @@ export default Vue.extend({
|
||||||
height 64px
|
height 64px
|
||||||
background-size cover
|
background-size cover
|
||||||
background-position center center
|
background-position center center
|
||||||
|
background-color: rgba(128, 128, 128, 0.3)
|
||||||
|
|
||||||
> .mk-uploader
|
> .mk-uploader
|
||||||
margin 8px 0 0 0
|
margin 8px 0 0 0
|
||||||
|
|
|
@ -8,7 +8,7 @@ export default function(file: IDriveFile, thumbnail = false): string {
|
||||||
|
|
||||||
if (file.metadata.withoutChunks) {
|
if (file.metadata.withoutChunks) {
|
||||||
if (thumbnail) {
|
if (thumbnail) {
|
||||||
return file.metadata.thumbnailUrl || file.metadata.webpublicUrl || (isImage ? file.metadata.url : '/assets/thumbnail-not-available.png');
|
return file.metadata.thumbnailUrl || file.metadata.webpublicUrl || (isImage ? file.metadata.url : null);
|
||||||
} else {
|
} else {
|
||||||
return file.metadata.webpublicUrl || file.metadata.url;
|
return file.metadata.webpublicUrl || file.metadata.url;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue