Skip to content
Closed
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
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VUE_APP_CLIENT_ID= 581cd1a745e24eef5fef
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need push .env file to GitHub put it in .gitignore.

VUE_APP_CLIENT_SECRET= e94daf563c49e2d0526106d558b1209756d25d31
32 changes: 32 additions & 0 deletions src/components/newBadge/Buttons.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<div>
<v-layout justify-center row>
<v-btn-group class = "buttongroup"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v-btn-group has no closing tag giving an error at console on execution.

<v-btn class = "button">
<i class="fas fa-mouse-pointer"></i>
</v-btn>
<v-btn class = "button">
<i class="fas fa-pen"></i>
</v-btn>
<v-btn class = "button">
<i class="fas fa-eraser"></i>
</v-btn>
<v-btn class = "button">
<i class="fas fa-square"></i>
</v-btn>
<v-btn class = "button">
<i class="fas fa-circle"></i>
</v-btn>
<v-btn class = "button">
<i class="fas fa-magic"></i>
</v-btn>
<v-btn>T</v-btn>
</v-layout>
</div>
</template>

<style>
.button {
padding: 0px, 5px;
}
</style>
89 changes: 49 additions & 40 deletions src/router.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,49 @@
import Vue from 'vue';
import Router from 'vue-router';
import AuthView from './views/AuthView';
import HomeView from './views/HomeView';
import OrgView from './views/OrgView';
import AuthService from './services/authService';

Vue.use(Router);

const authService = new AuthService();

export default new Router({
routes: [
{
path: '',
redirect: 'auth'
},
{
path: '/auth',
name: 'authView',
component: AuthView
},
{
path: '/home',
name: 'homeView',
component: HomeView,
beforeEnter: (to, from, next) => {
next(authService.isLoggedIn());
}
},
{
path: '/org/:name',
name: 'orgView',
component: OrgView,
beforeEnter: (to, from, next) => {
next(authService.isLoggedIn());
}
}
]
});
import Vue from 'vue';
import Router from 'vue-router';
import AuthView from './views/AuthView';
import HomeView from './views/HomeView';
import OrgView from './views/OrgView';
import NewBadge from './views/NewBadge';
import AuthService from './services/authService';

Vue.use(Router);

const authService = new AuthService();

export default new Router({
routes: [
{
path: '',
redirect: 'auth'
},
{
path: '/auth',
name: 'authView',
component: AuthView
},
{
path: '/home',
name: 'homeView',
component: HomeView,
beforeEnter: (to, from, next) => {
next(authService.isLoggedIn());
}
},
{
path:'/newBadge',
name: 'newBadge',
component: NewBadge,
beforeEnter: (to, from, next) => {
next(authService.isLoggedIn());
}
},
{
path: '/org/:name',
name: 'orgView',
component: OrgView,
beforeEnter: (to, from, next) => {
next(authService.isLoggedIn());
},
}
]
});
21 changes: 17 additions & 4 deletions src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
<div>
<v-layout class="ma-5" justify-center>
<div v-if="!isLoading">
<v-btn style="margin-bottom: 30px;">
<a href="#/newbadge">Create a New Badge</a>
</v-btn>
<UserDetails/>
<div class="mt-5 orgs">Organizations</div>
<div class="mt-5 orgs">
<center>Organizations</center></div>
<OrgList/>
</div>
<div v-if="isLoading">
Expand Down Expand Up @@ -38,7 +42,16 @@ export default {
</script>

<style lang="scss" scoped>
.orgs {
.orgs {
font-size: 20px;
}
</style>
}

A {
color: inherit !important;
text-decoration: none !important;
font-size: inherit !important;
font-family: inherit !important;
font-weight: inherit !important;
line-height: inherit !important;
}
</style>
54 changes: 54 additions & 0 deletions src/views/NewBadge.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<template>
<body style ="background-image: url('https://png.pngtree.com/thumb_back/fh260/background/20190331/pngtree-vector-white-abstract-background-design-templates-collection-wit-image_94438.jpg'); background-repeat: repeat;">
<div class = "mt-5 orgs">
<h1 style ="font-family: georgia; font-size: 45px;">
<center>
<b>Create a New Badge!</b>
</center>
</h1>
<h2 style ="margin-bottom: 30px; font-family: georgia; font-size: 25px;">
<center>
<b>Design your own badge for your organization.</b>
</center>
</h2>
<Buttons/>
<v-layout style="margin: 10px;" justify-center="">
<canvas id = "newCanvas" width="900" height="600">
</canvas>
</v-layout>
</div>
</body>
</template>

<script>
import Buttons from '../components/newBadge/Buttons';

export default {
name: 'NewBadge',
components: {
Buttons
}
}

function draw() {
var canvas = document.getElementById('newCanvas');
if (canvas.getContext) {
var ctx = newCanvas.getContext('2d');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shall be canvas not newCanvas here.

}
}
</script>

<style>
canvas {
background-color: white;
margin: auto;
display: block;
border: 2px solid gray;
border-radius: 2px;
}

.title {
padding: 20px;
font-size: 80px;
}
</style>