-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into SMA-28-Implement-new-user-profile-registr…
…ation
- Loading branch information
Showing
26 changed files
with
362 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,7 @@ out/ | |
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
### h2 database ### | ||
./sportsmatch | ||
*.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
backend/sportsmatch/src/main/java/com/sportsmatch/dtos/EventHistoryDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.sportsmatch.dtos; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class EventHistoryDTO { | ||
|
||
private Integer userScore; | ||
private Integer opponentScore; | ||
private UserDTO opponent; | ||
} |
15 changes: 15 additions & 0 deletions
15
backend/sportsmatch/src/main/java/com/sportsmatch/dtos/UserDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.sportsmatch.dtos; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class UserDTO { | ||
|
||
private String name; | ||
} |
4 changes: 2 additions & 2 deletions
4
backend/sportsmatch/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
spring.datasource.url=jdbc:h2:mem:testdb | ||
spring.datasource.url=jdbc:h2:file:./sportsmatch | ||
spring.jpa.hibernate.ddl-auto=update | ||
spring.datasource.driver-class-name=org.h2.Driver | ||
spring.datasource.username=sa | ||
spring.datasource.password=password | ||
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect | ||
spring.jpa.show-sql=true | ||
spring.h2.console.enabled=true | ||
|
||
spring.mvc.hiddenmethod.filter.enabled=true | ||
|
||
jwt.secret=56e1a2c8b7a56f5c480cf0045186dbc514d9172e4fbbc81dd82f541384274c3c |
Binary file added
BIN
+5.02 MB
frontend/sportsmatch-app/pictures/jeffrey-keenan-pUhxoSapPFA-unsplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.64 MB
frontend/sportsmatch-app/pictures/michael-dam-mEZ3PoFGs_k-unsplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,46 @@ | ||
.App { | ||
text-align: center; | ||
} | ||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;900&display=swap'); | ||
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@700&display=swap'); | ||
|
||
.App-logo { | ||
height: 40vmin; | ||
pointer-events: none; | ||
} | ||
:root { | ||
--sm-primary-font: 'Inter', sans-serif; | ||
--sm-secondary-font: 'Manrope', sans-serif; | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
.App-logo { | ||
animation: App-logo-spin infinite 20s linear; | ||
} | ||
} | ||
--sm-primary-bg: #f9f8f5; | ||
--sm-orange: #e85f29; | ||
--sm-dark: #4a494f; | ||
--sm-white: #ffffff; | ||
--sm-txt-dark: #393939; | ||
--sm-secondary-orange: #fc4c02; | ||
--sm-orange-overlay: rgba(232, 95, 41, 0.25); | ||
|
||
.App-header { | ||
background-color: #282c34; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
color: white; | ||
--sm-border-shadow: 0px 0px 5px rgba(0, 0, 0, 0.05); | ||
--sm-border-radius: 2px; | ||
|
||
--sm-btn-size-regular: 3.125em; | ||
--sm-btn-size-small: 1.875em; | ||
|
||
--sm-h1-size: 3em; | ||
--sm-h2-size: 1em; | ||
--sm-text-size: 1em; | ||
} | ||
|
||
.App-link { | ||
color: #61dafb; | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
font-family: 'Inter', sans-serif; | ||
} | ||
|
||
@keyframes App-logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
svg { | ||
color: var(--sm-white); | ||
} | ||
|
||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
min-height: 100vh; | ||
background: var(--sm-primary-bg); | ||
background-size: cover; | ||
background-position: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import '../styles/Avatar.css' | ||
|
||
interface AvatarProps { | ||
src: string | ||
} | ||
|
||
const Avatar: React.FC<AvatarProps> = ({ src }) => ( | ||
<div className="avatar" style={{ backgroundImage: `url(${src}` }}></div> | ||
) | ||
|
||
export default Avatar |
48 changes: 48 additions & 0 deletions
48
frontend/sportsmatch-app/src/components/EventHistoryItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { EventHistoryDTO } from '../generated/api' | ||
import '../styles/EventHistoryItem.css' | ||
import Avatar from './Avatar' | ||
|
||
interface EventHistoryProps { | ||
eventHistoryDTO: EventHistoryDTO | ||
} | ||
|
||
function EventHistoryItem({ eventHistoryDTO }: EventHistoryProps) { | ||
return ( | ||
<> | ||
<div className="container-sm"> | ||
<div className="event-history-item"> | ||
<div className="match-status">VICTORY (uncorfirmed)</div> | ||
<div className="user-side"> | ||
<div className="profile"> | ||
<div className="user-avatar"> | ||
<Avatar src="pictures/michael-dam-mEZ3PoFGs_k-unsplash.jpg" /> | ||
</div> | ||
<div className="user-name">You</div> | ||
</div> | ||
<div className="user-score score"> | ||
<span>{eventHistoryDTO.userScore}</span> | ||
</div> | ||
</div> | ||
<div className="colon"> | ||
<span>:</span> | ||
</div> | ||
<div className="opponent-side"> | ||
<div className="opponent-score score"> | ||
<span>{eventHistoryDTO.opponentScore}</span> | ||
</div> | ||
<div className="profile"> | ||
<div className="opponent-avatar"> | ||
<Avatar src="pictures/jeffrey-keenan-pUhxoSapPFA-unsplash.jpg" /> | ||
</div> | ||
<div className="opponent-name"> | ||
{eventHistoryDTO.opponent?.name} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
) | ||
} | ||
|
||
export default EventHistoryItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
frontend/sportsmatch-app/src/generated/api/models/EventHistoryDTO.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* generated using openapi-typescript-codegen -- do no edit */ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
import type { UserDTO } from './UserDTO'; | ||
export type EventHistoryDTO = { | ||
userScore?: number; | ||
opponentScore?: number; | ||
opponent?: UserDTO; | ||
}; | ||
|
10 changes: 10 additions & 0 deletions
10
frontend/sportsmatch-app/src/generated/api/models/Pageable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* generated using openapi-typescript-codegen -- do no edit */ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export type Pageable = { | ||
page?: number; | ||
size?: number; | ||
sort?: Array<string>; | ||
}; | ||
|
8 changes: 8 additions & 0 deletions
8
frontend/sportsmatch-app/src/generated/api/models/SportDTO.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* generated using openapi-typescript-codegen -- do no edit */ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export type SportDTO = { | ||
name?: string; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* generated using openapi-typescript-codegen -- do no edit */ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export type UserDTO = { | ||
name?: string; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
frontend/sportsmatch-app/src/generated/api/services/SportControllerService.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* generated using openapi-typescript-codegen -- do no edit */ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
import type { Pageable } from '../models/Pageable'; | ||
import type { SportDTO } from '../models/SportDTO'; | ||
import type { CancelablePromise } from '../core/CancelablePromise'; | ||
import { OpenAPI } from '../core/OpenAPI'; | ||
import { request as __request } from '../core/request'; | ||
export class SportControllerService { | ||
/** | ||
* @param pageable | ||
* @returns SportDTO OK | ||
* @throws ApiError | ||
*/ | ||
public static getSports( | ||
pageable: Pageable, | ||
): CancelablePromise<Array<SportDTO>> { | ||
return __request(OpenAPI, { | ||
method: 'GET', | ||
url: '/api/v1/sports/all', | ||
query: { | ||
'pageable': pageable, | ||
}, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.avatar { | ||
width: 100%; | ||
height: 100%; | ||
border: 2px solid #FC4C02; | ||
border-radius: 50%; | ||
background-size: cover; | ||
background-position: center center; | ||
object-fit: cover; | ||
} |
Oops, something went wrong.