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.
@@ -4,4 +4,6 @@
4
4
  NODE_ENV=production
5
5
  DEBUG_LEVEL=info
6
6
  AF_DEBUG_LEVEL=info
7
- DB_DEBUG_LEVEL=info
7
+ DB_DEBUG_LEVEL=info
8
+ DATABASE_URL=sqlite://db/db.sqlite
9
+ PRISMA_DATABASE_URL=file:./db/db.sqlite
@@ -1,8 +1,6 @@
1
1
  allowBuilds:
2
2
  '@prisma/engines': true
3
3
  adminforth: true
4
- better-sqlite3: true
4
+ better-sqlite3: false
5
5
  esbuild: true
6
6
  prisma: true
7
- onlyBuiltDependencies:
8
- - better-sqlite3
@@ -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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "3.29.0",
3
+ "version": "3.30.0",
4
4
  "description": "OpenSource Agent-Native forth-generation admin panel",
5
5
  "keywords": [
6
6
  "adminforth",