Browse Source

Add labels for input fields

Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
julia.kirschenheuter 8 months ago
parent
commit
ea881fee2f
3 changed files with 21 additions and 7 deletions
  1. 21 7
      apps/oauth2/src/App.vue
  2. 0 0
      dist/oauth2-oauth2.js
  3. 0 0
      dist/oauth2-oauth2.js.map

+ 21 - 7
apps/oauth2/src/App.vue

@@ -43,17 +43,21 @@
 		<br>
 		<h3>{{ t('oauth2', 'Add client') }}</h3>
 		<span v-if="newClient.error" class="msg error">{{ newClient.errorMsg }}</span>
-		<form @submit.prevent="addClient">
-			<input id="name"
-				v-model="newClient.name"
+		<form class="oauth2-form" @submit.prevent="addClient">
+			<NcTextField id="name"
+				:value.sync="newClient.name"
 				type="text"
+				class="oauth2-form--input"
 				name="name"
-				:placeholder="t('oauth2', 'Name')">
-			<input id="redirectUri"
-				v-model="newClient.redirectUri"
+				:label="t('oauth2', 'Name')"
+				:placeholder="t('oauth2', 'Name')" />
+			<NcTextField id="redirectUri"
+				:value.sync="newClient.redirectUri"
 				type="url"
+				class="oauth2-form--input"
 				name="redirectUri"
-				:placeholder="t('oauth2', 'Redirection URI')">
+				:label="t('oauth2', 'Redirection URI')"
+				:placeholder="t('oauth2', 'Redirection URI')" />
 			<NcButton native-type="submit" class="inline-button">
 				{{ t('oauth2', 'Add') }}
 			</NcButton>
@@ -69,6 +73,7 @@ import { getCapabilities } from '@nextcloud/capabilities'
 import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
 import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
 import { loadState } from '@nextcloud/initial-state'
+import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js'
 
 export default {
 	name: 'App',
@@ -76,6 +81,7 @@ export default {
 		OAuthItem,
 		NcSettingsSection,
 		NcButton,
+		NcTextField,
 	},
 	props: {
 		clients: {
@@ -140,4 +146,12 @@ export default {
 		min-height: 34px !important;
 		display: inline-flex !important;
 	}
+	.oauth2-form {
+		display: flex;
+		flex-direction: row;
+	}
+	.oauth2-form--input {
+		max-width: 200px;
+		margin-right: 10px;
+	}
 </style>

File diff suppressed because it is too large
+ 0 - 0
dist/oauth2-oauth2.js


File diff suppressed because it is too large
+ 0 - 0
dist/oauth2-oauth2.js.map


Some files were not shown because too many files changed in this diff