Skip to content
Snippets Groups Projects
Commit 86e71b30 authored by Andreas Rystad's avatar Andreas Rystad
Browse files

merge with master

parent c2e5092f
Branches
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ import OverviewPage from "./pages/overviewPage/overview";
import { GlobalCommitContext } from './context/commitPageContext';
import { useState } from 'react';
import IssuePage from './pages/issueListPage/issuePage';
import { CommitPage } from './pages/commitGraphPage/CommitPage';
import { CommitPage } from './pages/commitGraphPage/commitPage';
import { IssueGraphPage } from './pages/issueGraphPage/issueGraphPage';
import CommitPageWrapper from "./pages/commitListPage/commitPageWrapper"
import GobackButton from './components/goBack/goBackButton';
......
......@@ -7,6 +7,17 @@
left: 30px;
top: 30px;
cursor: pointer;
text-align: center;
}
@media screen and (max-width: 800px) {
.button {
height: 60px;
width: 80px;
margin: 0px;
left: 15px;
top: 15px;
}
}
.button:hover {
......
......@@ -8,3 +8,4 @@
width: 80%;
margin-left: 10%;
}
......@@ -2,7 +2,7 @@
import { BarChart } from '../../components/graphs/barChart/barChart';
import { PieChart } from '../../components/graphs/pieChart/pieChart';
import { useGitlabApi } from '../../utils/gitlab_api_service';
import styles from './CommitPage.module.scss';
import styles from './commitPage.module.css';
import { queryTypes, Commit } from '../../utils/queryType'
import "react-loader-spinner/dist/loader/css/react-spinner-loader.css";
import Loader from "react-loader-spinner";
......
......@@ -2,6 +2,7 @@
display: flex;
flex-direction: row;
justify-content: space-evenly;
align-items: center;
width: 40%;
margin-left: 30%;
}
......
import React, {FC, useState} from 'react';
import {Commit} from "../../utils/queryType";
import Select, {SingleValue} from "react-select";
import style from "./commitListPage.module.css"
import style from "./commitListPage.module.css";
import {anonymousAnimals} from "../../utils/victory/useVictory"
interface iSingleCommit {
......@@ -18,10 +19,6 @@ const SingleCommit: FC<iSingleCommit> = (props) => {
<div className={style.SingleCommit}>
<h3>{props.title}</h3>
<div className={style.Description}>
<b>Message: </b>
<p>
{props.message}
</p>
</div>
<div className={style.Description}>
<b>Author: </b>
......@@ -41,11 +38,21 @@ interface commitProps {
const CommitComponent = (props: commitProps) => {
let commit: Commit[] = props.commits
const map={
}
let map = new Map<string,string>()
let mapIndex=0
function anonymize(name: string):string{
if (map.has(name)){
return map.get(name) as string
}
else{
map.set(name,anonymousAnimals[mapIndex])
mapIndex++
return map.get(name) as string
}
}
const commitList = commit?.map(c => <li><SingleCommit
author_name={c.author_name}
author_name={anonymize(c.author_name)}
committer_name={c.committer_name}
created_at={new Date(c.created_at)}
id={c.id}
......
......@@ -39,9 +39,9 @@ const CommitPageWrapper = () => {
<button className={style.Button} disabled={disablePrev} onClick={decrease}>
<i className={`${style.Arrow} ${style.Left}`}></i>
</button>
<h4>
<h2>
{pageNumber}
</h4>
</h2>
<button className={style.Button} disabled={disableNext} onClick={increase}>
<i className={`${style.Arrow} ${style.Right}`}></i>
</button>
......
.picture{
max-width: 550px;
}
......@@ -10,8 +11,9 @@
}
.inputWrapper{
width: 70%;
margin-left: 15%;
width: 100%;
height: 100%;
margin-left: 0%;
display: flex;
flex-direction: column;
background-color: #1C1644;
......@@ -56,6 +58,17 @@ button{
border: solid grey 2px;
color: black;
cursor: not-allowed;
}
@media screen and (max-width: 800px) {
.submitButton,.defaultButton {
margin-top: 10px;
margin-left: 5px;
margin-right: 5px;
height: 60px;
width: 80px;
left: 15px;
top: 15px;
}
}
......@@ -2,7 +2,7 @@ import { useState } from "react";
import { Commit, Issue } from "../queryType";
import { IGraphData, ICommitsPerDay, ICommitsPerMember } from "./types";
const anonymousAnimals = [
export const anonymousAnimals = [
"Tiger",
"Lion",
"Giraffe",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment