Skip to content

Commit

Permalink
updates for invaild token issue
Browse files Browse the repository at this point in the history
  • Loading branch information
corina-coste committed Oct 12, 2023
1 parent 5872b3d commit a74f204
Show file tree
Hide file tree
Showing 17 changed files with 310 additions and 245 deletions.
4 changes: 4 additions & 0 deletions vue-argon-dashboard/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
VUE_APP_BASE_URL=
VUE_APP_API_BASE_URL=
VUE_APP_API_KEY=
VUE_APP_IS_DEMO=
9 changes: 4 additions & 5 deletions vue-argon-dashboard/src/assets/scss/argon.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/*!
=========================================================
* Vue Argon Dashboard - v1.0.0
* Vue Argon Dashboard Laravel - v1.0.0
=========================================================
* Product Page: https://www.creative-tim.com/product/argon-dashboard
* Copyright 2019 Creative Tim (https://www.creative-tim.com)
* Licensed under MIT (https://github.com/creativetimofficial/argon-dashboard/blob/master/LICENSE.md)
* Product Page: https://www.creative-tim.com/product/vue-argon-dashboard-laravel-bs4
* Copyright Creative Tim (https://www.creative-tim.com) & UPDIVISION (https://www.updivision.com)
* Coded by Creative Tim
* Coded by www.creative-tim.com & www.updivision.com
=========================================================
Expand Down
11 changes: 3 additions & 8 deletions vue-argon-dashboard/src/assets/scss/core/avatars/_avatar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,7 @@
background-size: cover;
}

.ct-image-icon {
background: url("/img/laravel-vue.svg");
background-size: cover;
width: 14px;
height: 35px;
margin-right: 8px;
margin-left: -7px;
display: inline-block;
.fab.fa-vuejs {
font-size: 130% !important;
color: #3cab79;
}
46 changes: 18 additions & 28 deletions vue-argon-dashboard/src/components/SidebarPlugin/SideBar.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<template>
<nav
class="navbar navbar-vertical fixed-left navbar-expand-md navbar-light bg-white"
id="sidenav-main"
>
<nav class="navbar navbar-vertical fixed-left navbar-expand-md navbar-light bg-white" id="sidenav-main">
<div class="container-fluid">
<!--Toggler-->
<navbar-toggle-button @click.native="showSidebar">
Expand All @@ -15,15 +12,8 @@
<slot name="mobile-right">
<ul class="nav align-items-center d-md-none">
<base-dropdown class="nav-item" position="right">
<a
slot="title"
class="nav-link nav-link-icon"
href="#"
role="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<a slot="title" class="nav-link nav-link-icon" href="#" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<i class="ni ni-bell-55"></i>
</a>

Expand All @@ -35,12 +25,9 @@
<base-dropdown class="nav-item" position="right">
<a href="#" slot="title" class="nav-link" @click.prevent>
<div class="media align-items-center">
<span
class="avatar avatar-sm rounded-circle avatar-image"
:style="{
'background-image': `url('${profileImage}')`,
}"
>
<span class="avatar avatar-sm rounded-circle avatar-image" :style="{
'background-image': `url('${profileImage}')`,
}">
</span>
</div>
</a>
Expand All @@ -61,11 +48,7 @@
</ul>
</slot>
<slot></slot>
<div
v-show="$sidebar.showSidebar"
class="navbar-collapse collapse show"
id="sidenav-collapse-main"
>
<div v-show="$sidebar.showSidebar" class="navbar-collapse collapse show" id="sidenav-collapse-main">
<div class="navbar-collapse-header d-md-none">
<div class="row">
<div class="col-6 collapse-brand">
Expand All @@ -74,9 +57,7 @@
</router-link>
</div>
<div class="col-6 collapse-close">
<navbar-toggle-button
@click.native="closeSidebar"
></navbar-toggle-button>
<navbar-toggle-button @click.native="closeSidebar"></navbar-toggle-button>
</div>
</div>
</div>
Expand Down Expand Up @@ -126,7 +107,16 @@ export default {
this.avatar = me.profile_image;
}
);
await this.$store.dispatch("profile/me");
try {
await this.$store.dispatch("profile/me");
} catch (error) {
try {
await this.$store.dispatch("logout");
} finally {
this.$router.push("/login");
}
}
},
computed: {
profileImage() {
Expand Down
12 changes: 10 additions & 2 deletions vue-argon-dashboard/src/components/SidebarPlugin/SidebarItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@
</template>
<template v-else>
<i :class="link.icon"></i>
<span class="nav-link-text">{{ link.name }} <b class="caret"></b></span>
<div v-if="link.name == 'Examples (API)'">
<span class="nav-link-text" style="color: #3cab79"
>{{ link.name }} <b class="caret"></b
></span>
</div>
<div v-else>
<span class="nav-link-text"
>{{ link.name }} <b class="caret"></b
></span>
</div>
</template>
</a>

Expand Down Expand Up @@ -51,7 +60,6 @@
:href="link.path"
>
<template v-if="addLink">
<span class="sidebar-mini">{{ linkPrefix }}</span>
<span class="nav-link-text">{{ link.name }}</span>
</template>
<template v-else>
Expand Down
2 changes: 1 addition & 1 deletion vue-argon-dashboard/src/layout/AuthLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
</li>
<li class="nav-item">
<a
href="http://blog.creative-tim.com"
href="https://blog.creative-tim.com"
class="nav-link"
target="_blank"
rel="noopener"
Expand Down
2 changes: 1 addition & 1 deletion vue-argon-dashboard/src/layout/ContentFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</li>
<li class="nav-item">
<a
href="http://blog.creative-tim.com"
href="https://blog.creative-tim.com"
class="nav-link"
target="_blank"
rel="noopener"
Expand Down
22 changes: 17 additions & 5 deletions vue-argon-dashboard/src/layout/DashboardLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
opened
:link="{
name: 'Examples (API)',
icon: 'ct-image-icon',
icon: 'fab fa-vuejs',
}"
>
<sidebar-item
Expand Down Expand Up @@ -61,10 +61,22 @@
}"
/>

<hr
class="my-3"
style="
border: 0;
border-top: 1px solid rgba(0, 0, 0, 0.1);
min-width: 80%;
overflow: visible;
box-sizing: content-box;
height: 0;
"
/>

<a
href="https://www.creative-tim.com/product/vue-argon-dashboard-pro-laravel-bs4"
target="_blank"
class="btn btn-sm btn-danger btn-icon ml-sm-3 d-none d-md-block mb-2 mt-1"
class="btn btn-danger btn-icon ml-sm-3 d-md-block mb-2 mt-1 mr-3"
><span class="btn-inner--icon"
><i class="fas fa-download mr-2"></i
></span>
Expand All @@ -74,7 +86,7 @@
<a
href="https://vue-argon-dashboard-laravel-bs4.creative-tim.com/documentation/"
target="_blank"
class="btn btn-sm btn-neutral btn-icon ml-sm-3 d-none d-md-block mb-2"
class="btn btn-neutral btn-icon ml-sm-3 d-md-block mb-2 mr-3"
><span class="btn-inner--icon"
><i class="fas fa-file-alt mr-2"></i
></span>
Expand All @@ -84,15 +96,15 @@
<a
href="https://www.creative-tim.com/product/vue-argon-dashboard-laravel-bs4"
target="_blank"
class="btn btn-sm btn-info btn-icon ml-sm-3 d-none d-md-block mb-2"
class="btn btn-info btn-icon ml-sm-3 d-md-block mb-2 mr-3"
><span class="btn-inner--icon"><i class="fas fa-gift mr-2"></i></span>
<span class="nav-link-inner--text">Download now</span></a
>

<a
href="https://github.com/creativetimofficial/vue-argon-dashboard-laravel-bs4"
target="_blank"
class="btn btn-sm btn-dark btn-icon ml-sm-3 d-none d-md-block mr-2"
class="btn btn-dark btn-icon ml-sm-3 d-md-block mr-2 mr-3"
><span class="btn-inner--icon"
><i class="fab fa-github mr-2"></i
></span>
Expand Down
11 changes: 10 additions & 1 deletion vue-argon-dashboard/src/layout/DashboardNavbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,16 @@ export default {
this.avatar = me.profile_image;
}
);
await this.$store.dispatch("profile/me");
try {
await this.$store.dispatch("profile/me");
} catch (error) {
try {
await this.$store.dispatch("logout");
} finally {
this.$router.push("/login");
}
}
},
computed: {
profileImage() {
Expand Down
12 changes: 7 additions & 5 deletions vue-argon-dashboard/src/main.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/*!
=========================================================
* Vue Argon Dashboard - v1.0.0
* Vue Argon Dashboard Laravel - v1.0.0
=========================================================
* Product Page: https://www.creative-tim.com/product/argon-dashboard
* Copyright 2019 Creative Tim (https://www.creative-tim.com)
* Licensed under MIT (https://github.com/creativetimofficial/argon-dashboard/blob/master/LICENSE.md)
* Product Page: https://www.creative-tim.com/product/vue-argon-dashboard-laravel-bs4
* Copyright Creative Tim (https://www.creative-tim.com) & UPDIVISION (https://www.updivision.com)
* Coded by Creative Tim
* Coded by www.creative-tim.com & www.updivision.com
=========================================================
Expand All @@ -23,7 +22,10 @@ import './registerServiceWorker'
import ArgonDashboard from './plugins/argon-dashboard'
import axios from "axios";
import VueAxios from "vue-axios";
import IsDemo from "./plugins/isDemo"

Vue.use(VueAxios, axios);
Vue.use(IsDemo);

Vue.config.productionTip = false

Expand Down
7 changes: 7 additions & 0 deletions vue-argon-dashboard/src/plugins/isDemo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const isDemoPlugin = {
install: (Vue) => {
Vue.prototype.$isDemo = process.env.VUE_APP_IS_DEMO || 0;
}
}

export default isDemoPlugin
Loading

0 comments on commit a74f204

Please sign in to comment.