From 74d032c9156e5f3f2353fb4721857895788e3603 Mon Sep 17 00:00:00 2001 From: "emre.kartal" Date: Fri, 26 Jan 2024 17:49:40 +0100 Subject: [PATCH] Editing images and managing stakes in a bet :hammer: --- .../BlueCoinIcon.imageset/Group 107 (1).png | Bin 681 -> 0 bytes .../Contents.json | 2 +- .../allCoinBlack.png | Bin 0 -> 1081 bytes .../Contents.json | 0 .../Group 280.png | Bin .../AllIn/Components/BetLineLoading.swift | 96 ++++++++++++++---- .../AllIn/Components/ParticipationModal.swift | 17 +++- .../AllIn/ViewModels/DetailsViewModel.swift | 6 ++ .../AllInApp/AllIn/Views/DetailsView.swift | 9 +- 9 files changed, 102 insertions(+), 28 deletions(-) delete mode 100644 Sources/AllInApp/AllIn/Assets.xcassets/BlueCoinIcon.imageset/Group 107 (1).png rename Sources/AllInApp/AllIn/Assets.xcassets/{BlueCoinIcon.imageset => allCoinBlackIcon.imageset}/Contents.json (87%) create mode 100644 Sources/AllInApp/AllIn/Assets.xcassets/allCoinBlackIcon.imageset/allCoinBlack.png rename Sources/AllInApp/AllIn/Assets.xcassets/{LoadingHeart.imageset => loadingHeartIcon.imageset}/Contents.json (100%) rename Sources/AllInApp/AllIn/Assets.xcassets/{LoadingHeart.imageset => loadingHeartIcon.imageset}/Group 280.png (100%) diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/BlueCoinIcon.imageset/Group 107 (1).png b/Sources/AllInApp/AllIn/Assets.xcassets/BlueCoinIcon.imageset/Group 107 (1).png deleted file mode 100644 index d982a56c3fa043a8c4b0c7e109628eead0745cfb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 681 zcmV;a0#^NrP)@~0drDELIAGL9O(c600d`2O+f$vv5yPra20PYFM4U!vlJWyVlJ`*N6g1G^l0C58!A+NN|;2G!>ww9He zx`}N`mXiM=oUXMCbA^BlAUgNOBf+J-K9#od1SabB^4FYHyXFN` z0Gc)lX~v(@HY{L*^5xGN0+pO?3IQU(xog~O&Zy4`PgW48H2-v$L##QdfBBU9TJ?ZF z&YZ}N&O6_M-f6Cp>jxYrD|&b48u>9~LGLtY;HD5%E8ZoKJU7aHE@SFhJz*dT#8_JQz7*Dc_xyqhm=@fggQl%!83L zZWMnC+psL2*L>UcZa5E_hafk`?WHVUxidqv-MUm6^Qp+W#uCN-#b}-T5-0AuBUY%9 zbMe2s1EEI6&2@dch5)@;-syGo(e*@gA-u@Bv2)>lyV-&p?xCO7h_r>Wpo P00000NkvXXu0mjfC#62> diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/BlueCoinIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/allCoinBlackIcon.imageset/Contents.json similarity index 87% rename from Sources/AllInApp/AllIn/Assets.xcassets/BlueCoinIcon.imageset/Contents.json rename to Sources/AllInApp/AllIn/Assets.xcassets/allCoinBlackIcon.imageset/Contents.json index 67a98bf..679a508 100644 --- a/Sources/AllInApp/AllIn/Assets.xcassets/BlueCoinIcon.imageset/Contents.json +++ b/Sources/AllInApp/AllIn/Assets.xcassets/allCoinBlackIcon.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "Group 107 (1).png", + "filename" : "allCoinBlack.png", "idiom" : "universal", "scale" : "1x" }, diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/allCoinBlackIcon.imageset/allCoinBlack.png b/Sources/AllInApp/AllIn/Assets.xcassets/allCoinBlackIcon.imageset/allCoinBlack.png new file mode 100644 index 0000000000000000000000000000000000000000..46b6e237fd96ef1eb20525328563dbf93183f0a0 GIT binary patch literal 1081 zcmV-91jhS`P)@~0drDELIAGL9O(c600d`2O+f$vv5yPsHW;@7s02Qox1B67VfKUOu6|hu*s9-|};RSeG(?L2|mykz5O0xfnW+KP& zW#){J<4=lm!6yD^zPWfZJyPQ0;v$~U=a+aH_jKcR;>dpdIRIF=KH3apcKjvACuV08O2)!#g1U zaZKG{;G(Hlz^>?NanaN(U|00Cz^2-%qF2BU>1pZLY3dxXYkFERWvsjxbq?4yJu_5Z zmvg`l>S?Le)G1&KdQK>SDovdNwxH(|9tp`Qy*^h(RTq`8=9%E>ndFpeS{v}}>}(jY z?CwIs3%Uq7rU1$`tqq71Rqq^7c&sOxRqKT06l&_CsP>v?Vqc&z-$_oPrj-G4=RVTb z^X=^|wQtawB@_VWrdzdGSA*I&wi_J_!X~Ii?;lt!sElEL^}946AIK+=A_$Y@KeKI8 zNdM#GV`C|^G~n0Qmv-Ari+=tw~gjkCRH0YRE(*K4A>12n*Ja9{Ozp1Or-3XZI%TLI0ocuYz-)ZS`VgF+VV zsxYiI-3q9zXIfW#8A96O+QO*p4;paKSyy|O(8)I$O*giYu%1xpA1T0UV%)p&IR|$# zymKQaAt=z3jT%(cGu_|c|3#hzPQE$MU?ZTCo++24WD^hC>zD#r2h`|2xvS@WX0Gin zk2x=;0M-GU*3*n*C(=!H8N|IQ3`nzzHnwA;!Ehmy?-|c)R{Es*d ztO_PFZ{qlu-VmOk!M;P2N!y{apin2c1$xLXV;YkZJRZxMNRQhf z?;OHGeDKViG)17 Bool { + if let stake = Int(mise) { + if stake <= AppStateContainer.shared.user?.nbCoins ?? 0 { + return false + } else { + return true + } + } else { + return true + } + } } diff --git a/Sources/AllInApp/AllIn/ViewModels/DetailsViewModel.swift b/Sources/AllInApp/AllIn/ViewModels/DetailsViewModel.swift index 432e1ba..c9054f2 100644 --- a/Sources/AllInApp/AllIn/ViewModels/DetailsViewModel.swift +++ b/Sources/AllInApp/AllIn/ViewModels/DetailsViewModel.swift @@ -48,5 +48,11 @@ class DetailsViewModel: ObservableObject { } } } + mise = "" + answer = 0 + } + + func checkAndSetError() { + } } diff --git a/Sources/AllInApp/AllIn/Views/DetailsView.swift b/Sources/AllInApp/AllIn/Views/DetailsView.swift index 2bd3322..a67ed2a 100644 --- a/Sources/AllInApp/AllIn/Views/DetailsView.swift +++ b/Sources/AllInApp/AllIn/Views/DetailsView.swift @@ -131,10 +131,13 @@ struct DetailsView: View { .foregroundStyle(AllInColors.grey100Color) .fontWeight(.bold) .padding(.bottom, 10) - ForEach(viewModel.betDetail?.participations ?? []) { (participation: Participation) in - ParticiationCell(participation: participation).padding(.horizontal, 10) + ScrollView(showsIndicators: false) { + ForEach(viewModel.betDetail?.participations ?? []) { (participation: Participation) in + ParticiationCell(participation: participation).padding(.horizontal, 10) + } } - + .padding(.bottom, 28) + Spacer() } .frame(maxWidth: /*@START_MENU_TOKEN@*/.infinity/*@END_MENU_TOKEN@*/, maxHeight: .infinity)