Merge pull request #6710 from lasniscinote/gl_SCI_9769

(fix) File column type improvement [SCI-9769]
This commit is contained in:
Martin Artnik 2023-11-27 17:23:31 +01:00 committed by GitHub
commit c7ace74024
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,19 +1,28 @@
<template>
<div id="repository-asset-value-wrapper" class="flex flex-col min-min-h-[46px] h-auto gap-[6px]">
<div class="font-inter text-sm font-semibold leading-5 truncate" :title="colName">
{{ colName }}
</div>
<div class="w-fit absolute right-0 top-7">
<a v-if="!file_name && (!uploading || error) && canEdit "
class="btn-text-link font-normal" @click="openFileChooser">
<div class="flex flex-row justify-between">
<div class="font-inter text-sm font-semibold leading-5 truncate" :title="colName">
{{ colName }}
</div>
<a v-if="!file_name && (!uploading || error) && canEdit"
class="btn-text-link font-normal" @click="openFileChooser">
{{ i18n.t('repositories.item_card.repository_asset_value.add_asset') }}
</a>
<div v-if="file_name && !uploading && canEdit" class="flex whitespace-nowrap gap-4 pl-4">
<a class="btn-text-link font-normal" @click="openFileChooser">
{{ i18n.t('general.replace') }}
</a>
<a class="btn-text-link font-normal" @click="clearFile">
{{ i18n.t('general.delete') }}
</a>
</div>
</div>
<div v-if="!uploading">
<div v-if="file_name">
<div class="flex flex-row justify-between">
<div class="w-full cursor-pointer text-sn-science-blue relative" @mouseover="tooltipShowing = true" @mouseout="tooltipShowing = false">
<a class="w-full inline-block file-preview-link truncate" :id="modalPreviewLinkId" data-no-turbolink="true"
<div class="w-full cursor-pointer relative" @mouseover="tooltipShowing = true" @mouseout="tooltipShowing = false">
<a class="w-full inline-block file-preview-link truncate text-sn-science-blue" :id="modalPreviewLinkId" data-no-turbolink="true"
data-id="true" data-status="asset-present" :data-preview-url=this?.preview_url :href=this?.url>
{{ file_name }}
</a>
@ -21,10 +30,6 @@
:preview_url="preview_url" :icon_html="icon_html" :medium_preview_url="medium_preview_url">
</tooltip-preview>
</div>
<div v-if="canEdit" class="flex whitespace-nowrap gap-4 pl-4">
<a class="btn-text-link font-normal" @click="openFileChooser"> {{ i18n.t('general.replace') }} </a>
<a class="btn-text-link font-normal" @click="clearFile"> {{ i18n.t('general.delete') }} </a>
</div>
</div>
</div>
<div v-else-if="!error" class="flex flex-row items-center font-inter text-sm font-normal leading-5 justify-between"