Skip to content

Commit 6e9c04a

Browse files
authored
Merge branch 'development' into feature/100-create-app-index
2 parents dd6918e + 05fe743 commit 6e9c04a

File tree

4 files changed

+87
-73
lines changed

4 files changed

+87
-73
lines changed

src/components/BottomSheetLayer.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
v-model="layer"
44
persistent
55
scrollable
6+
no-click-animation
67
:fullscreen="fullscreen"
78
>
89
<v-card class="Layer">

src/components/EditingScreen.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<v-bottom-sheet v-model="screen" persistent scrollable>
2+
<v-bottom-sheet v-model="screen" no-click-animation persistent scrollable>
33
<v-card class="EditingScreen">
44
<v-card-title class="EditingScreen-CardElements">
55
<v-container class="EditingScreen-Container">

src/components/SimpleBottomSheet.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
persistent
66
scrollable
77
hide-overlay
8+
no-click-animation
89
>
910
<v-card class="card">
1011
<v-card-title class="card-title" />

src/pages/account/login.vue

Lines changed: 84 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,88 @@
11
<template>
2-
<div class="LoginPage">
3-
<v-flex>
4-
<div class="Logo">
5-
<Logo style="height: 80vw; max-height: 350px; width: 100%;" />
6-
</div>
7-
<div class="LoginForm">
8-
<v-form>
9-
<v-text-field
10-
v-model="email"
11-
:counter="32"
12-
label="email"
13-
outlined
14-
dark
15-
prepend-icon="mdi-email"
16-
/>
17-
<v-text-field
18-
v-model="password"
19-
:append-icon="showPassword ? 'mdi-eye' : 'mdi-eye-off'"
20-
:type="showPassword ? 'text' : 'password'"
21-
:counter="32"
22-
label="Password"
23-
outlined
24-
dark
25-
prepend-icon="mdi-lock"
26-
@click:append="showPassword = !showPassword"
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"
2739
/>
2840
<v-btn
29-
block
30-
outlined
31-
color="white"
32-
height="40px"
33-
:loading="loading"
3441
:disabled="loading"
35-
@click="doLogin"
42+
block
43+
class="button"
44+
color="#ffffff"
45+
height="60px"
46+
text
47+
to="/"
3648
>
37-
LOGIN
49+
<span>パスワードを忘れた方へ</span>
3850
</v-btn>
39-
</v-form>
40-
</div>
41-
</v-flex>
51+
</div>
52+
</template>
53+
</bottom-sheet-layer>
54+
<v-snackbar :timeout="5000" :value="error" absolute top color="#C01B61">
55+
メールアドレスまたはパスワードが正しくありません
56+
</v-snackbar>
4257
</div>
4358
</template>
4459

4560
<script lang="ts">
4661
import Vue from 'vue'
47-
import { vxm } from '@/store'
62+
import BottomSheetLayer from '@/components/BottomSheetLayer.vue'
63+
import ActionButton from '@/components/ActionButton.vue'
64+
import InputField from '@/components/InputField.vue'
4865
import firebase from '@/plugins/firebase'
49-
import Logo from '@/assets/svgs/logo.svg'
50-
51-
export type DataType = {
52-
email: string
53-
password: string
54-
showPassword: boolean
55-
loading: boolean
56-
}
66+
import { vxm } from '~/store'
5767
5868
export default Vue.extend({
59-
components: {
60-
Logo
61-
},
62-
data(): DataType {
69+
components: { BottomSheetLayer, ActionButton, InputField },
70+
layout: 'background',
71+
data() {
6372
return {
6473
email: '',
6574
password: '',
66-
showPassword: false,
67-
loading: false
75+
loading: false,
76+
error: false
77+
}
78+
},
79+
computed: {
80+
disableLogin(): boolean {
81+
return !(
82+
this.email &&
83+
this.password &&
84+
this.email.match(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/)
85+
)
6886
}
6987
},
7088
methods: {
@@ -77,36 +95,30 @@ export default Vue.extend({
7795
vxm.user.login()
7896
this.$router.push('/edit')
7997
})
80-
.catch(error => {
98+
.catch(() => {
8199
this.loading = false
82-
alert(error)
100+
this.error = true
83101
})
84102
}
85103
}
86104
})
87105
</script>
88106

89107
<style lang="scss" scoped>
90-
.LoginPage {
108+
.SignIn-ItemTitle {
109+
font-size: 16px;
110+
font-weight: bold;
111+
color: $color-white;
91112
text-align: center;
92-
.Logo {
93-
text-align: center;
94-
}
95-
.LoginTitle {
96-
color: #fff;
97-
font-family: 'Noto Sans JP', sans-serif;
98-
font-size: 5em;
99-
}
100-
.DataBlock {
101-
margin: 0 -12px;
102-
.studycard {
103-
margin-bottom: 20px;
104-
}
105-
}
106-
.LoginForm {
107-
width: 90%;
108-
max-width: 600px;
109-
margin: 50px auto;
110-
}
113+
margin: 4px 0;
114+
}
115+
.SignIn-Item {
116+
margin: 20px 0;
117+
}
118+
.SignIn-ButtonOuter {
119+
justify-content: space-between;
120+
}
121+
.SignIn-Button {
122+
flex: 0 1 48%;
111123
}
112124
</style>

0 commit comments

Comments
 (0)