-
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.
Browse files
Browse the repository at this point in the history
[Feat/#11] 사용자 계정 등록
- Loading branch information
Showing
15 changed files
with
812 additions
and
43 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
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,41 @@ | ||
// | ||
// LOLMatchEntity.swift | ||
// GameLink-iOS | ||
// | ||
// Created by 정도현 on 11/22/24. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct LOLMatchEntity: Hashable { | ||
let matchId: String | ||
let matchType: LOLGameType | ||
let championName: String | ||
let doubleKills: Int | ||
let firstBloodKill: Bool | ||
let teamPosition: LOLPosition | ||
let pentaKills: Int | ||
let assists: Int | ||
let deaths: Int | ||
let kills: Int | ||
let kda: Double | ||
let firstBloodAssist: Bool | ||
let firstTowerAssist: Bool | ||
let firstTowerKill: Bool | ||
let goldPerMinute: Int | ||
let gameEndedInEarlySurrender: Bool | ||
let gameEndedInSurrender: Bool | ||
let timePlayed: Int | ||
let totalMinionsKilled: Int | ||
let win: Bool | ||
let soloKills: Int | ||
let legendaryCount: Int | ||
let damagePerMinute: Int | ||
let dragonTakedowns: Int | ||
let epicMonsterSteals: Int | ||
let baronTakedowns: Int | ||
let voidMonsterKill: Int | ||
let perfectDragonSoulsTaken: Int | ||
let elderDragonMultikills: Int | ||
let killParticipation: Int | ||
} |
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,28 @@ | ||
// | ||
// RankEntity.swift | ||
// GameLink-iOS | ||
// | ||
// Created by 정도현 on 11/22/24. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct RankEntity: Hashable { | ||
let type: LOLGameType | ||
let tier: LOLTier | ||
let rank: String | ||
let leaguePoints: Int | ||
let wins: Int | ||
let losses: Int | ||
let winRate: Double | ||
let kda: Double | ||
let avgKills: Double | ||
let avgDeaths: Double | ||
let avgAssists: Double | ||
let avgCs: Double | ||
let best3champions: [ChampionDTO] | ||
let veteran: Bool | ||
let inactive: Bool | ||
let freshBlood: Bool | ||
let hotStreak: Bool | ||
} |
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
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,128 @@ | ||
// | ||
// MatchCardView.swift | ||
// GameLink-iOS | ||
// | ||
// Created by 정도현 on 11/22/24. | ||
// | ||
|
||
import SwiftUI | ||
|
||
public struct MatchCardView: View { | ||
|
||
let matchData: LOLMatchEntity | ||
|
||
public init(matchData: LOLMatchEntity) { | ||
self.matchData = matchData | ||
} | ||
|
||
public var body: some View { | ||
HStack(spacing: 0) { | ||
Rectangle() | ||
.fill(matchData.win ? .blue : .errorRed) | ||
.frame(width: 8) | ||
.padding(.trailing, 10) | ||
|
||
VStack(alignment: .leading, spacing: 0) { | ||
Text(matchData.matchType.korName) | ||
.glFont(.body2Bold) | ||
.foregroundStyle(matchData.win ? .blue : .errorRed) | ||
.padding(.bottom, 2) | ||
|
||
Text(matchData.win ? "승리" : "패배") | ||
.glFont(.body2) | ||
.foregroundStyle(.glGray2) | ||
|
||
Spacer() | ||
} | ||
.padding(.vertical, 10) | ||
|
||
Spacer() | ||
|
||
if let positionImage = matchData.teamPosition.positionImage { | ||
Image(uiImage: positionImage) | ||
.resizable() | ||
.frame(width: 50, height: 50) | ||
} | ||
} | ||
.padding(.trailing, 14) | ||
.frame(height: 100) | ||
.background( | ||
matchData.win ? .winBlue : .glLooseRed | ||
) | ||
.clipShape(.rect(cornerRadius: 8)) | ||
} | ||
} | ||
|
||
#Preview { | ||
VStack { | ||
MatchCardView( | ||
matchData: LOLMatchEntity( | ||
matchId: "string", | ||
matchType: .freeRank, | ||
championName: "아트록스", | ||
doubleKills: 1, | ||
firstBloodKill: true, | ||
teamPosition: .mid, | ||
pentaKills: 0, | ||
assists: 5, | ||
deaths: 3, | ||
kills: 5, | ||
kda: 3.3, | ||
firstBloodAssist: true, | ||
firstTowerAssist: true, | ||
firstTowerKill: true, | ||
goldPerMinute: 300, | ||
gameEndedInEarlySurrender: true, | ||
gameEndedInSurrender: true, | ||
timePlayed: 0, | ||
totalMinionsKilled: 0, | ||
win: true, | ||
soloKills: 0, | ||
legendaryCount: 0, | ||
damagePerMinute: 0, | ||
dragonTakedowns: 0, | ||
epicMonsterSteals: 0, | ||
baronTakedowns: 0, | ||
voidMonsterKill: 0, | ||
perfectDragonSoulsTaken: 0, | ||
elderDragonMultikills: 0, | ||
killParticipation: 0 | ||
) | ||
) | ||
MatchCardView( | ||
matchData: LOLMatchEntity( | ||
matchId: "string", | ||
matchType: .freeRank, | ||
championName: "아트록스", | ||
doubleKills: 1, | ||
firstBloodKill: true, | ||
teamPosition: .top, | ||
pentaKills: 0, | ||
assists: 5, | ||
deaths: 3, | ||
kills: 5, | ||
kda: 3.3, | ||
firstBloodAssist: true, | ||
firstTowerAssist: true, | ||
firstTowerKill: true, | ||
goldPerMinute: 300, | ||
gameEndedInEarlySurrender: true, | ||
gameEndedInSurrender: true, | ||
timePlayed: 0, | ||
totalMinionsKilled: 0, | ||
win: false, | ||
soloKills: 0, | ||
legendaryCount: 0, | ||
damagePerMinute: 0, | ||
dragonTakedowns: 0, | ||
epicMonsterSteals: 0, | ||
baronTakedowns: 0, | ||
voidMonsterKill: 0, | ||
perfectDragonSoulsTaken: 0, | ||
elderDragonMultikills: 0, | ||
killParticipation: 0 | ||
) | ||
) | ||
} | ||
.padding() | ||
} |
Oops, something went wrong.