mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 14:45:56 +08:00
Update viewer and technician interaction on shareable link modal [SCI-9047] (#6568)
This commit is contained in:
parent
64669dee4d
commit
0987ebf637
|
@ -62,6 +62,10 @@ input[type="checkbox"].sci-toggle-checkbox {
|
|||
display: none;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
&:checked + .sci-toggle-checkbox-label {
|
||||
border-color: var(--sn-blue);
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ class MyModuleShareableLinksController < ApplicationController
|
|||
results_show)
|
||||
before_action :check_view_permissions, only: :show
|
||||
before_action :check_manage_permissions, except: %i(protocol_show
|
||||
show
|
||||
repository_index_dt
|
||||
repository_snapshot_index_dt
|
||||
download_asset
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
v-model="sharedEnabled"
|
||||
id="checkbox"
|
||||
class="sci-toggle-checkbox"
|
||||
:disabled="!canShare"
|
||||
tabindex="0"
|
||||
@change="checkboxChange"
|
||||
@keyup.enter="handleCheckboxEnter"/>
|
||||
|
@ -46,7 +47,7 @@
|
|||
:class="{ 'error': error }"
|
||||
v-model="description"
|
||||
:placeholder="i18n.t('shareable_links.modal.description_placeholder')"
|
||||
:disabled="!sharedEnabled"
|
||||
:disabled="!sharedEnabled || !canShare"
|
||||
@focus="editing = true">
|
||||
</textarea>
|
||||
</div>
|
||||
|
@ -110,6 +111,10 @@
|
|||
characterLimit: {
|
||||
type: Number,
|
||||
default: null
|
||||
},
|
||||
canShare: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
type="button"
|
||||
:class="shareClass"
|
||||
:title="shareValue"
|
||||
:disabled="disabled"
|
||||
@click="openModal">
|
||||
<span class="sn-icon sn-icon-shared"></span>
|
||||
<span class="text-sm">
|
||||
|
@ -19,6 +18,7 @@
|
|||
:characterLimit="255"
|
||||
@enable="enableShare"
|
||||
@disable="disableShare"
|
||||
:canShare="canShare"
|
||||
@close="closeModal"/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -38,7 +38,7 @@
|
|||
type: String,
|
||||
required: true
|
||||
},
|
||||
disabled: {
|
||||
canShare: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<div class="task-sharing-and-flows flex items-center gap-2 pl-3">
|
||||
<%= render partial: 'my_modules/status_flow/task_flow_button', locals: { my_module: @my_module } if @my_module.my_module_status_flow %>
|
||||
<%= javascript_include_tag("my_modules/status_flow") %>
|
||||
<% if current_team.shareable_links_enabled? && can_share_my_module?(@my_module) %>
|
||||
<% if current_team.shareable_links_enabled? %>
|
||||
<div class="share-task-container" data-behaviour="vue">
|
||||
<share-task-container
|
||||
shareable-link-url="<%= my_module_shareable_link_path(@my_module) %>"
|
||||
:shared="<%= @my_module.shared? %>"
|
||||
:disabled="<%= !can_share_my_module?(@my_module) %>" />
|
||||
:can-share="<%= can_share_my_module?(@my_module) %>" />
|
||||
</div>
|
||||
|
||||
<%= javascript_include_tag 'vue_share_task_container' %>
|
||||
|
|
Loading…
Reference in a new issue