diff --git a/src/App.tsx b/src/App.tsx index 5c9d0f0f5675a7a39f31c0939b0fde5103d695c7..c262a926635148c69adf5c9215ccc8d784fac27a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -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'; diff --git a/src/components/goBack/goBackButton.module.css b/src/components/goBack/goBackButton.module.css index def165a329288c2f943d5b5fbafc000b51caa50c..dc54569d769e421f63cceeba2aa0c2c2a70de083 100644 --- a/src/components/goBack/goBackButton.module.css +++ b/src/components/goBack/goBackButton.module.css @@ -7,8 +7,19 @@ left: 30px; top: 30px; cursor: pointer; + text-align: center; } -.button:hover{ +@media screen and (max-width: 800px) { + .button { + height: 60px; + width: 80px; + margin: 0px; + left: 15px; + top: 15px; + } +} + +.button:hover { background-color: #f3d295; } \ No newline at end of file diff --git a/src/pages/commitGraphPage/CommitPage.module.scss b/src/pages/commitGraphPage/commitPage.module.css similarity index 99% rename from src/pages/commitGraphPage/CommitPage.module.scss rename to src/pages/commitGraphPage/commitPage.module.css index 064930c4ba585392aa47cd7eeaa99ed4d9cb152f..e154dda10beb2b0f10bf6e509829e24b15facca4 100644 --- a/src/pages/commitGraphPage/CommitPage.module.scss +++ b/src/pages/commitGraphPage/commitPage.module.css @@ -8,3 +8,4 @@ width: 80%; margin-left: 10%; } + diff --git a/src/pages/commitGraphPage/CommitPage.tsx b/src/pages/commitGraphPage/commitPage.tsx similarity index 95% rename from src/pages/commitGraphPage/CommitPage.tsx rename to src/pages/commitGraphPage/commitPage.tsx index 5392c5d38574cac8be6f319b239d00cd94a71e6a..342ad877edd34c688931784717ef2b88241ec007 100644 --- a/src/pages/commitGraphPage/CommitPage.tsx +++ b/src/pages/commitGraphPage/commitPage.tsx @@ -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"; diff --git a/src/pages/commitListPage/commitListPage.module.css b/src/pages/commitListPage/commitListPage.module.css index 37fb24d77e38a70ce6e1489795fa7a31c320b98a..124c61609a84a61a9371673a1e6c1cb1b0143283 100644 --- a/src/pages/commitListPage/commitListPage.module.css +++ b/src/pages/commitListPage/commitListPage.module.css @@ -2,6 +2,7 @@ display: flex; flex-direction: row; justify-content: space-evenly; + align-items: center; width: 40%; margin-left: 30%; } diff --git a/src/pages/commitListPage/commitListPage.tsx b/src/pages/commitListPage/commitListPage.tsx index c49ef578e12bbdaa6e8c78cd504f0e3ba4aeb987..2e54adbb331a0080951c4983d052883f4f24222f 100644 --- a/src/pages/commitListPage/commitListPage.tsx +++ b/src/pages/commitListPage/commitListPage.tsx @@ -1,7 +1,8 @@ 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} diff --git a/src/pages/commitListPage/commitPageWrapper.tsx b/src/pages/commitListPage/commitPageWrapper.tsx index 8fbbfeeb96d1039b4f356cc1227c2c2218a6ebc1..3f941adbbb79473c99eb270dd7cd3318c28b69e2 100644 --- a/src/pages/commitListPage/commitPageWrapper.tsx +++ b/src/pages/commitListPage/commitPageWrapper.tsx @@ -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> diff --git a/src/pages/landingPage/landingPage.module.css b/src/pages/landingPage/landingPage.module.css index 5d7dfc724bd09bd86b562fa1ea99836359df516e..c4eea44fdc4c49c19193f31bf1c13b45a2bdcff9 100644 --- a/src/pages/landingPage/landingPage.module.css +++ b/src/pages/landingPage/landingPage.module.css @@ -1,4 +1,5 @@ + .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; + } } diff --git a/src/pages/overviewPage/Overview.tsx b/src/pages/overviewPage/overview.tsx similarity index 100% rename from src/pages/overviewPage/Overview.tsx rename to src/pages/overviewPage/overview.tsx diff --git a/src/utils/victory/useVictory.tsx b/src/utils/victory/useVictory.tsx index dcfb40b618d3e7033bdbd142ead70b87bb219b06..0b5b823d7e7d9e749053bdb4b344eac970f8da0e 100644 --- a/src/utils/victory/useVictory.tsx +++ b/src/utils/victory/useVictory.tsx @@ -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",