22 <div id =" autocurrency-content" class =" section" >
33 <h2 >{{ strings.title }}</h2 >
44
5- <NcNoteCard type =" info" >
6- <p v-html =" strings.instructionsHelp" />
7- </NcNoteCard >
5+ <NcSettingsSection :name =" strings.instructionsHeader" >
6+ <NcNoteCard type =" info" >
7+ <p v-html =" strings.instructionsHelp" />
8+ </NcNoteCard >
9+ </NcSettingsSection >
810
9- <NcAppSettingsSection id = " custom-currencies " :name =" strings.customCurrenciesHeader" >
11+ <NcSettingsSection :name =" strings.customCurrenciesHeader" >
1012 <NcNoteCard type =" info" >
1113 <p v-html =" strings.customCurrenciesHelp" />
1214 </NcNoteCard >
1315
14- <div class =" settings-section" >
16+ <div class =" settings-section-content " >
1517 <div class =" custom-currencies-list" >
1618 <div
1719 v-for =" (currency, index) in customCurrencies"
9092 </NcButton >
9193 </div >
9294 </div >
93- </NcAppSettingsSection >
94-
95- <NcAppSettingsSection id =" cron-settings" :name =" strings.cronSettingsHeader" >
96- <section >
97- <form @submit.prevent =" save" >
98- <div class =" settings-section" >
99- <div class =" cron-flex" >
100- <NcSelect
101- v-model =" interval"
102- :options =" intervals"
103- :input-label =" strings.intervalLabel"
104- required
105- :disabled =" loading"
106- />
107-
108- <div class =" cron-last-update-container" >
109- <NcButton @click =" doCron" :disabled =" loading" >{{ strings.fetchNow }}</NcButton >
110-
111- <div >
112- {{ strings.lastFetched }}
113- <span v-if =" loading" >{{ strings.loading }}</span >
114- <span v-if =" !loading && !lastUpdate" >{{ strings.never }}</span >
115- <NcDateTime v-if =" !loading && lastUpdate" :timestamp =" lastUpdate.valueOf()" />
116- </div >
95+ </NcSettingsSection >
96+
97+ <NcSettingsSection :name =" strings.cronSettingsHeader" >
98+ <form @submit.prevent =" save" >
99+ <div class =" settings-section-content" >
100+ <div class =" cron-flex" >
101+ <NcSelect
102+ v-model =" interval"
103+ :options =" intervals"
104+ :input-label =" strings.intervalLabel"
105+ required
106+ :disabled =" loading"
107+ />
108+
109+ <div class =" cron-last-update-container" >
110+ <NcButton @click =" doCron" :disabled =" loading" >{{ strings.fetchNow }}</NcButton >
111+
112+ <div >
113+ {{ strings.lastFetched }}
114+ <span v-if =" loading" >{{ strings.loading }}</span >
115+ <span v-if =" !loading && !lastUpdate" >{{ strings.never }}</span >
116+ <NcDateTime v-if =" !loading && lastUpdate" :timestamp =" lastUpdate.valueOf()" />
117117 </div >
118118 </div >
119- <div class =" retention-field" >
120- <NcTextField
121- v-model =" retentionDays"
122- type =" number"
123- :label =" strings.retentionDaysLabel"
124- :helper-text =" strings.retentionDaysHelp"
125- min =" 0"
126- required
127- :disabled =" loading"
128- />
129- </div >
130- <div class =" submit-buttons" >
131- <NcButton type =" submit" >{{ strings.save }}</NcButton >
132- </div >
133119 </div >
134- </form >
135- </section >
136- </NcAppSettingsSection >
120+ <div class =" retention-field" >
121+ <NcTextField
122+ v-model =" retentionDays"
123+ type =" number"
124+ :label =" strings.retentionDaysLabel"
125+ :helper-text =" strings.retentionDaysHelp"
126+ min =" 0"
127+ required
128+ :disabled =" loading"
129+ />
130+ </div >
131+ <div class =" submit-buttons" >
132+ <NcButton type =" submit" >{{ strings.save }}</NcButton >
133+ </div >
134+ </div >
135+ </form >
136+ </NcSettingsSection >
137137 </div >
138138</template >
139139
140140<script >
141- import NcAppSettingsSection from ' @nextcloud/vue/components/NcAppSettingsSection '
141+ import NcSettingsSection from ' @nextcloud/vue/components/NcSettingsSection '
142142import NcSelect from ' @nextcloud/vue/components/NcSelect'
143143import NcButton from ' @nextcloud/vue/components/NcButton'
144144import NcDateTime from ' @nextcloud/vue/components/NcDateTime'
@@ -156,7 +156,7 @@ import { parseISO as parseDate } from 'date-fns/parseISO'
156156export default {
157157 name: ' App' ,
158158 components: {
159- NcAppSettingsSection ,
159+ NcSettingsSection ,
160160 NcButton,
161161 NcDateTime,
162162 NcSelect,
@@ -187,6 +187,7 @@ export default {
187187 ],
188188 strings: {
189189 title: t (APP_ID , ' Auto Currency for Cospend' ),
190+ instructionsHeader: t (APP_ID , ' Information' ),
190191 customCurrenciesHeader: t (APP_ID , ' Custom Currencies' ),
191192 customCurrenciesHelp: t (
192193 APP_ID ,
@@ -424,9 +425,10 @@ export default {
424425 }
425426 }
426427
427- .settings - section {
428+ .settings - section- content {
428429 display: flex;
429430 flex- direction: column;
431+ align- items: stretch;
430432 gap: 32px ;
431433 }
432434
0 commit comments