adminforth 3.29.0 → 3.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
:key="index"
|
|
44
44
|
:is="getCustomComponent(formatComponent(c))"
|
|
45
45
|
:meta="formatComponent(c).meta"
|
|
46
|
+
@update:setLoginParam="setLoginParam"
|
|
46
47
|
/>
|
|
47
48
|
</template>
|
|
48
49
|
<h3 v-else class="text-xl font-semibold text-lightLoginViewText dark:text-darkLoginViewTextColor">
|
|
@@ -99,6 +100,7 @@
|
|
|
99
100
|
:meta="formatComponent(c).meta"
|
|
100
101
|
:failedLoginAttempts="failedLoginAttempts"
|
|
101
102
|
@update:disableLoginButton="setDisableLoginButton($event)"
|
|
103
|
+
@update:setLoginParam="setLoginParam"
|
|
102
104
|
/>
|
|
103
105
|
|
|
104
106
|
<div v-if="coreStore.config?.loginPromptHTML"
|
|
@@ -120,6 +122,7 @@
|
|
|
120
122
|
:meta="formatComponent(c).meta"
|
|
121
123
|
:failedLoginAttempts="failedLoginAttempts"
|
|
122
124
|
@update:disableLoginButton="setDisableLoginButton($event)"
|
|
125
|
+
@update:setLoginParam="setLoginParam"
|
|
123
126
|
@update:oauthRedirecting="oauthRedirecting = $event"
|
|
124
127
|
/>
|
|
125
128
|
</form>
|
|
@@ -150,6 +153,7 @@ const usernameInput = ref<InstanceType<typeof Input> | null>(null);
|
|
|
150
153
|
const rememberMeValue= ref(false);
|
|
151
154
|
const username = ref('');
|
|
152
155
|
const password = ref('');
|
|
156
|
+
const loginParams = new Map<string, unknown>();
|
|
153
157
|
|
|
154
158
|
const router = useRouter();
|
|
155
159
|
const route = useRoute();
|
|
@@ -191,6 +195,7 @@ async function login() {
|
|
|
191
195
|
path: '/login',
|
|
192
196
|
method: 'POST',
|
|
193
197
|
body: {
|
|
198
|
+
...Object.fromEntries(loginParams),
|
|
194
199
|
username: username.value,
|
|
195
200
|
password: password.value,
|
|
196
201
|
rememberMe: rememberMeValue.value,
|
|
@@ -218,4 +223,12 @@ function setDisableLoginButton(value: boolean) {
|
|
|
218
223
|
disableLoginButton.value = value;
|
|
219
224
|
}
|
|
220
225
|
|
|
226
|
+
function setLoginParam(name: string, value: unknown) {
|
|
227
|
+
if (value === undefined) {
|
|
228
|
+
loginParams.delete(name);
|
|
229
|
+
} else {
|
|
230
|
+
loginParams.set(name, value);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
221
234
|
</script>
|