Skip to content

Commit d293588

Browse files
committed
ErrorのSnackBarを追加
1 parent 73ad8dc commit d293588

File tree

1 file changed

+59
-49
lines changed

1 file changed

+59
-49
lines changed

src/pages/account/login.vue

Lines changed: 59 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,60 @@
11
<template>
2-
<bottom-sheet-layer fullscreen title="ログインしてください" title-en="LOGIN">
3-
<template v-slot:LayerContents>
4-
<dl>
5-
<dt class="SignIn-ItemTitle">メールアドレス</dt>
6-
<dd class="SignIn-Item">
7-
<input-field
8-
v-model="email"
9-
10-
require
11-
type="email"
2+
<div>
3+
<bottom-sheet-layer
4+
fullscreen
5+
title="ログインしてください"
6+
title-en="LOGIN"
7+
>
8+
<template v-slot:LayerContents>
9+
<dl>
10+
<dt class="SignIn-ItemTitle">メールアドレス</dt>
11+
<dd class="SignIn-Item">
12+
<input-field
13+
v-model="email"
14+
15+
require
16+
type="email"
17+
/>
18+
</dd>
19+
<dt class="SignIn-ItemTitle">パスワード</dt>
20+
<dd class="SignIn-Item">
21+
<input-field
22+
v-model="password"
23+
label="パスワード"
24+
require
25+
type="password"
26+
/>
27+
</dd>
28+
</dl>
29+
</template>
30+
<template v-slot:LayerFooter>
31+
<div class="SignIn-ButtonOuter">
32+
<action-button
33+
:is-disabled="disableLogin"
34+
:is-loading="loading"
35+
class="SignIn-Button"
36+
text="ログイン"
37+
theme="primary"
38+
@click="doLogin"
1239
/>
13-
</dd>
14-
<dt class="SignIn-ItemTitle">パスワード</dt>
15-
<dd class="SignIn-Item">
16-
<input-field
17-
v-model="password"
18-
label="パスワード"
19-
require
20-
type="password"
21-
/>
22-
</dd>
23-
</dl>
24-
</template>
25-
<template v-slot:LayerFooter>
26-
<div class="SignIn-ButtonOuter">
27-
<action-button
28-
:is-disabled="disableLogin"
29-
:is-loading="loading"
30-
class="SignIn-Button"
31-
text="ログイン"
32-
theme="primary"
33-
@click="doLogin"
34-
/>
35-
<v-btn
36-
:disabled="loading"
37-
block
38-
class="button"
39-
color="#ffffff"
40-
height="60px"
41-
text
42-
to="/"
43-
>
44-
<span>パスワードを忘れた方へ</span>
45-
</v-btn>
46-
</div>
47-
</template>
48-
</bottom-sheet-layer>
40+
<v-btn
41+
:disabled="loading"
42+
block
43+
class="button"
44+
color="#ffffff"
45+
height="60px"
46+
text
47+
to="/"
48+
>
49+
<span>パスワードを忘れた方へ</span>
50+
</v-btn>
51+
</div>
52+
</template>
53+
</bottom-sheet-layer>
54+
<v-snackbar :timeout="5000" :value="error" absolute top color="#C01B61">
55+
メールアドレスまたはパスワードが正しくありません
56+
</v-snackbar>
57+
</div>
4958
</template>
5059

5160
<script lang="ts">
@@ -63,7 +72,8 @@ export default Vue.extend({
6372
return {
6473
email: '',
6574
password: '',
66-
loading: false
75+
loading: false,
76+
error: false
6777
}
6878
},
6979
computed: {
@@ -85,9 +95,9 @@ export default Vue.extend({
8595
vxm.user.login()
8696
this.$router.push('/edit')
8797
})
88-
.catch(error => {
98+
.catch(() => {
8999
this.loading = false
90-
alert(error)
100+
this.error = true
91101
})
92102
}
93103
}

0 commit comments

Comments
 (0)