Skip to content

Commit 0e9dbc7

Browse files
committed
make login registration in frontend
1 parent cc68748 commit 0e9dbc7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3786
-436
lines changed

backend/config/auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515

1616
'defaults' => [
17-
'guard' => 'web',
17+
'guard' => 'api',
1818
'passwords' => 'users',
1919
],
2020

backend/resources/views/oauth/callback.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<meta charset="utf-8">
44
<title>{{ config('app.name') }}</title>
55
<script>
6-
window.opener.postMessage({ token: "{{ $token }}" }, "{{ config('app.client_url') }}")
6+
window.opener.postMessage({ token: "{{ $token }}" }, "{{ config('app.client_url') }}");
77
window.close()
88
</script>
99
</head>

frontend/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ module.exports = {
1212
],
1313
// add your custom rules here
1414
rules: {}
15-
}
15+
};

frontend/assets/sass/_variables.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// // Body
2+
$body-bg: #f7f9fb;
3+
4+
// Cards
5+
$card-spacer-x: 0.9375rem;
6+
$card-spacer-y: 0.625rem;
7+
$card-cap-bg: #fbfbfb;
8+
$card-border-color: #e8eced;
9+
10+
// Borders
11+
$border-radius: .125rem;
12+
$border-radius-lg: .2rem;
13+
$border-radius-sm: .15rem;
14+
15+
// Nav Pills
16+
$nav-pills-border-radius: 0;

frontend/assets/sass/app.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@import 'variables';
2+
@import '~bootstrap/scss/bootstrap';
3+
@import '~sweetalert2/src/sweetalert2';
4+
@import '@fortawesome/fontawesome/styles.css';
5+
6+
@import 'elements/card';
7+
@import 'elements/navbar';
8+
@import 'elements/buttons';
9+
@import 'elements/transitions';
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.btn-loading {
2+
position: relative;
3+
pointer-events: none;
4+
color: transparent !important;
5+
6+
&:after {
7+
animation: spinAround 500ms infinite linear;
8+
border: 2px solid #dbdbdb;
9+
border-radius: 50%;
10+
border-right-color: transparent;
11+
border-top-color: transparent;
12+
content: "";
13+
display: block;
14+
height: 1em;
15+
width: 1em;
16+
position: absolute;
17+
left: calc(50% - (1em / 2));
18+
top: calc(50% - (1em / 2));
19+
}
20+
}
21+
22+
@keyframes spinAround {
23+
from { transform: rotate(0deg); }
24+
to { transform: rotate(359deg); }
25+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.card {
2+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
3+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.navbar {
2+
font-weight: 600;
3+
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
4+
}
5+
6+
.nav-item {
7+
.dropdown-menu {
8+
border: none;
9+
margin-top: .5rem;
10+
border-top: 1px solid #f2f2f2 !important;
11+
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.12), 0 2px 4px 0 rgba(0,0,0,0.08);
12+
}
13+
}
14+
15+
.nav-link {
16+
.svg-inline--fa {
17+
font-size: 1.4rem;
18+
}
19+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.page-enter-active,
2+
.page-leave-active {
3+
transition: opacity .2s;
4+
}
5+
.page-enter,
6+
.page-leave-to {
7+
opacity: 0;
8+
}
9+
10+
.fade-enter-active,
11+
.fade-leave-active {
12+
transition: opacity .15s
13+
}
14+
.fade-enter,
15+
.fade-leave-to {
16+
opacity: 0
17+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<template>
2+
<li class="nav-item dropdown">
3+
<a
4+
class="nav-link dropdown-toggle"
5+
href="#"
6+
role="button"
7+
data-toggle="dropdown"
8+
aria-haspopup="true"
9+
aria-expanded="false"
10+
>
11+
{{ locales[locale] }}
12+
</a>
13+
<div class="dropdown-menu">
14+
<a
15+
v-for="(value, key) in locales"
16+
:key="key"
17+
class="dropdown-item"
18+
href="#"
19+
@click.prevent="setLocale(key)"
20+
>
21+
{{ value }}
22+
</a>
23+
</div>
24+
</li>
25+
</template>
26+
27+
<script>
28+
import { mapGetters } from 'vuex'
29+
import { loadMessages } from '~/plugins/i18n'
30+
31+
export default {
32+
computed: mapGetters({
33+
locale: 'lang/locale',
34+
locales: 'lang/locales'
35+
}),
36+
37+
methods: {
38+
setLocale(locale) {
39+
if (this.$i18n.locale !== locale) {
40+
loadMessages(locale)
41+
42+
this.$store.dispatch('lang/setLocale', { locale })
43+
}
44+
}
45+
}
46+
}
47+
</script>

0 commit comments

Comments
 (0)