Skip to content

Commit

Permalink
Merge pull request #16 from JungDohyeon/feat/#11
Browse files Browse the repository at this point in the history
[Feat/#11] 사용자 계정 등록
  • Loading branch information
JungDohyeon authored Nov 21, 2024
2 parents 2fcfc39 + d8e4a77 commit b9747b0
Show file tree
Hide file tree
Showing 15 changed files with 812 additions and 43 deletions.
52 changes: 50 additions & 2 deletions GameLink-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
CD929F1F2CD2B87A00E67E4E /* GridRules.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD929F1E2CD2B87A00E67E4E /* GridRules.swift */; };
CD929F212CD2B9E700E67E4E /* GLButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD929F202CD2B9E700E67E4E /* GLButton.swift */; };
CDA1CBE72CEE24A20041116B /* PositionSelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA1CBE62CEE24A20041116B /* PositionSelectView.swift */; };
CDA1CBEB2CEF2C230041116B /* RankDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA1CBEA2CEF2C230041116B /* RankDTO.swift */; };
CDA1CBED2CEF84850041116B /* UserProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA1CBEC2CEF84850041116B /* UserProfileView.swift */; };
CDA1CBEF2CEF8FEB0041116B /* RankCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA1CBEE2CEF8FEB0041116B /* RankCardView.swift */; };
CDA1CBF32CEF948E0041116B /* RankEntity.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA1CBF22CEF948E0041116B /* RankEntity.swift */; };
CDA1CBF72CEF9D390041116B /* UserMatchListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA1CBF62CEF9D390041116B /* UserMatchListView.swift */; };
CDA1CBF92CEF9D5D0041116B /* LOLMatchDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA1CBF82CEF9D5D0041116B /* LOLMatchDTO.swift */; };
CDA1CBFB2CEF9F7C0041116B /* MatchCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA1CBFA2CEF9F7C0041116B /* MatchCardView.swift */; };
CDA1CBFD2CEFA0820041116B /* LOLMatchEntity.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA1CBFC2CEFA0820041116B /* LOLMatchEntity.swift */; };
CDC0C5812CEA61D1002988BF /* ChatroomDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC0C5802CEA61D1002988BF /* ChatroomDTO.swift */; };
CDC0C5842CEA63E6002988BF /* ChatroomEntity.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC0C5832CEA63E6002988BF /* ChatroomEntity.swift */; };
CDC0C5862CEA6733002988BF /* ChatroomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC0C5852CEA6733002988BF /* ChatroomView.swift */; };
Expand Down Expand Up @@ -130,6 +138,14 @@
CD929F1E2CD2B87A00E67E4E /* GridRules.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GridRules.swift; sourceTree = "<group>"; };
CD929F202CD2B9E700E67E4E /* GLButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GLButton.swift; sourceTree = "<group>"; };
CDA1CBE62CEE24A20041116B /* PositionSelectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PositionSelectView.swift; sourceTree = "<group>"; };
CDA1CBEA2CEF2C230041116B /* RankDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RankDTO.swift; sourceTree = "<group>"; };
CDA1CBEC2CEF84850041116B /* UserProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserProfileView.swift; sourceTree = "<group>"; };
CDA1CBEE2CEF8FEB0041116B /* RankCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RankCardView.swift; sourceTree = "<group>"; };
CDA1CBF22CEF948E0041116B /* RankEntity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RankEntity.swift; sourceTree = "<group>"; };
CDA1CBF62CEF9D390041116B /* UserMatchListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserMatchListView.swift; sourceTree = "<group>"; };
CDA1CBF82CEF9D5D0041116B /* LOLMatchDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LOLMatchDTO.swift; sourceTree = "<group>"; };
CDA1CBFA2CEF9F7C0041116B /* MatchCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatchCardView.swift; sourceTree = "<group>"; };
CDA1CBFC2CEFA0820041116B /* LOLMatchEntity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LOLMatchEntity.swift; sourceTree = "<group>"; };
CDC0C5802CEA61D1002988BF /* ChatroomDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatroomDTO.swift; sourceTree = "<group>"; };
CDC0C5832CEA63E6002988BF /* ChatroomEntity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatroomEntity.swift; sourceTree = "<group>"; };
CDC0C5852CEA6733002988BF /* ChatroomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatroomView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -212,8 +228,8 @@
CD277DAE2CCE25E800BE57C4 /* Profile */ = {
isa = PBXGroup;
children = (
CD277DAF2CCE25F300BE57C4 /* ProfileMainView.swift */,
CD277DB12CCE260900BE57C4 /* ProfileViewModel.swift */,
CDA1CBE82CEF2AF00041116B /* ViewModel */,
CDA1CBE92CEF2AF40041116B /* View */,
);
path = Profile;
sourceTree = "<group>";
Expand Down Expand Up @@ -290,14 +306,36 @@
CD8CD2A72CEBBB4600DD7BB4 /* FlowRowLayoutView.swift */,
CD8CD2B12CEC7BBB00DD7BB4 /* GLNavigationBar.swift */,
CDF1F09F2CECFCBF0033F03F /* CachedImageView.swift */,
CDA1CBEE2CEF8FEB0041116B /* RankCardView.swift */,
CDA1CBFA2CEF9F7C0041116B /* MatchCardView.swift */,
);
path = Core;
sourceTree = "<group>";
};
CDA1CBE82CEF2AF00041116B /* ViewModel */ = {
isa = PBXGroup;
children = (
CD277DB12CCE260900BE57C4 /* ProfileViewModel.swift */,
);
path = ViewModel;
sourceTree = "<group>";
};
CDA1CBE92CEF2AF40041116B /* View */ = {
isa = PBXGroup;
children = (
CD277DAF2CCE25F300BE57C4 /* ProfileMainView.swift */,
CDA1CBEC2CEF84850041116B /* UserProfileView.swift */,
CDA1CBF62CEF9D390041116B /* UserMatchListView.swift */,
);
path = View;
sourceTree = "<group>";
};
CDC0C5822CEA63DD002988BF /* Entity */ = {
isa = PBXGroup;
children = (
CDC0C5832CEA63E6002988BF /* ChatroomEntity.swift */,
CDA1CBF22CEF948E0041116B /* RankEntity.swift */,
CDA1CBFC2CEFA0820041116B /* LOLMatchEntity.swift */,
);
path = Entity;
sourceTree = "<group>";
Expand Down Expand Up @@ -459,6 +497,8 @@
CDF1F0A32CECFD850033F03F /* ChatRoomUserListDetailDTO.swift */,
CDF1F0A72CECFE150033F03F /* GameInfoDTO.swift */,
CDF1F0A92CECFE220033F03F /* ChampionDTO.swift */,
CDA1CBEA2CEF2C230041116B /* RankDTO.swift */,
CDA1CBF82CEF9D5D0041116B /* LOLMatchDTO.swift */,
);
path = Entity;
sourceTree = "<group>";
Expand Down Expand Up @@ -678,20 +718,25 @@
CDF1F0A02CECFCBF0033F03F /* CachedImageView.swift in Sources */,
CDF1F0AC2CED103C0033F03F /* UserCarouselCardView.swift in Sources */,
CD277DB02CCE25F300BE57C4 /* ProfileMainView.swift in Sources */,
CDA1CBFD2CEFA0820041116B /* LOLMatchEntity.swift in Sources */,
CDD5CD2C2CA47B0D00208740 /* AuthView.swift in Sources */,
CD534BF92CD3EA60003F3CA6 /* ReissueDTO.swift in Sources */,
CDD5CD342CA4839B00208740 /* UserAPI.swift in Sources */,
CDA1CBF92CEF9D5D0041116B /* LOLMatchDTO.swift in Sources */,
CDCB985B2C9DE61200DF9FD3 /* ChattingListView.swift in Sources */,
CDD5CD3D2CA4864700208740 /* OAuthDTO.swift in Sources */,
CD760A3E2CE5E9CF006AEB85 /* GLColor.swift in Sources */,
CD929F1B2CD2B27400E67E4E /* GLTextFieldType.swift in Sources */,
CDCB988D2C9DEA5C00DF9FD3 /* UserDefaultsWrapper.swift in Sources */,
CD8CD2A82CEBBB4600DD7BB4 /* FlowRowLayoutView.swift in Sources */,
CDA1CBED2CEF84850041116B /* UserProfileView.swift in Sources */,
CDCB988B2C9DEA4A00DF9FD3 /* Config.swift in Sources */,
CD277DB72CCE2A5E00BE57C4 /* RiotService.swift in Sources */,
CDA1CBF72CEF9D390041116B /* UserMatchListView.swift in Sources */,
CDF1F09C2CECFC930033F03F /* ImageCacheManager.swift in Sources */,
CD277DB22CCE260900BE57C4 /* ProfileViewModel.swift in Sources */,
CD8CD2AD2CEC796B00DD7BB4 /* ChattingViewDestination.swift in Sources */,
CDA1CBEF2CEF8FEB0041116B /* RankCardView.swift in Sources */,
CDF1F09E2CECFC9F0033F03F /* ImageCacheLoader.swift in Sources */,
CDF1F0A22CECFCF80033F03F /* ChattingRoomCarouselView.swift in Sources */,
CDCB98922C9DEAAA00DF9FD3 /* UserDefaultsList.swift in Sources */,
Expand All @@ -703,18 +748,21 @@
CDD5CD3F2CA48AE400208740 /* Utils.swift in Sources */,
CD8CD2A42CEBB35000DD7BB4 /* ChattingFilterDetailView.swift in Sources */,
CDD5CD382CA4850F00208740 /* BaseService.swift in Sources */,
CDA1CBFB2CEF9F7C0041116B /* MatchCardView.swift in Sources */,
CD277DC22CCE2F5B00BE57C4 /* DefaultRiotService.swift in Sources */,
CD277DC42CCE2F9B00BE57C4 /* DefaultChatService.swift in Sources */,
CD8CD2AA2CEBC02F00DD7BB4 /* GameFilter.swift in Sources */,
CDCD34B62CBFFDD00068E4F7 /* ChatRoomListDTO.swift in Sources */,
CDF1F0A82CECFE150033F03F /* GameInfoDTO.swift in Sources */,
CDC0C5862CEA6733002988BF /* ChatroomView.swift in Sources */,
CD929F1D2CD2B33800E67E4E /* View + placeholder.swift in Sources */,
CDA1CBF32CEF948E0041116B /* RankEntity.swift in Sources */,
CDD5CD2E2CA47B1A00208740 /* AuthViewModel.swift in Sources */,
CDCB98592C9DE61200DF9FD3 /* GameLink_iOSApp.swift in Sources */,
CDD5CD362CA483A900208740 /* UserService.swift in Sources */,
CD8CD2B22CEC7BBB00DD7BB4 /* GLNavigationBar.swift in Sources */,
CDCD34B42CBFF6670068E4F7 /* ChatroomAPI.swift in Sources */,
CDA1CBEB2CEF2C230041116B /* RankDTO.swift in Sources */,
CDD5CD312CA47C0A00208740 /* AuthProvider.swift in Sources */,
CDCB98852C9DE98E00DF9FD3 /* NetworkError.swift in Sources */,
CDCB98832C9DE98000DF9FD3 /* ErrorResponse.swift in Sources */,
Expand Down
41 changes: 41 additions & 0 deletions GameLink-iOS/Domain/Entity/LOLMatchEntity.swift
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
}
28 changes: 28 additions & 0 deletions GameLink-iOS/Domain/Entity/RankEntity.swift
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
}
6 changes: 3 additions & 3 deletions GameLink-iOS/Domain/Enum/GameType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public enum LOLGameType: CaseIterable {
public var korName: String {
switch self {
case .soloRank:
return "솔로랭크"
return "개인/2인 랭크"
case .freeRank:
return "자유랭크"
return "자유 랭크"
case .normal:
return "일반게임"
return "일반"
}
}
}
11 changes: 10 additions & 1 deletion GameLink-iOS/Domain/Enum/Tier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public enum LOLTier: String, CaseIterable {
case challenger

public var tierImage: UIImage {

return UIImage(named: "ic_\(self.rawValue)") ?? UIImage()
}

Expand Down Expand Up @@ -60,6 +59,16 @@ public enum LOLTier: String, CaseIterable {
return "챌린저"
}
}

public var engName: String {
switch self {
case .grandmaster:
return "GRANDMASTER"

default:
return self.rawValue.uppercased()
}
}
}

extension LOLTier {
Expand Down
1 change: 0 additions & 1 deletion GameLink-iOS/Feature/Core/CachedImageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ struct CachedImageView: View {
if let image = loader.image {
Image(uiImage: image)
.resizable()
.aspectRatio(contentMode: .fit)
} else {
ProgressView()
.frame(maxWidth: .infinity, maxHeight: .infinity)
Expand Down
128 changes: 128 additions & 0 deletions GameLink-iOS/Feature/Core/MatchCardView.swift
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()
}
Loading

0 comments on commit b9747b0

Please sign in to comment.