Skip to content

#update: #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/App-main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,24 @@

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { LoginModule } from "./store/modules/login";
import { generalInfo } from "./store/modules/generalApp";
import { DrawingModule } from "./store/modules/userDrawing";
@Component
export default class AppMain extends Vue {}
export default class AppMain extends Vue {
// declare module
public get isLogged() {
return LoginModule.isLogged;
}

public get listNodes() {
return DrawingModule.listNodes;
}

public get isCollapseMenu() {
return generalInfo.isCollapse;
}
}
</script>

<style scoped></style>
162 changes: 81 additions & 81 deletions src/assets/style/general/_general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,105 +78,105 @@
width: 100%;
height: calc(100vh - 48px);
position: relative;
}

.pPopupDetail {
position: absolute;
top: 0;
left: 0;
padding: 0;
max-width: 240px;
@include size(100%, 100%);
background-color: var(--color-light-2);
border-left: 1px solid hsla(240, 1%, 85%, 0.5);
box-shadow: 12px 0 24px rgba(0, 0, 0, 0.1);
z-index: 10;

&-title {
margin: 4px 0 0;
}
.pPopupDetail {
position: absolute;
top: 0;
left: 0;
padding: 0;
max-width: 240px;
@include size(100%, 100%);
background-color: var(--color-light-2);
border-left: 1px solid hsla(240, 1%, 85%, 0.5);
box-shadow: 12px 0 24px rgba(0, 0, 0, 0.1);
z-index: 10;

&-title {
margin: 4px 0 0;
}

&-header {
position: relative;
}
&-header {
position: relative;
}

&-iClose {
color: var(--color-dark);
background: var(--color-light);
@include size(24px, 24px);
border-radius: 8px;
transition: all 0.15s ease-out;
&-iClose {
color: var(--color-dark);
background: var(--color-light);
@include size(24px, 24px);
border-radius: 8px;
transition: all 0.15s ease-out;

&:hover {
color: var(--color-red);
background: white;
&:hover {
color: var(--color-red);
background: white;
}
}
}

.form {
height: calc(100% - 98px);
border-bottom: 1px solid var(--color-light);
padding: 0 8px 8px;
.form {
height: calc(100% - 98px);
border-bottom: 1px solid var(--color-light);
padding: 0 8px 8px;

.el-form-item {
margin-bottom: 0;
.el-form-item {
margin-bottom: 0;
}
}
}

.header {
margin: 12px 8px;
color: var(--color-dark);
@extend .flex-row__between;
}
.header {
margin: 12px 8px;
color: var(--color-dark);
@extend .flex-row__between;
}

.el-form-item__content {
line-height: initial;
border-bottom: 1px solid var(--color-light);
padding: 4px 0 12px;
.el-form-item__content {
line-height: initial;
border-bottom: 1px solid var(--color-light);
padding: 4px 0 12px;

.label {
width: 100%;
font-size: 13px;
margin-bottom: 4px;
display: block;
}
.label {
width: 100%;
font-size: 13px;
margin-bottom: 4px;
display: block;
}

.el-input__inner {
border-radius: 4px;
height: 32px;
line-height: 32px;
padding: 0 8px;
.el-input__inner {
border-radius: 4px;
height: 32px;
line-height: 32px;
padding: 0 8px;

&:focus {
background: white !important;
border-color: transparent !important;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
&:focus {
background: white !important;
border-color: transparent !important;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}
}
}
}

.actions {
padding: 8px;
background-color: white;
@extend .flex-row__between;

button {
height: 32px;
display: flex;
align-items: center;
padding: 0 20px;
border: none;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
}
.actions {
padding: 8px;
background-color: white;
@extend .flex-row__between;

button {
height: 32px;
display: flex;
align-items: center;
padding: 0 20px;
border: none;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
}

.btnSave {
background: var(--color-blue);
}
.btnSave {
background: var(--color-blue);
}

.btnDelete {
background: rgba(229, 77, 66, 0.2);
color: var(--color-red);
box-shadow: none;
.btnDelete {
background: rgba(229, 77, 66, 0.2);
color: var(--color-red);
box-shadow: none;
}
}
}
}
4 changes: 3 additions & 1 deletion src/assets/style/index.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
@import "./mixins/variable";
@import "./mixins/_mixin";
@import "./mixins/mixin";
@import "./mixins/animation";

@import "./general/base";
@import "./general/layout";
@import "./general/general";

@import "./page/login";
67 changes: 67 additions & 0 deletions src/assets/style/page/_login.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
.pLogin {
height: 100vh;
width: 100%;
background: #20a8d8 !important;
font-family: "Nunito", sans-serif;

.pHeader {
font-size: 55px;
font-family: "Nunito", sans-serif;
font-weight: 700;
}

&-scroll {
width: 100%;
height: calc(100% - 20px);
padding: 50px 38px 125px 38px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

.leftSection {
color: #ffffff;

.logo-lv1 {
width: 200px;
}

.tt-2 {
font-size: 20px;
opacity: 0.8;
width: 80%;
}
}

.rightSection {
max-width: 500px;
width: 40%;
height: 100%;
box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.2),
0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12);
background-color: #fff;
min-width: 350px;
position: relative;
overflow: hidden;
-webkit-overflow-scrolling: touch;
border-radius: 8px 0 0px 8px;

.logo-lv2 {
width: 150px;
margin-top: -25px;
}

.title {
font-size: 18px;
text-align: center;
margin: 20px 0 10px 0;
margin-top: -15px;
}

.btnSubmit {
width: 100%;
background-color: #039be5;
}
}
}
8 changes: 4 additions & 4 deletions src/config/auth.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
export default {
saveToken(token: string) {
return localStorage.setItem("bus_token", token);
return localStorage.setItem("aquaDraw_token", token);
},

removeToken() {
return localStorage.removeItem("bus_token");
return localStorage.removeItem("aquaDraw_token");
},

checkIsAuthenticated: function() {
let tokenDataStr = localStorage.getItem("bus_token");
let tokenDataStr = localStorage.getItem("aquaDraw_token");
return Promise.resolve(tokenDataStr);
},

getToken() {
let tokenStr = localStorage.getItem("bus_token");
let tokenStr = localStorage.getItem("aquaDraw_token");
return tokenStr || null;
},

Expand Down
6 changes: 3 additions & 3 deletions src/config/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ axios.interceptors.request.use(
: store.dispatch("LOGOUT");
});
// config progressbar start
temp === 0 && new Vue().$Progress.start();
temp === 0 && app.$Progress.start();
temp++;
// config data not auto convert to json data that convert to type object[key]=value
config.paramsSerializer = (params: any) => {
Expand All @@ -39,13 +39,13 @@ axios.interceptors.response.use(
(response: any) => {
// config progressbar finish
temp--;
temp === 0 && new Vue().$Progress.finish();
temp === 0 && app.$Progress.finish();

return response.data;
},
(error: any) => {
temp--;
temp === 0 && new Vue().$Progress.fail();
temp === 0 && app.$Progress.fail();

if (error.response.status === 500) {
new Vue().$messageError("Server errors! Try again!");
Expand Down
Loading