-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Switch to dashboard branch * feat: New account cell in parameters to display MyKSuiteStore view * feat(MyKSuiteStore): Add type to DI * feat(MyKSuiteDashboardViewBridgeController): Reworked presentation * feat(AccountManager): Refresh myKSuiteStore on login * feat(ParameterTableViewController): Grouped cell UI update * chore: Removed iOS 15 conditional code * feat(): Modern sheet presentation for MyKSuiteBridgeViewController * feat(presentUpSaleSheet): Animate a dismiss before presenting * feat(ios-features): Added necessary libraries as a Framework * chore(MyKSuiteDashboardViewBridgeController): Bumped to lattest ios-features API * feat(ParameterTableViewController): Some i18n * chore: PR Feedback * chore: Remove conditional ios version dependent code * feat(ParameterTableViewController): Dynamic sections if mykSuite enabled * fix(ParameterTableViewCell): Proper prepare for reuse implementation * feat(ParameterTableViewController): Inter18n general section * fix: New ios-features build * chore: Bump core-ui * feat(AsyncImageView): A sample swUI view to display account image still requires fine tuning * feat(AccountManager): Call to updateMyKSuite is no longer breaking authentification if broken * fix(ParameterTableViewController): Correct rounded corner on cell * feat(ParameterTableViewCell): Cell has support for other fonts and can display the current mykSuite account * chore: Bump to ios-features 1.0.2 * chore: Branding my kSuite plus with a plus logo not a plus plus * feat(ParameterTableViewController): Custom design table view section * chore: Remove force display of myksuite * feat(AsyncImageView): Loading view with default color * feat: Check for mykSuite availlable for a user * chore: Bump ios-features * refactor(ParameterTableViewController): Better async loading * fix(ParameterTableViewController): Section title is now correct without a mykSuite * chore: Sonar * refactor(ParameterTableViewController): Use a font with correct color directly * refactor(MyKSuiteDashboardViewBridgeController): Simplify constructor * feat(AccountManager): Update mykSuite on updateUser * refactor(ParameterTableViewController): Remove extraneous lazy DI for direct resolution call * refactor(MenuViewController): Remove extraneous import
- Loading branch information
1 parent
6aac4cf
commit 5fd647b
Showing
9 changed files
with
297 additions
and
18 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
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,44 @@ | ||
/* | ||
Infomaniak kDrive - iOS App | ||
Copyright (C) 2025 Infomaniak Network SA | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import Foundation | ||
import InfomaniakCore | ||
import SwiftUI | ||
|
||
struct AsyncImageView: View { | ||
@State private var loadedImage: UIImage? | ||
let currentAccount: Account | ||
|
||
var body: some View { | ||
VStack { | ||
if let image = loadedImage { | ||
Image(uiImage: image) | ||
.resizable() | ||
.scaledToFit() | ||
.frame(width: 40, height: 40) | ||
} else { | ||
Circle() | ||
.fill(KDriveAsset.loaderDefaultColor.swiftUIColor) | ||
.frame(width: 40, height: 40) | ||
} | ||
} | ||
.task { | ||
loadedImage = await currentAccount.user.getAvatar() | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
kDrive/UI/Controller/SwiftUI/MyKSuiteDashboardViewBridgeController.swift
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,37 @@ | ||
/* | ||
Infomaniak kDrive - iOS App | ||
Copyright (C) 2025 Infomaniak Network SA | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import FloatingPanel | ||
import InfomaniakCore | ||
import InfomaniakCoreUIKit | ||
import InfomaniakDI | ||
import kDriveCore | ||
import kDriveResources | ||
import MyKSuite | ||
import SwiftUI | ||
import UIKit | ||
|
||
enum MyKSuiteDashboardViewBridgeController { | ||
static func instantiate(apiFetcher: DriveApiFetcher, currentAccount: Account) -> UIViewController { | ||
let swiftUIView = MyKSuiteDashboardView(apiFetcher: apiFetcher, userId: currentAccount.userId) { | ||
AsyncImageView(currentAccount: currentAccount) | ||
} | ||
|
||
return UIHostingController(rootView: swiftUIView) | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.