Skip to content
Snippets Groups Projects
Commit 8ed988f4 authored by VIktorGrev's avatar VIktorGrev
Browse files
parents 6e460317 462c6237
No related branches found
No related tags found
No related merge requests found
Pipeline #274307 failed
image: node:alpine # Much smaller than other variants, faster and more resource effective
stages: stages:
- install - install_dependencies
- build - lint
- build_project
cache: cache:
key: "${CI_COMMIT_REF_SLUG}" # Branch-specific cache keys to have separate caches across branches.
paths: paths:
- node_modules/ - node_modules/
key: "$CI_BUILD_REF_NAME" # Separate cache for each branch
install_dependencies: install_dependencies:
stage: install stage: install_dependencies
image: node:latest
script: script:
- npm install - npm install
lint:
stage: lint
script:
- npm run lint
allow_failure: true
build_project: build_project:
stage: build stage: build_project
image: node:latest
script: script:
- npm run build - npm run build
\ No newline at end of file
...@@ -21,7 +21,7 @@ export type OpenAPIConfig = { ...@@ -21,7 +21,7 @@ export type OpenAPIConfig = {
export const OpenAPI: OpenAPIConfig = { export const OpenAPI: OpenAPIConfig = {
BASE: 'http://localhost:8080', BASE: 'http://localhost:8080',
VERSION: '0', VERSION: '3.0',
WITH_CREDENTIALS: false, WITH_CREDENTIALS: false,
CREDENTIALS: 'include', CREDENTIALS: 'include',
TOKEN: undefined, TOKEN: undefined,
......
...@@ -6,3 +6,10 @@ export { ApiError } from './core/ApiError'; ...@@ -6,3 +6,10 @@ export { ApiError } from './core/ApiError';
export { CancelablePromise, CancelError } from './core/CancelablePromise'; export { CancelablePromise, CancelError } from './core/CancelablePromise';
export { OpenAPI } from './core/OpenAPI'; export { OpenAPI } from './core/OpenAPI';
export type { OpenAPIConfig } from './core/OpenAPI'; export type { OpenAPIConfig } from './core/OpenAPI';
export type { AuthenticationResponse } from './models/AuthenticationResponse';
export type { ExceptionResponse } from './models/ExceptionResponse';
export type { LoginRequest } from './models/LoginRequest';
export type { SignUpRequest } from './models/SignUpRequest';
export { AuthenticationService } from './services/AuthenticationService';
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type AuthenticationResponse = {
firstName?: string;
lastName?: string;
role?: string;
token?: string;
};
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ExceptionResponse = {
status?: number;
message?: string;
};
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type LoginRequest = {
email?: string;
password?: string;
};
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type SignUpRequest = {
firstName?: string;
lastName?: string;
email?: string;
password?: string;
changeWilling?: string;
experience?: string;
challenges?: Array<string>;
};
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AuthenticationResponse } from '../models/AuthenticationResponse';
import type { LoginRequest } from '../models/LoginRequest';
import type { SignUpRequest } from '../models/SignUpRequest';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class AuthenticationService {
/**
* User Signup
* Sign up a new user
* @returns AuthenticationResponse Successfully signed up
* @throws ApiError
*/
public static signup({
requestBody,
}: {
requestBody: SignUpRequest,
}): CancelablePromise<AuthenticationResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/auth/signup',
body: requestBody,
mediaType: 'application/json',
errors: {
409: `Email already exists`,
},
});
}
/**
* User Login
* Log in with an existing user
* @returns AuthenticationResponse Successfully logged in
* @throws ApiError
*/
public static login({
requestBody,
}: {
requestBody: LoginRequest,
}): CancelablePromise<AuthenticationResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/auth/login',
body: requestBody,
mediaType: 'application/json',
errors: {
401: `Invalid credentials`,
404: `User not found`,
},
});
}
}
src/assets/icons/dollar.png

46.4 KiB

src/assets/icons/fire.png

19.6 KiB

...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
</nav> </nav>
...@@ -83,8 +82,9 @@ function toFeedback() { ...@@ -83,8 +82,9 @@ function toFeedback() {
router.push('/feedback') router.push('/feedback')
} }
function toUserProfile() {
router.push('/news') function toUserProfile(){
router.push('/profile')
} }
......
<script setup lang="ts">
import Menu from "@/components/BaseComponents/Menu.vue";
import Footer from "@/components/BaseComponents/Footer.vue";
let points = 0;
let streak = 0;
</script>
<template>
<Menu></Menu>
<div class="container text-center">
<div class="row">
<div class="col">
<img src="/src/assets/userprofile.png" class="img-fluid">
<p class="h2">Username</p>
<p><a class="link-dark" href="#">Edit profile</a></p>
</div>
</div>
<div class="row">
<div class="col">
<img src="/src/assets/icons/fire.png" class="img-fluid" style="width: 30px; height: 30px" alt="dollar">
<p>Streak: 10</p>
</div>
</div>
<div class="row">
<div class="col-12">
<img src="/src/assets/icons/dollar.png" class="img-fluid" style="width: 30px; height: 30px" alt="dollar">
<p class="">Points: 2000 </p>
</div>
</div>
<div class="row">
<div class="col">
total points earned
</div>
<div class="col">
total badges earned
</div>
</div>
<div class="row">
<div class="col">
History
</div>
</div>
<div class="row">
<div class="col">
Your Badges
</div>
</div>
</div>
<Footer></Footer>
</template>
<style scoped>
</style>
\ No newline at end of file
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
import { createRouter, createWebHistory } from 'vue-router'; import { createRouter, createWebHistory } from 'vue-router';
import LoginView from '../views/Authentication/LoginView.vue'; import LoginView from '../views/Authentication/LoginView.vue';
import { useUserInfoStore } from '@/stores/UserStore'; import { useUserInfoStore } from '@/stores/UserStore';
import UserProfileView from "@/views/User/UserProfileView.vue";
import SignUp from '@/components/SignUp/SignUp.vue' import SignUp from '@/components/SignUp/SignUp.vue'
const routes = [ const routes = [
{ {
path: '/', path: '/',
...@@ -69,6 +71,11 @@ const routes = [ ...@@ -69,6 +71,11 @@ const routes = [
name: 'login', name: 'login',
component: LoginView, component: LoginView,
}, },
{
path: '/profile',
name: 'profile',
component: UserProfileView
},
{ {
path: '/sign-up', path: '/sign-up',
name: 'sign up', name: 'sign up',
......
<script setup lang="ts">
import UserProfileLayout from "@/components/UserProfile/UserProfileLayout.vue";
</script>
<template>
<UserProfileLayout></UserProfileLayout>
</template>
<style scoped>
</style>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment