@@ -40,43 +40,48 @@ function remove(index: number) {
4040 <h2 v-translate >Locations</h2 >
4141 <a-empty v-if =" !locations" />
4242 <draggable
43+ v-else
4344 :list =" locations"
4445 item-key =" name"
4546 class =" list-group"
4647 ghost-class =" ghost"
47- handle =" .ant-card-head "
48+ handle =" .ant-collapse-header "
4849 >
4950 <template #item =" { element: v , index } " >
50- <a-card :key =" index" size =" small" >
51- <template #title >
52- <HolderOutlined />
53- {{ $gettext('Location') }}
54- </template >
55- <template #extra v-if =" ! readonly " >
56- <a-popconfirm @confirm =" remove(index)"
57- :title =" $gettext('Are you sure you want to remove this location?')"
58- :ok-text =" $gettext('Yes')"
59- :cancel-text =" $gettext('No')" >
60- <a-button type =" text" >
61- <template #icon >
62- <DeleteOutlined style =" font-size : 14px ;" />
63- </template >
64- </a-button >
65- </a-popconfirm >
66- </template >
67-
68- <a-form layout =" vertical" >
69- <a-form-item :label =" $gettext('Comments')" >
70- <a-textarea v-model:value =" v.comments" :bordered =" false" />
71- </a-form-item >
72- <a-form-item :label =" $gettext('Path')" >
73- <a-input addon-before =" location" v-model:value =" v.path" />
74- </a-form-item >
75- <a-form-item :label =" $gettext('Content')" >
76- <code-editor v-model:content =" v.content" default-height =" 200px" style =" width : 100% ;" />
77- </a-form-item >
78- </a-form >
79- </a-card >
51+ <a-collapse :bordered =" false" >
52+ <a-collapse-panel >
53+ <template #header >
54+ <div >
55+ <HolderOutlined />
56+ {{ $gettext('Location') }}
57+ {{ v.path }}
58+ </div >
59+ </template >
60+ <template #extra v-if =" ! readonly " >
61+ <a-popconfirm @confirm =" remove(index)"
62+ :title =" $gettext('Are you sure you want to remove this location?')"
63+ :ok-text =" $gettext('Yes')"
64+ :cancel-text =" $gettext('No')" >
65+ <a-button type =" text" size =" small" >
66+ <template #icon >
67+ <DeleteOutlined style =" font-size : 14px ;" />
68+ </template >
69+ </a-button >
70+ </a-popconfirm >
71+ </template >
72+ <a-form layout =" vertical" >
73+ <a-form-item :label =" $gettext('Comments')" >
74+ <a-textarea v-model:value =" v.comments" :bordered =" false" />
75+ </a-form-item >
76+ <a-form-item :label =" $gettext('Path')" >
77+ <a-input addon-before =" location" v-model:value =" v.path" />
78+ </a-form-item >
79+ <a-form-item :label =" $gettext('Content')" >
80+ <code-editor v-model:content =" v.content" default-height =" 200px" style =" width : 100% ;" />
81+ </a-form-item >
82+ </a-form >
83+ </a-collapse-panel >
84+ </a-collapse >
8085 </template >
8186 </draggable >
8287
@@ -100,8 +105,15 @@ function remove(index: number) {
100105</template >
101106
102107<style lang="less" scoped>
103- .ant-card {
108+ .ant-collapse {
104109 margin : 10px 0 ;
105- box-shadow : unset ;
110+ }
111+
112+ .ant-collapse-item {
113+ border : 0 !important ;
114+ }
115+
116+ .ant-collapse-header {
117+ align-items : center ;
106118}
107119 </style >
0 commit comments