chore: hide tab actions in preview mode

This commit is contained in:
Shariq Ansari 2023-10-31 02:03:11 +05:30
parent 6a626318be
commit 8956bbd3ec
4 changed files with 2 additions and 6 deletions

View file

@ -172,8 +172,6 @@ onMounted(() => store.fetch());
}
:deep(.preview) {
--field-placeholder-color: var(--fg-bg-color);
.tab,
.column,
.field {

View file

@ -156,9 +156,6 @@ function move_sections_to_tab() {
>
<draggable
class="section-columns-container"
:style="{
backgroundColor: section.columns.length ? null : 'var(--field-placeholder-color)'
}"
v-model="section.columns"
group="columns"
item-key="id"

View file

@ -40,7 +40,7 @@ function resize(e) {
<div class="sidebar-container" :style="{ width: `${sidebar_width}px` }">
<FieldProperties v-if="store.form.selected_field" />
<div class="default-state" v-else>
<div class="actions" v-if="store.form.layout.tabs.length == 1">
<div class="actions" v-if="store.form.layout.tabs.length == 1 && !store.read_only">
<button
class="new-tab-btn btn btn-default btn-xs"
:title="__('Add new tab')"

View file

@ -127,6 +127,7 @@ function delete_tab(with_children) {
class="remove-tab-btn btn btn-xs"
:title="__('Remove tab')"
@click.stop="remove_tab"
:hidden="store.read_only"
>
<div v-html="frappe.utils.icon('remove', 'xs')"></div>
</button>