Skip to content

Commit fa7fd9c

Browse files
committed
💄 b3log#130 test
1 parent d5cb3d8 commit fa7fd9c

4 files changed

Lines changed: 26 additions & 6 deletions

File tree

‎console/pages/admin/settings/account/index.vue‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
v-model="password"
88
type="password"
99
:rules="requiredRules"
10+
required
1011
@keyup.ctrl.13="passwordUpdate"
1112
@keyup.meta.13="passwordUpdate"
1213
></v-text-field>
13-
1414
<div class="alert alert--danger" v-show="errorPassword">
1515
<v-icon>danger</v-icon>
1616
<span>{{ errorPasswordMsg }}</span>
@@ -29,19 +29,27 @@
2929
v-model="avatarURL"
3030
:rules="avatarRules"
3131
:counter="255"
32+
required
3233
@keyup.ctrl.13="accountUpdate"
3334
@keyup.meta.13="accountUpdate"
3435
></v-text-field>
3536

3637
<v-text-field
3738
label="B3log Key"
3839
v-model="b3key"
39-
:rules="requiredRules"
4040
:counter="20"
4141
@keyup.ctrl.13="accountUpdate"
4242
@keyup.meta.13="accountUpdate"
4343
></v-text-field>
4444

45+
<div class="fn-clear">
46+
<a
47+
class="fn-right"
48+
href="https://hacpai.com/settings/b3"
49+
target="_blank">
50+
{{ $t('check', $store.state.locale) }}/{{ $t('setting', $store.state.locale) }} B3log Key
51+
</a>
52+
</div>
4553
<div class="alert alert--danger" v-show="error">
4654
<v-icon>danger</v-icon>
4755
<span>{{ errorMsg }}</span>

‎console/pages/init.vue‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="ft-center login__content fn-flex" v-if="account===''">
88
<div class="fn-flex-1">
99
<a class="card card--dark login__image"
10-
href="https://hacpai.com"
10+
href="https://hacpai.com/login"
1111
target="_blank">
1212
<v-icon>hacpai-logo</v-icon>
1313
</a>
@@ -43,6 +43,7 @@
4343
:rules="requiredRules"
4444
required
4545
type="password"
46+
@keyup.13="goStep2"
4647
></v-text-field>
4748
</v-form>
4849
<div class="alert alert--danger" v-show="registerError">
@@ -78,6 +79,7 @@
7879
:counter="20"
7980
:rules="b3keyRules"
8081
required
82+
@keyup.13="init"
8183
></v-text-field>
8284
<a
8385
class="init__help"

‎console/pages/login.vue‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div class="ft-center login__content fn-flex" v-if="account===''">
66
<div class="fn-flex-1">
77
<a class="card card--dark login__image"
8-
href="https://hacpai.com"
8+
href="https://hacpai.com/login"
99
target="_blank">
1010
<v-icon>hacpai-logo</v-icon>
1111
</a>
@@ -41,6 +41,7 @@
4141
:rules="requiredRules"
4242
required
4343
type="password"
44+
@keyup.13="login"
4445
></v-text-field>
4546
</v-form>
4647
<div class="alert alert--danger" v-show="error">
@@ -95,6 +96,10 @@
9596
if (responseData.code === 0) {
9697
this.$set(this, 'error', false)
9798
this.$set(this, 'errorMsg', '')
99+
const stateResponseData = await this.axios.get('/status')
100+
if (stateResponseData) {
101+
this.$store.commit('setStatus', stateResponseData)
102+
}
98103
this.$router.push(this.$route.query.goto || '/')
99104
} else {
100105
this.$set(this, 'error', true)

‎console/pages/register.vue‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<div class="ft-center login__content fn-flex" v-if="account===''">
66
<div class="fn-flex-1">
77
<a class="card card--dark login__image"
8-
href="https://hacpai.com"
8+
href="https://hacpai.com/register"
99
target="_blank">
1010
<v-icon>hacpai-logo</v-icon>
1111
</a>
12-
<a class="login__link" href="https://hacpai.com/login"
12+
<a class="login__link" href="https://hacpai.com/register"
1313
target="_blank">
1414
{{ $t('useHacpaiInit', $store.state.locale) }}
1515
</a>
@@ -41,6 +41,7 @@
4141
:rules="requiredRules"
4242
required
4343
type="password"
44+
@keyup.13="register"
4445
></v-text-field>
4546
</v-form>
4647
<div class="alert alert--danger" v-show="error">
@@ -96,6 +97,10 @@
9697
if (responseData.code === 0) {
9798
this.$set(this, 'error', false)
9899
this.$set(this, 'errorMsg', '')
100+
const stateResponseData = await this.axios.get('/status')
101+
if (stateResponseData) {
102+
this.$store.commit('setStatus', stateResponseData)
103+
}
99104
this.$router.push(this.$route.query.goto || '/')
100105
} else {
101106
this.$set(this, 'error', true)

0 commit comments

Comments
 (0)