run prettier
This commit is contained in:
parent
6de0f8ef60
commit
8f6c2fc8b8
|
|
@ -13,7 +13,7 @@
|
||||||
"dev": "webpack-dev-server",
|
"dev": "webpack-dev-server",
|
||||||
"build": "webpack --mode=production -p --progress",
|
"build": "webpack --mode=production -p --progress",
|
||||||
"lint": "eslint --ext=ts -f=beauty .",
|
"lint": "eslint --ext=ts -f=beauty .",
|
||||||
"fmt": "prettier --write 'resources/assets/**/*.{ts,tsx}'",
|
"fmt": "prettier --write resources/assets",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@ a {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-link, .navbar-brand {
|
.brand-link,
|
||||||
|
.navbar-brand {
|
||||||
font-family: Minecraft;
|
font-family: Minecraft;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,13 @@ export default async function handler(event: Event) {
|
||||||
const email: string = form.email.value
|
const email: string = form.email.value
|
||||||
const password: string = form.password.value
|
const password: string = form.password.value
|
||||||
|
|
||||||
const {
|
const { code, message }: ResponseBody = await post(
|
||||||
code,
|
'/user/profile?action=email',
|
||||||
message,
|
{
|
||||||
}: ResponseBody = await post('/user/profile?action=email', {
|
new_email: email,
|
||||||
new_email: email,
|
password,
|
||||||
password,
|
},
|
||||||
})
|
)
|
||||||
await showModal({ mode: 'alert', text: message })
|
await showModal({ mode: 'alert', text: message })
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
window.location.href = `${blessing.base_url}/auth/login`
|
window.location.href = `${blessing.base_url}/auth/login`
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@ export default async function handler(event: Event) {
|
||||||
const form = event.target as HTMLFormElement
|
const form = event.target as HTMLFormElement
|
||||||
const nickname: string = form.nickname.value
|
const nickname: string = form.nickname.value
|
||||||
|
|
||||||
const {
|
const { code, message }: ResponseBody = await post(
|
||||||
code,
|
'/user/profile?action=nickname',
|
||||||
message,
|
{
|
||||||
}: ResponseBody = await post('/user/profile?action=nickname', {
|
new_nickname: nickname,
|
||||||
new_nickname: nickname,
|
},
|
||||||
})
|
)
|
||||||
showModal({ mode: 'alert', text: message })
|
showModal({ mode: 'alert', text: message })
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
document.querySelectorAll('[data-mark="nickname"]').forEach((el) => {
|
document.querySelectorAll('[data-mark="nickname"]').forEach((el) => {
|
||||||
|
|
|
||||||
|
|
@ -16,13 +16,13 @@ export default async function handler(event: Event) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const { code, message }: ResponseBody = await post(
|
||||||
code,
|
'/user/profile?action=password',
|
||||||
message,
|
{
|
||||||
}: ResponseBody = await post('/user/profile?action=password', {
|
current_password: oldPassword,
|
||||||
current_password: oldPassword,
|
new_password: newPassword,
|
||||||
new_password: newPassword,
|
},
|
||||||
})
|
)
|
||||||
await showModal({ mode: 'alert', text: message })
|
await showModal({ mode: 'alert', text: message })
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
window.location.href = `${blessing.base_url}/auth/login`
|
window.location.href = `${blessing.base_url}/auth/login`
|
||||||
|
|
|
||||||
|
|
@ -4,20 +4,11 @@
|
||||||
"baseUrl": "..",
|
"baseUrl": "..",
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/scripts/*": [
|
"@/scripts/*": ["./tests/ts-shims/*", "./src/scripts/*"],
|
||||||
"./tests/ts-shims/*",
|
"@/components/*": ["./src/components/*"],
|
||||||
"./src/scripts/*"
|
"@/views/*": ["./src/views/*"],
|
||||||
],
|
|
||||||
"@/components/*": [
|
|
||||||
"./src/components/*"
|
|
||||||
],
|
|
||||||
"@/views/*": [
|
|
||||||
"./src/views/*"
|
|
||||||
],
|
|
||||||
"@/*": ["./src/*"]
|
"@/*": ["./src/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["."]
|
||||||
"."
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user