Przeglądaj źródła

Finish logout section

tags/v0.1.0
Immanuel Onyeka 3 lat temu
rodzic
commit
7bc49d4d4f
4 zmienionych plików z 39 dodań i 2 usunięć
  1. +9
    -2
      resources/js/panel/panel.vue
  2. +13
    -0
      resources/scss/_vars.scss
  3. +15
    -0
      resources/scss/main.scss
  4. +2
    -0
      routes/web.php

+ 9
- 2
resources/js/panel/panel.vue Wyświetl plik

@@ -63,8 +63,11 @@
<img class="nav-btn" src="../../images/arrow-right-circle-fill.svg" alt="">
</section>
</div>
<div d="main" v-else-if="active === '#exit'">
<div class="actions"><a class="new-order" href="#orders/new">New</a></div>
<div id="main" v-else-if="active === '#exit'">
<section class="logout-pane">
<h3>Are you sure you want to logout?</h3>
<a href="/logout">Logout</a>
</section>
</div>
</transition>
</template>
@@ -80,6 +83,10 @@ function toggleOrderItem(event) {
event.target.parentNode.parentNode.classList.toggle('selected')
}

function logout(event) {
event.target.parentNode.parentNode.classList.toggle('selected')
}

export default {
components: {
Sidebar,


+ 13
- 0
resources/scss/_vars.scss Wyświetl plik

@@ -91,6 +91,19 @@ $theme-colors: (
}
}

@mixin inverting-button($primary, $background) {
text-align: center;
border: 2px solid $primary;
border-radius: 4px;
padding: 10px;
background-color: $background;
color: $primary;
&:hover {
background-color: $primary;
color: $background;
}
}

// A button with a white background and specified accent color that reverses on hover
@mixin brand-button($col) {
width: 10em;


+ 15
- 0
resources/scss/main.scss Wyświetl plik

@@ -867,3 +867,18 @@ main.panel {
background-color: vars.getColor('light-blue');
}
}

.logout-pane {
margin-top: 25%;
text-align: center;
height: 10em;
a {
display: block;
// vertical-align: center;
margin: auto;
margin-top: 2em;
height: 1.3em;
width: 5em;
@include vars.inverting-button(black, white);
}
}

+ 2
- 0
routes/web.php Wyświetl plik

@@ -62,3 +62,5 @@ Route::get('/panel/user', function (Request $request) {
Route::get('/panel/orders', [UserController::class,
'getOrders'])->middleware('auth');

Route::get('/logout', [UserController::class,
'logout'])->middleware('auth');

Ładowanie…
Anuluj
Zapisz