mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-09 00:49:07 +08:00
Merge pull request #7354 from wandji20/wb-SCI-9901
Improve logic for showing disabled edit button in unsupported wopi file previews [SCI-9901]
This commit is contained in:
commit
4beb3fae96
1 changed files with 7 additions and 7 deletions
|
@ -1,15 +1,15 @@
|
|||
<template>
|
||||
<div class="sn-open-locally-menu" @mouseenter="fetchLocalAppInfo">
|
||||
<div v-if="!canOpenLocally && (attachment.attributes.wopi && attachment.attributes.urls.edit_asset)">
|
||||
<a v-if="editWopiEnabled" :href="`${attachment.attributes.urls.edit_asset}`" target="_blank"
|
||||
<button class="btn btn-light" v-if="!editWopiSupported" style="pointer-events: all;"
|
||||
:title="attachment.attributes.wopi_context.title" disabled="true">
|
||||
{{ attachment.attributes.wopi_context.button_text }}
|
||||
</button>
|
||||
<div v-else-if="!canOpenLocally && (attachment.attributes.wopi && attachment.attributes.urls.edit_asset)">
|
||||
<a :href="`${attachment.attributes.urls.edit_asset}`" target="_blank"
|
||||
class="block whitespace-nowrap rounded px-3 py-2.5
|
||||
hover:!text-sn-blue hover:no-underline cursor-pointer hover:bg-sn-super-light-grey">
|
||||
{{ attachment.attributes.wopi_context.button_text }}
|
||||
</a>
|
||||
<button class="btn btn-light" v-else style="pointer-events: all;"
|
||||
:title="attachment.attributes.wopi_context.title" disabled="true">
|
||||
{{ attachment.attributes.wopi_context.button_text }}
|
||||
</button>
|
||||
</div>
|
||||
<div v-else-if="!usesWebIntegration">
|
||||
<MenuDropdown
|
||||
|
@ -104,7 +104,7 @@ export default {
|
|||
return this.attachment.attributes.asset_type === 'gene_sequence'
|
||||
|| this.attachment.attributes.asset_type === 'marvinjs';
|
||||
},
|
||||
editWopiEnabled() {
|
||||
editWopiSupported() {
|
||||
return this.attachment.attributes.wopi_context.edit_supported;
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue