@kevisual/kv-login 0.0.5 → 0.0.7
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.
- package/bun.config.ts +15 -0
- package/dist/app.d.ts +112 -0
- package/dist/app.js +5542 -0
- package/package.json +11 -9
- package/src/main.ts +3 -1
- package/src/modules/login-handle.ts +4 -0
- package/src/pages/kv-login.ts +6 -6
- package/dist/kv-login.es.js +0 -3819
- package/dist/kv-login.umd.js +0 -464
- package/vite-lib.config.ts +0 -12
package/package.json
CHANGED
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevisual/kv-login",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/main.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
8
|
-
"build": "
|
|
8
|
+
"build": "bun bun.config.ts",
|
|
9
|
+
"postbuild": "dts -i src/main.ts -o app.d.ts",
|
|
9
10
|
"build:test": "vite build",
|
|
10
11
|
"prepub": "rm -rf ./dist && pnpm run build:test",
|
|
11
|
-
"pub": "ev deploy ./dist -k kv-login-test -v 0.0.
|
|
12
|
+
"pub": "ev deploy ./dist -k kv-login-test -v 0.0.6 -u -y yes"
|
|
12
13
|
},
|
|
13
14
|
"keywords": [],
|
|
14
15
|
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
|
|
15
16
|
"license": "MIT",
|
|
16
|
-
"packageManager": "pnpm@10.
|
|
17
|
+
"packageManager": "pnpm@10.24.0",
|
|
17
18
|
"publishConfig": {
|
|
18
19
|
"access": "public"
|
|
19
20
|
},
|
|
20
21
|
"type": "module",
|
|
21
22
|
"dependencies": {
|
|
22
23
|
"@kevisual/context": "^0.0.4",
|
|
23
|
-
"@kevisual/query-login": "^0.0.
|
|
24
|
+
"@kevisual/query-login": "^0.0.7",
|
|
24
25
|
"lit-html": "^3.3.1",
|
|
25
26
|
"qrcode": "^1.5.4"
|
|
26
27
|
},
|
|
27
28
|
"exports": {
|
|
28
|
-
".": "./dist/
|
|
29
|
-
"./kv-login.es.js": "./dist/kv-login.es.js",
|
|
30
|
-
"./kv-login.umd.js": "./dist/kv-login.umd.js",
|
|
29
|
+
".": "./dist/app.js",
|
|
31
30
|
"./types": "./types/index.d.ts"
|
|
32
31
|
},
|
|
33
|
-
"types": "./types/index.d.ts"
|
|
32
|
+
"types": "./types/index.d.ts",
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/bun": "^1.3.3"
|
|
35
|
+
}
|
|
34
36
|
}
|
package/src/main.ts
CHANGED
|
@@ -19,7 +19,11 @@ export const redirectHome = () => {
|
|
|
19
19
|
const href = decodeURIComponent(redirect);
|
|
20
20
|
window.open(href, '_self');
|
|
21
21
|
}
|
|
22
|
+
// 从url上清除 code 参数, 清除 state 参数
|
|
22
23
|
emit({ type: 'login-success', data: {} });
|
|
24
|
+
setTimeout(() => {
|
|
25
|
+
clearCode();
|
|
26
|
+
}, 1500);
|
|
23
27
|
}
|
|
24
28
|
export const loginHandle = async (opts: LoginOpts) => {
|
|
25
29
|
const { loginMethod, data, el } = opts
|
package/src/pages/kv-login.ts
CHANGED
|
@@ -335,8 +335,8 @@ class KvLogin extends HTMLElement {
|
|
|
335
335
|
|
|
336
336
|
.login-methods {
|
|
337
337
|
display: flex;
|
|
338
|
-
background: #
|
|
339
|
-
border-bottom: 1px solid #
|
|
338
|
+
background: #f5f5f5;
|
|
339
|
+
border-bottom: 1px solid #000000;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
.login-method {
|
|
@@ -354,7 +354,7 @@ class KvLogin extends HTMLElement {
|
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
.login-method:hover {
|
|
357
|
-
background: #
|
|
357
|
+
background: #d0d0d0;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
.login-method.active {
|
|
@@ -422,7 +422,7 @@ class KvLogin extends HTMLElement {
|
|
|
422
422
|
.form-group input {
|
|
423
423
|
width: 100%;
|
|
424
424
|
padding: 12px 16px;
|
|
425
|
-
border: 2px solid #
|
|
425
|
+
border: 2px solid #cccccc;
|
|
426
426
|
border-radius: 8px;
|
|
427
427
|
font-size: 14px;
|
|
428
428
|
transition: border-color 0.3s ease;
|
|
@@ -485,7 +485,7 @@ class KvLogin extends HTMLElement {
|
|
|
485
485
|
.qr-container {
|
|
486
486
|
width: 340px;
|
|
487
487
|
height: 340px;
|
|
488
|
-
border: 2px
|
|
488
|
+
border: 2px solid #000000;
|
|
489
489
|
border-radius: 8px;
|
|
490
490
|
display: flex;
|
|
491
491
|
align-items: center;
|
|
@@ -494,7 +494,7 @@ class KvLogin extends HTMLElement {
|
|
|
494
494
|
|
|
495
495
|
.qr-placeholder {
|
|
496
496
|
text-align: center;
|
|
497
|
-
color: #
|
|
497
|
+
color: #333333;
|
|
498
498
|
}
|
|
499
499
|
|
|
500
500
|
.qr-icon {
|