-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Billing-Wise/K5P-59/feat/인증
[feat] 인증 및 인가 기능 구현
- Loading branch information
Showing
17 changed files
with
547 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<template> | ||
<div class="auth-input"> | ||
<p class="title">{{title}}</p> | ||
<div class="main-box"> | ||
<input :type="inputType" :value="modelValue" @input="$emit('update:modelValue', $event.target.value)"> | ||
<button @click="clickFunc">{{buttonTitle}}</button> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'AuthBtnInputVue', | ||
props: { | ||
'title' : String, | ||
'inputType': String, | ||
'buttonTitle': String, | ||
'modelValue': String, | ||
'clickFunc' : Function | ||
}, | ||
emits: ['update:modelValue'] | ||
} | ||
</script> | ||
|
||
<style lang='scss' scoped> | ||
.auth-input { | ||
width: 100%; | ||
margin-bottom: 5px; | ||
.title { | ||
font-weight: bold; | ||
margin: 5px 0px | ||
}; | ||
.main-box { | ||
@include flex-box(row, space-between, 0px); | ||
} | ||
} | ||
.main-box { | ||
input { | ||
@include base-input(70%, 16px) | ||
} | ||
button { | ||
@include base-button(25%, 16px); | ||
background-color: $theme-color; | ||
border: none; | ||
color : white; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,33 @@ | ||
<template> | ||
<div class="auth-input"> | ||
<p>{{title}}</p> | ||
<input :type="inputType"> | ||
<input :type="inputType" :value="modelValue" @input="$emit('update:modelValue', $event.target.value)"> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'AuthInputVue', | ||
props: { | ||
"title" : String, | ||
"inputType": String | ||
} | ||
'title' : String, | ||
'inputType': String, | ||
'modelValue': String | ||
}, | ||
emits: ['update:modelValue'] | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
<style lang='scss' scoped> | ||
.auth-input { | ||
width: 100%; | ||
margin-bottom: 5px; | ||
p { | ||
font-weight: bold; | ||
margin: 5px 0px | ||
}; | ||
input { | ||
box-sizing: border-box; | ||
width: 100%; | ||
font-weight: bold; | ||
padding: 12px 20px; | ||
border: none ; | ||
border-radius: 5px; | ||
box-shadow: 0px 1px 4px 1px rgb(0, 0, 0, 0.20); | ||
transition: all 0.3s; | ||
&:focus { | ||
outline: none; | ||
box-shadow: 0px 1px 5px 1px rgb(0, 0, 0, 0.5); | ||
} | ||
@include base-input(100%, 16px) | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { defineStore } from 'pinia' | ||
|
||
export const useAuthStore = defineStore('signup', { | ||
state() { | ||
return { | ||
email: '', | ||
phone: '', | ||
password: '', | ||
name: '', | ||
authCode: '', | ||
} | ||
}, | ||
actions: { | ||
login() { | ||
this.isLoggedIn = true | ||
}, | ||
logout() { | ||
this.isLoggedIn = false | ||
} | ||
}, | ||
persist: { | ||
enabled: true, | ||
strategies: [ | ||
{ | ||
storage: sessionStorage, | ||
paths: ['isLoggedIn'] | ||
} | ||
] | ||
} | ||
}) |
Oops, something went wrong.