Skip to content
Snippets Groups Projects
Commit 673167e7 authored by Andreas's avatar Andreas
Browse files

Merge branch 'main' of...

Merge branch 'main' of https://gitlab.stud.idi.ntnu.no/idatt2106-2024-07/frontend into feat/workflow-ci-check-lint
parents 72df383f bf1c3278
No related branches found
No related tags found
1 merge request!13Updated workflow to be run in a docker image and added job for checking lint
Pipeline #274145 failed
......@@ -21,7 +21,7 @@ export type OpenAPIConfig = {
export const OpenAPI: OpenAPIConfig = {
BASE: 'http://localhost:8080',
VERSION: '0',
VERSION: '3.0',
WITH_CREDENTIALS: false,
CREDENTIALS: 'include',
TOKEN: undefined,
......
......@@ -6,3 +6,10 @@ export { ApiError } from './core/ApiError';
export { CancelablePromise, CancelError } from './core/CancelablePromise';
export { OpenAPI } 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 = {
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`,
},
});
}
}
<template>
<button type="button" class="btn btn-success" id="buttonStyle">{{ buttonText }}</button>
<button type="button" class="btn btn-primary" id="buttonStyle">{{ buttonText }}</button>
</template>
<script>
......
<template>
Hallo
</template>
\ No newline at end of file
<main>
<div class="wrapper">
<div id="formFrame">
<h1>Feedback</h1>
<form @submit.prevent="submitForm">
<BaseInput v-model="email" label="Email" type="email" placeholder="Enter your email" inputId="email" required />
<br>
<label for="feedback">Your feedback:</label>
<textarea v-model="message" placeholder="Write here" rows="5" name="comment[text]" id="comment_text" cols="33"
required></textarea>
<Button1 button-text="Send" @click="submitForm">Submit</Button1>
<p v-if="submissionStatus">{{ submissionStatus }}</p>
</form>
</div>
</div>
</main>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import BaseInput from '@/components/InputFields/BaseInput.vue';
import Button1 from '@/components/Buttons/Button1.vue';
const email = ref("");
const message = ref("");
const submissionStatus = ref("");
const submitForm = async () => {
};
</script>
<style scoped>
main {
display: flex;
flex-direction: column;
align-items: center;
font-family: 'Poppins', sans-serif;
}
.wrapper {
width: 60%;
height: 100%;
margin: 30px;
margin-bottom: 4rem;
display: flex;
justify-content: center;
align-items: center;
}
#formFrame {
width: 400px;
padding: 40px;
border-radius: 50px;
color: #101010;
}
textarea {
padding: 10px;
max-width: 100%;
line-height: 1.5;
border-radius: 5px;
border: 1px solid #ccc;
box-shadow: 1px 1px 1px #999;
}
textarea {
width: 500px;
height: 100px;
background: none repeat scroll 0 0 rgba(255, 255, 255, 0.151);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) inset;
color: #555555;
font-size: 0.9em;
line-height: 1.4em;
padding: 5px 8px;
transition: background-color 0.2s ease 0s;
}
textarea:focus {
background: none repeat scroll 0 0 #FFFFFF;
outline-width: 0;
}
</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