88 <DropboxIcon class =" icon" />
99 {{ t('integration_dropbox', 'Dropbox integration') }}
1010 </h2 >
11- <NcNoteCard type = " info " >
12- <p >
11+ <div id = " dropbox-content " >
12+ <NcNoteCard type = " info " >
1313 {{ t('integration_dropbox', 'If you want your Nextcloud users to authenticate to Dropbox using your Dropbox OAuth app, create one in Dropbox.') }}
14- </ p >
15- <a href =" https://www.dropbox.com/developers/apps" class =" external" target =" _blank" >
16- {{ t('integration_dropbox', 'Dropbox developer settings') }}
17- </a >
18- < p >
14+ < br >
15+ <a href =" https://www.dropbox.com/developers/apps" class =" external" target =" _blank" >
16+ {{ t('integration_dropbox', 'Dropbox developer settings') }}
17+ </a >
18+ < br >
1919 {{ t('integration_dropbox', 'Make sure your give those permissions to your app:') }}
20- </p >
21- <p >
20+ <br >
2221 <strong >account_info.read - files.metadata.read - files.content.read</strong >
23- </p >
24- <p >
22+ <br >
2523 {{ t('integration_dropbox', 'No need to add any redirect URI.') }}
2624 {{ t('integration_dropbox', 'Then set the app key and app secret below.') }}
27- </p >
28- </ NcNoteCard >
29- < div id = " dropbox-content " >
30- < div class = " line " >
31- < label for = " dropbox-client-id " >
32- < KeyIcon :size = " 20 " class = " icon " />
33- {{ t('integration_dropbox', 'App key') }}
34- </ label >
35- < input id = " dropbox-client-id "
36- v-model = " state.client_id "
37- type = " password "
38- :readonly = " readonly "
39- :placeholder = " t('integration_dropbox', 'Your Dropbox application key') "
40- @input = " onInput "
41- @focus = " readonly = false " >
42- </ div >
43- < div class = " line " >
44- < label for = " dropbox-client-secret " >
45- < KeyIcon :size = " 20 " class = " icon " />
46- {{ t('integration_dropbox', 'App secret') }}
47- </ label >
48- < input id = " dropbox-client-secret "
49- v-model =" state.client_secret"
50- type = " password "
51- :readonly = " readonly "
52- :placeholder = " t('integration_dropbox', 'Your Dropbox application secret') "
53- @input = " onInput "
54- @focus = " readonly = false " >
55- </div >
25+ </NcNoteCard >
26+ < NcTextField
27+ v-model = " state.client_id "
28+ type = " password "
29+ : label= " t('integration_dropbox', 'App key') "
30+ :placeholder = " t('integration_dropbox', 'Your Dropbox application key') "
31+ :readonly = " readonly "
32+ :show-trailing-button = " !!state.client_id "
33+ @trailing-button-click = " state.client_id = ''; onInput() "
34+ @focus = " readonly = false "
35+ @update:model-value = " onInput " >
36+ < template # icon >
37+ < KeyOutlineIcon :size = " 20 " />
38+ </ template >
39+ </ NcTextField >
40+ <NcTextField
41+ v-model = " state.client_secret "
42+ type = " password "
43+ :label = " t('integration_dropbox', 'App secret') "
44+ :placeholder = " t('integration_dropbox', 'Your Dropbox application secret')"
45+ :readonly = " readonly "
46+ :show-trailing-button = " !!state.client_secret "
47+ @trailing-button-click =" state.client_secret = ''; onInput() "
48+ @focus = " readonly = false "
49+ @update:model-value = " onInput " >
50+ < template # icon >
51+ < KeyOutlineIcon :size = " 20 " />
52+ </ template >
53+ </NcTextField >
5654 </div >
5755 </div >
5856</template >
5957
6058<script >
61- import KeyIcon from ' vue-material-design-icons/KeyOutline.vue'
59+ import KeyOutlineIcon from ' vue-material-design-icons/KeyOutline.vue'
6260
6361import DropboxIcon from ' ./icons/DropboxIcon.vue'
6462
6563import NcNoteCard from ' @nextcloud/vue/components/NcNoteCard'
64+ import NcTextField from ' @nextcloud/vue/components/NcTextField'
6665
6766import { loadState } from ' @nextcloud/initial-state'
6867import { generateUrl } from ' @nextcloud/router'
@@ -76,8 +75,9 @@ export default {
7675
7776 components: {
7877 DropboxIcon,
79- KeyIcon ,
78+ KeyOutlineIcon ,
8079 NcNoteCard,
80+ NcTextField,
8181 },
8282
8383 props: [],
@@ -128,33 +128,18 @@ export default {
128128
129129<style scoped lang="scss">
130130#dropbox_prefs {
131- #dropbox-content {
132- margin-left : 40px ;
133- }
134-
135- h2 ,
136- .line ,
137- .settings-hint {
131+ h2 {
138132 display : flex ;
139133 align-items : center ;
140- .icon {
141- margin-right : 4px ;
142- }
134+ justify-content : start ;
135+ gap : 8px ;
143136 }
144-
145- h2 .icon {
146- margin-right : 8px ;
147- }
148-
149- .line {
150- > label {
151- width : 300px ;
152- display : flex ;
153- align-items : center ;
154- }
155- > input {
156- width : 250px ;
157- }
137+ #dropbox-content {
138+ margin-left : 40px ;
139+ display : flex ;
140+ flex-direction : column ;
141+ gap : 4px ;
142+ max-width : 800px ;
158143 }
159144}
160145 </style >
0 commit comments