fix: empty state for non editable section and remove x button
This commit is contained in:
parent
c430abc33a
commit
2f4acd7b13
@ -32,6 +32,7 @@
|
|||||||
@click="section.editingLabel = !section.editingLabel"
|
@click="section.editingLabel = !section.editingLabel"
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
|
v-if="section.editable !== false"
|
||||||
icon="x"
|
icon="x"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
@click="sections.splice(sections.indexOf(section), 1)"
|
@click="sections.splice(sections.indexOf(section), 1)"
|
||||||
@ -66,11 +67,20 @@
|
|||||||
</template>
|
</template>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
<Button
|
<Button
|
||||||
|
v-if="section.editable !== false"
|
||||||
class="w-full mt-2"
|
class="w-full mt-2"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
:label="__('Add Field')"
|
:label="__('Add Field')"
|
||||||
@click="section.fields.push({ label: 'New Field' })"
|
@click="section.fields.push({ label: 'New Field' })"
|
||||||
/>
|
/>
|
||||||
|
<div
|
||||||
|
v-else
|
||||||
|
class="flex justify-center items-center border rounded border-dashed p-3"
|
||||||
|
>
|
||||||
|
<div class="text-sm text-gray-500">
|
||||||
|
{{ __('This section is not editable') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user