Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Public share feature branch #1306

Merged
merged 204 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
3b54164
chore: WIP endpoints
adrien-coye Jul 26, 2024
2046680
feat: In memory realm for external share context
adrien-coye Aug 16, 2024
001219f
fix: Project builds
adrien-coye Aug 16, 2024
31eafba
feat: Public share metadata WIP
adrien-coye Aug 19, 2024
98cffec
feat(Rights): Updated to be compatible with public share
adrien-coye Aug 20, 2024
fe5772f
feat(PublicShareMetadata): Parsing pass
adrien-coye Aug 20, 2024
1aff48b
refactor(Endpoint): Split files into dedicated extensiions
adrien-coye Aug 22, 2024
772ac0d
feat: Fetch root folder for a public share
adrien-coye Aug 29, 2024
e1c1644
feat: Cursored public share children query
adrien-coye Sep 2, 2024
84fa7fd
feat: Can natively show a public share within the app
adrien-coye Sep 3, 2024
130305f
fix(FilePresenter): Present public share in context
adrien-coye Sep 16, 2024
0b48b91
fix: Capabilities for Public Share
adrien-coye Sep 16, 2024
272968e
feat: Thumbnails on public share
adrien-coye Sep 17, 2024
4e48460
feat: Can navigate hierarchy of public share folders
adrien-coye Sep 18, 2024
3bdf94e
feat: Preview for public share
adrien-coye Sep 19, 2024
0b922d3
feat: Download file from public share
adrien-coye Sep 19, 2024
f9c608b
feat: Actions match spec on public share
adrien-coye Sep 20, 2024
8277702
fix: Tuist config update to build
adrien-coye Sep 23, 2024
fda286c
feat: Add to my drive button
adrien-coye Sep 23, 2024
3ba0f11
chore: Sample code to open public share
adrien-coye Sep 24, 2024
bc7b593
chore: Matomo for public share tasks
adrien-coye Sep 25, 2024
6ef3eda
chore: Align Matomo with android on what exists
adrien-coye Sep 26, 2024
d025759
feat: Download all files from current folder as a ZIP within a public…
adrien-coye Sep 26, 2024
630111f
feat: Add to my kDrive button
adrien-coye Sep 26, 2024
5368da7
feat: Multiselect behaviour
adrien-coye Sep 27, 2024
e1e77ca
chore: Merge branch 'master' into externalLinks-multiSelect
adrien-coye Oct 22, 2024
6269b10
chore: Merge branch 'master' into feature-externalLinks
adrien-coye Oct 23, 2024
df3f175
chore: Merge branch 'feature-externalLinks' into externalLinks-listFiles
adrien-coye Oct 23, 2024
a8f744c
chore: Merge branch 'feature-externalLinks' into externalLinks-downlo…
adrien-coye Oct 23, 2024
b25299f
chore: Merge branch 'externalLinks-listFiles' into externalLinks-down…
adrien-coye Oct 23, 2024
0b2fd4e
chore: Merge branch 'externalLinks-downloadFiles' into externalLinks-…
adrien-coye Oct 23, 2024
245e8bf
chore: PR Feedback
adrien-coye Oct 23, 2024
e41d291
chore: Merge branch 'externalLinks-listFiles' into externalLinks-down…
adrien-coye Oct 23, 2024
fbf4989
chore: PR Feedback
adrien-coye Oct 23, 2024
6c99ba0
chore: PR Feedback
adrien-coye Oct 23, 2024
0fe23be
chore: PR Feedback
adrien-coye Oct 23, 2024
2f33f7b
feat: LockedFolderViewController
adrien-coye Oct 23, 2024
7d8748f
feat: UnavaillableFolderViewController
adrien-coye Oct 23, 2024
95e4825
Merge pull request #1307 from Infomaniak/externalLinks-listFiles
adrien-coye Oct 23, 2024
3624e82
Merge pull request #1308 from Infomaniak/externalLinks-downloadFiles
adrien-coye Oct 23, 2024
fb8ba1c
feat: Error on fetch public share metadata brings the locked landing
adrien-coye Oct 23, 2024
4a92608
feat: Public Share limitations handling
adrien-coye Oct 24, 2024
70c38ac
feat: UFO asset
adrien-coye Oct 24, 2024
9889f33
feat: Public share locked UI match desing
adrien-coye Oct 24, 2024
424e218
feat: Latest UI
adrien-coye Oct 25, 2024
097e966
chore: New strings for public share
adrien-coye Oct 28, 2024
72ed359
chore: Merge branch 'master' into feature-externalLinks
adrien-coye Oct 29, 2024
60e1718
Merge pull request #1333 from Infomaniak/bump_i18n__
valentinperignon Oct 29, 2024
5b8f4c0
chore: Bump DB version as it was bumped on master
adrien-coye Oct 29, 2024
ffbb21c
chore: Merge branch 'feature-externalLinks' into externalLinks-locked…
adrien-coye Oct 29, 2024
a5aa0a1
chore: Making use of i18n
adrien-coye Oct 29, 2024
3cca05b
feat: Added last error type to trigger the correct screen
adrien-coye Oct 29, 2024
4b0f126
chore: Sonar feedback
adrien-coye Oct 30, 2024
ba63bfd
fix: Fix i18n keys
adrien-coye Oct 30, 2024
8ac9134
chore: Merge branch 'feature-externalLinks' into externalLinks-multiS…
adrien-coye Oct 30, 2024
1861f13
feat: Public Share multi selection actions are set to download only
adrien-coye Oct 30, 2024
709ed16
chore: Merge branch 'master' into feature-externalLinks
adrien-coye Nov 11, 2024
0bf3f9e
chore: Merge branch 'feature-externalLinks' into externalLinks-locked…
adrien-coye Nov 11, 2024
a79706e
chore: PR Feedback
adrien-coye Nov 11, 2024
5ad6e99
chore: PR Feedback
adrien-coye Nov 11, 2024
176ce72
chore: Remove VisualFormat
adrien-coye Nov 14, 2024
b744190
chore: Merge branch 'master' into feature-externalLinks
adrien-coye Nov 19, 2024
183b683
chore: Merge branch 'feature-externalLinks' into externalLinks-locked…
adrien-coye Nov 19, 2024
0b1a88e
Merge pull request #1328 from Infomaniak/externalLinks-lockedFolder
adrien-coye Nov 19, 2024
7054054
chore: Merge branch 'feature-externalLinks' into externalLinks-multiS…
adrien-coye Nov 27, 2024
ced6c19
chore: Removed unnecessary title
adrien-coye Nov 27, 2024
0513dfb
refactor: Split download action in manageable bits
adrien-coye Nov 27, 2024
7c48ef2
chore: PR notes
adrien-coye Nov 27, 2024
38dce7f
chore: Merge branch 'master' into feature-externalLinks
adrien-coye Nov 28, 2024
de883e0
fix: Fix broken merge
adrien-coye Nov 28, 2024
66fa72f
chore: Merge branch 'feature-externalLinks' into externalLinks-multiS…
adrien-coye Nov 28, 2024
424a60c
feat: Public share archive request working
adrien-coye Nov 28, 2024
89e00af
feat: External links upsale sheet (#1309)
adrien-coye Nov 29, 2024
6c88f15
feat: Download public share
adrien-coye Nov 29, 2024
c38313c
chore: Merge branch 'feature-externalLinks' into externalLinks-multiS…
adrien-coye Nov 29, 2024
744fc93
feat: Dedicated public share archive download endpoint
adrien-coye Dec 3, 2024
c53c4c1
chore: Self assessment
adrien-coye Dec 3, 2024
c5644a6
refactor: Removed action from ViewController and moved to the view in…
adrien-coye Dec 3, 2024
8918aa6
feat: Public share file count for select all
adrien-coye Dec 3, 2024
b7cfac7
fix: Working select all
adrien-coye Dec 4, 2024
50ee035
chore: Merge branch 'master' into feature-externalLinks
adrien-coye Dec 5, 2024
a78e782
chore: Merge branch 'feature-externalLinks' into externalLinks-multiS…
adrien-coye Dec 5, 2024
f8932ca
fix(DriveFileManager): Fix pagination for public share.
adrien-coye Dec 5, 2024
4538f46
fix(DriveFileManager): Fix pagination for public share (#1348)
PhilippeWeidmann Dec 6, 2024
5bd3729
refactor(SaveFileViewController): Split this class in some digestible…
adrien-coye Dec 6, 2024
65f7160
chore: SonarCloud
adrien-coye Dec 6, 2024
db10f5a
feat: Base work for add to my drive feature.
adrien-coye Dec 9, 2024
f802366
feat: Public share offline routing.
adrien-coye Dec 10, 2024
9493c63
chore: Merge branch 'feature-externalLinks' into externalLinks-famous…
adrien-coye Dec 10, 2024
ca518b7
feat: Offline in-memory DriveFileManager.
adrien-coye Dec 10, 2024
93bbb8e
feat: Authenticating add to kDrive call.
adrien-coye Dec 10, 2024
3105166
refactor: Substitute ViewControllerDismissable for a simple closure.
adrien-coye Dec 11, 2024
fa0097e
refactor(OnboardingViewController): Abstracted away the post login an…
adrien-coye Dec 11, 2024
1dea01e
fix: Allow disabled public share files
adrien-coye Dec 12, 2024
eb5bc34
feat: Add to my drive working
adrien-coye Dec 12, 2024
384b52d
refactor: Upsale floating panel constructor method
adrien-coye Dec 12, 2024
abd2bae
feat: Add to my kDrive floating action.
adrien-coye Dec 12, 2024
8eedeca
chore: Merge branch 'master' into feature-externalLinks
adrien-coye Dec 17, 2024
c35026c
chore: Merge branch 'feature-externalLinks' into externalLinks-multiS…
adrien-coye Dec 17, 2024
cdc49fa
chore: Merge branch 'feature-externalLinks' into externalLinks-famous…
adrien-coye Dec 17, 2024
f80e953
chore: Merge branch 'externalLinks-famousLastFivePercent' into extern…
adrien-coye Dec 17, 2024
691feee
fix(AddToMykDrive): Big button selects the correct drive by default
adrien-coye Dec 18, 2024
f349a1a
chore: Merge branch 'externalLinks-famousLastFivePercent' into extern…
adrien-coye Dec 18, 2024
b2f40c3
fix(AddToMykDrive): Big button selects the correct drive by default
adrien-coye Dec 18, 2024
26b1097
chore: Merge branch 'externalLinks-famousLastFivePercent' into extern…
adrien-coye Dec 18, 2024
711de84
refactor(UniversalLinksHelper): Public share deeplinks removed from U…
adrien-coye Dec 19, 2024
909c5b7
feat(DeeplinkService): If app started with a public share link before…
adrien-coye Dec 19, 2024
4d709db
chore: PR feedback
adrien-coye Dec 19, 2024
dfadb1d
refactor(DownloadOperation): Made a dedicated DownloadPublicShareOper…
adrien-coye Dec 30, 2024
0afa9b3
refactor(DownloadOperation): Factorised download request
adrien-coye Dec 30, 2024
42a8b05
chore: PR Feedback
adrien-coye Dec 30, 2024
f3c9853
refactor(DownloadOperation): Split into subclasses (#1367)
adrien-coye Dec 30, 2024
20ff0ef
chore: Merge branch 'feature-externalLinks' into externalLinks-multiS…
adrien-coye Dec 30, 2024
304bc54
chore: Merge branch 'feature-externalLinks' into externalLinks-famous…
adrien-coye Dec 30, 2024
3ff747c
refactor(DownloadArchiveOperation): Split dedicated public share code
adrien-coye Dec 30, 2024
d96e98d
refactor(DownloadArchiveOperation): Factorised download request
adrien-coye Dec 30, 2024
17109b6
refactor(DownloadArchiveOperation): Split code related to publicShare…
adrien-coye Dec 30, 2024
62ddb92
refactor(DownloadOperation): Renamed DownloadAuthenticatedOperation
adrien-coye Jan 2, 2025
351a198
refactor(DownloadOperationable): Renamed DownloadFileOperationable
adrien-coye Jan 2, 2025
2d60725
chore(DownloadOperation): Explicit sendable requirements from base Op…
adrien-coye Jan 2, 2025
052442b
refactor(DownloadOperation): Factorise a base DownloadOperation.
adrien-coye Jan 2, 2025
e93a347
chore: Sonar naming conventions
adrien-coye Jan 2, 2025
b3fe62d
chore: Merge branch 'master' into feature-externalLinks
adrien-coye Jan 2, 2025
2825da0
chore: Merge branch 'feature-externalLinks' into externalLinks-multiS…
adrien-coye Jan 2, 2025
24b3fec
chore: Merge branch 'externalLinks-multiSelect' into externalLinks-co…
adrien-coye Jan 2, 2025
6deacca
chore: Merge branch 'feature-externalLinks' into externalLinks-famous…
adrien-coye Jan 2, 2025
b9eb981
chore: Merge branch 'externalLinks-famousLastFivePercent' into extern…
adrien-coye Jan 2, 2025
6fadaec
chore: Merge branch 'externalLinks-famousLastFivePercent' into extern…
adrien-coye Jan 2, 2025
f23e753
chore: PR Feedback
adrien-coye Jan 2, 2025
d8eb82a
fix(VideoPlayer): Disable streaming for VideoPlayer within a public s…
adrien-coye Jan 2, 2025
37464bc
refactor(APIPublicShareParameter): Renamed PublicShareAPIParameters
adrien-coye Jan 2, 2025
2c1fbf4
chore: Self assessed PR feedback
adrien-coye Jan 6, 2025
399acfb
refactor(DownloadOperation): Public accessor for progress value
adrien-coye Jan 6, 2025
cc16b7a
refactor: Common download operation (#1370)
adrien-coye Jan 6, 2025
16985c9
chore: Merge branch 'externalLinks-famousLastFivePercent' into extern…
adrien-coye Jan 7, 2025
d294a79
refactor(DownloadQueue): Use abstract type DownloadFileOperationable …
adrien-coye Jan 7, 2025
c1f7fb4
feat: Multiselect behaviour (#1311)
adrien-coye Jan 7, 2025
da394c9
chore: Sonar Feedback
adrien-coye Jan 7, 2025
7df9df3
chore: Merge branch 'master' into feature-externalLinks
adrien-coye Jan 7, 2025
5604594
chore: Merge branch 'feature-externalLinks' into externalLinks-famous…
adrien-coye Jan 7, 2025
09d4102
test(MCKRouter): Adding missing mocked signatures
adrien-coye Jan 7, 2025
2d113f3
chore: Merge branch 'feature-externalLinks' into externalLinks-famous…
adrien-coye Jan 7, 2025
4d4dd6a
chore: Self review changes
adrien-coye Jan 7, 2025
d4b67a5
fix: Close multiSelection since the merge
adrien-coye Jan 7, 2025
944dac6
chore: Merge branch 'externalLinks-famousLastFivePercent' into extern…
adrien-coye Jan 7, 2025
7907779
feat: Keep addToMyDrive button enabled while multiselect
adrien-coye Jan 8, 2025
dd7c93c
chore: Matomo event naming
adrien-coye Jan 8, 2025
10332da
chore(UpsaleViewController): Removed comments
adrien-coye Jan 8, 2025
fe4a329
refactor(PublicShareAction): Factorised addToMyDrive code
adrien-coye Jan 8, 2025
6aa1342
feat(Router): New showUpsaleFloatingPanel method
adrien-coye Jan 8, 2025
6f6c012
refactor: Rework deeplinks (#1358)
adrien-coye Jan 8, 2025
46a882f
fix(addToMyDrive): Modified and checked new logic against every use c…
adrien-coye Jan 8, 2025
60bba8f
feat(PublicShareViewModel): Disable multi selection on addToMyDrive a…
adrien-coye Jan 8, 2025
3cbf6b3
chore(UT): Fix protocol changes in mocks
adrien-coye Jan 8, 2025
511dac2
chore: Merge branch 'externalLinks-famousLastFivePercent' into extern…
adrien-coye Jan 8, 2025
74eb232
feat: Loading ui on public share download all
adrien-coye Jan 9, 2025
65db643
refactor(SaveFileViewController): Rework init method
adrien-coye Jan 9, 2025
e9abcf7
feat: Factorise add to my drive action (#1350)
adrien-coye Jan 9, 2025
e73173e
feat: Cancel a download all action from UITabBarItem
adrien-coye Jan 9, 2025
d3a9775
refactor: Simpler UITapGestureRecognizer passthrew
adrien-coye Jan 9, 2025
4ff6630
chore: Perhaps a more consensual naming
adrien-coye Jan 9, 2025
ead2fca
chore(Matomo): Matomo on addToMyDrive
adrien-coye Jan 9, 2025
aece198
chore: Matomo event on upsale sheet presentation
adrien-coye Jan 9, 2025
c98d71a
fix(FloatingPanelLayouts): Made sure on iOS {16,17,18} iP SE 11Max th…
adrien-coye Jan 10, 2025
34f71ca
fix(DeeplinkService): Clear public share deeplink on user initiated exit
adrien-coye Jan 10, 2025
170ca99
fix(AppRouter): Made sure showUpsaleFloatingPanel works offline
adrien-coye Jan 10, 2025
8218ad4
fix(AppRouter): Making PublicShare navigation play nice with appLock
adrien-coye Jan 10, 2025
2ac721a
fix(PublicShare): Fix a bug where a reused PublicShare in memory data…
adrien-coye Jan 10, 2025
8174bec
chore(AppDelegate): Clean Public Share sample links
adrien-coye Jan 10, 2025
fa6ee29
feat: External links download all progres UI (#1375)
PhilippeWeidmann Jan 14, 2025
d32391f
refactor: Renamed nextVC to destinationViewController
adrien-coye Jan 14, 2025
f2822e3
chore: PR Feedback
adrien-coye Jan 14, 2025
af68df8
chore: Merge branch 'master' into feature-externalLinks
adrien-coye Jan 20, 2025
4c4e8fd
chore: Merge branch 'feature-externalLinks' into externalLinks-famous…
adrien-coye Jan 20, 2025
ee2f193
chore: Merge branch 'externalLinks-famousLastFivePercent' into extern…
adrien-coye Jan 20, 2025
265bad1
chore: Merge branch 'externalLinks-famousLastFivePercent' into extern…
adrien-coye Jan 20, 2025
1e6079e
chore: Merge branch 'externalLinks-famousLastFivePercent' into extern…
adrien-coye Jan 20, 2025
615ae5d
chore: Merge branch 'externalLinks-famousLastFivePercent' into extern…
adrien-coye Jan 20, 2025
eb38f35
feat: Add to my drive action (#1349)
adrien-coye Jan 21, 2025
50a874a
feat: Public share Matomo (#1376)
adrien-coye Jan 21, 2025
926ff5e
chore: Merge branch 'feature-externalLinks' into externalLinks-sheet-…
adrien-coye Jan 21, 2025
aeb1122
chore: Merge branch 'master' into feature-externalLinks
adrien-coye Jan 21, 2025
6e41a93
fix: Public Share action sheet offset (#1378)
PhilippeWeidmann Jan 22, 2025
3d5a213
feat(VideoPlayer.swift): Video preview streaming enabled
adrien-coye Jan 21, 2025
b7340aa
feat: Public Share video streaming in previews (#1392)
PhilippeWeidmann Jan 22, 2025
28d3b98
fix: Public Share works with app lock (#1379)
PhilippeWeidmann Jan 22, 2025
83086d9
chore(AppDelegate): Clean Public Share sample links (#1380)
PhilippeWeidmann Jan 22, 2025
3e18793
chore: Sonar feedback
adrien-coye Jan 22, 2025
2a7e0b3
chore: Swiftformat feedback
adrien-coye Jan 22, 2025
b9da8a7
feat(FileGridCollectionViewCell): Preview thumbnails
adrien-coye Jan 22, 2025
05fddd6
fix: Clear public share link on logout
adrien-coye Jan 22, 2025
eab3002
fix: Missing entry point to reload the Public Share link post authent…
adrien-coye Jan 22, 2025
2a9192b
feat(FileGridCollectionViewCell): Preview thumbnails (#1393)
PhilippeWeidmann Jan 22, 2025
e4f70c3
refactor(LoginDelegateHandler): Remove extraneous Task
adrien-coye Jan 22, 2025
fedfd88
fix(DeeplinkService): Make sure task is ran on the main queue
adrien-coye Jan 22, 2025
c2c63dd
fix: Public share link behaviour on login and logout (#1394)
PhilippeWeidmann Jan 22, 2025
65fca3b
feat(PreviewViewController): Download in cache public share files for…
adrien-coye Jan 22, 2025
0d04c47
feat(PreviewViewController): Download in cache public share files for…
PhilippeWeidmann Jan 23, 2025
589d089
chore: Merge branch 'master' into feature-externalLinks
adrien-coye Jan 23, 2025
b0f2ab3
fix(PreviewViewController): Disable edit button in public share mode
adrien-coye Jan 23, 2025
f4e459c
fix(PreviewViewController): Disable edit button in public share mode …
PhilippeWeidmann Jan 24, 2025
79ba7bc
fix(FileListViewController): Bottom padding in public share mode
adrien-coye Jan 24, 2025
35d1b1d
fix(FileListViewController): Bottom padding in public share mode (#1401)
PhilippeWeidmann Jan 24, 2025
c4e70ea
chore: Merge branch 'master' into feature-externalLinks
adrien-coye Jan 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Tuist/ProjectDescriptionHelpers/ExtensionTarget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public extension Target {
"kDrive/UI/Controller/DriveUpdateRequiredViewController.swift",
"kDrive/UI/Controller/FloatingPanelSelectOptionViewController.swift",
"kDrive/UI/Controller/Create File/FloatingPanelUtils.swift",
"kDrive/UI/Controller/Create File/FloatingPanelLayouts.swift",
"kDrive/UI/Controller/Files/Categories/**",
"kDrive/UI/Controller/Files/Rights and Share/**",
"kDrive/UI/Controller/Files/Save File/**",
Expand Down
113 changes: 113 additions & 0 deletions kDrive/AppRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import InfomaniakCore
import InfomaniakCoreUIKit
import InfomaniakDI
import InfomaniakLogin
import kDriveCore
import kDriveResources
import SafariServices
Expand All @@ -33,6 +34,8 @@ public struct AppRouter: AppNavigable {
@LazyInjectService private var reviewManager: ReviewManageable
@LazyInjectService private var availableOfflineManager: AvailableOfflineManageable
@LazyInjectService private var accountManager: AccountManageable
@LazyInjectService private var infomaniakLogin: InfomaniakLoginable
@LazyInjectService private var deeplinkService: DeeplinkServiceable

@LazyInjectService var backgroundDownloadSessionManager: BackgroundDownloadSessionManager
@LazyInjectService var backgroundUploadSessionManager: BackgroundUploadSessionManager
Expand Down Expand Up @@ -144,6 +147,7 @@ public struct AppRouter: AppNavigable {
Task {
await askForReview()
await askUserToRemovePicturesIfNecessary()
deeplinkService.processDeeplinksPostAuthentication()
}
case .onboarding:
showOnboarding()
Expand Down Expand Up @@ -412,6 +416,16 @@ public struct AppRouter: AppNavigable {
}
}

@MainActor public func showUpsaleFloatingPanel() {
guard let topMostViewController else {
return
}

let upsaleFloatingPanelController = UpsaleViewController
.instantiateInFloatingPanel(rootViewController: topMostViewController)
topMostViewController.present(upsaleFloatingPanelController, animated: true)
}

@MainActor public func showUpdateRequired() {
guard let window else {
SentryDebug.captureNoWindow()
Expand Down Expand Up @@ -444,6 +458,27 @@ public struct AppRouter: AppNavigable {
viewController.present(vc, animated: true)
}

@MainActor public func showRegister(delegate: InfomaniakLoginDelegate) {
guard let topMostViewController else {
return
}

MatomoUtils.track(eventWithCategory: .account, name: "openCreationWebview")
let registerViewController = RegisterViewController.instantiateInNavigationController(delegate: delegate)
topMostViewController.present(registerViewController, animated: true)
}

@MainActor public func showLogin(delegate: InfomaniakLoginDelegate) {
guard let topMostViewController else {
return
}

MatomoUtils.track(eventWithCategory: .account, name: "openLoginWebview")
infomaniakLogin.webviewLoginFrom(viewController: topMostViewController,
hideCreateAccountButton: true,
delegate: delegate)
}

// MARK: AppExtensionRouter

public func showStore(from viewController: UIViewController, driveFileManager: DriveFileManager) {
Expand Down Expand Up @@ -585,6 +620,84 @@ public struct AppRouter: AppNavigable {

// MARK: RouterFileNavigable

@MainActor public func presentPublicShareLocked(_ destinationURL: URL) {
guard let window,
let rootViewController = window.rootViewController else {
return
}

rootViewController.dismiss(animated: false) {
let viewController = LockedFolderViewController()
viewController.destinationURL = destinationURL
let publicShareNavigationController = UINavigationController(rootViewController: viewController)
publicShareNavigationController.modalPresentationStyle = .fullScreen
publicShareNavigationController.modalTransitionStyle = .coverVertical

rootViewController.present(publicShareNavigationController, animated: true, completion: nil)
}
}

@MainActor public func presentPublicShareExpired() {
guard let window,
let rootViewController = window.rootViewController else {
return
}

rootViewController.dismiss(animated: false) {
let viewController = UnavaillableFolderViewController()
let publicShareNavigationController = UINavigationController(rootViewController: viewController)
publicShareNavigationController.modalPresentationStyle = .fullScreen
publicShareNavigationController.modalTransitionStyle = .coverVertical

rootViewController.present(publicShareNavigationController, animated: true, completion: nil)
}
}

@MainActor public func presentPublicShare(
frozenRootFolder: File,
publicShareProxy: PublicShareProxy,
driveFileManager: DriveFileManager,
apiFetcher: PublicShareApiFetcher
) {
guard let window,
let rootViewController = window.rootViewController else {
return
}

if let topMostViewController, (topMostViewController as? LockedAppViewController) != nil {
return
}

rootViewController.dismiss(animated: false) {
let configuration = FileListViewModel.Configuration(selectAllSupported: true,
rootTitle: nil,
emptyViewType: .emptyFolder,
supportsDrop: false,
leftBarButtons: [.cancel],
rightBarButtons: [.downloadAll],
matomoViewPath: [
MatomoUtils.Views.menu.displayName,
"publicShare"
])

let viewModel = PublicShareViewModel(publicShareProxy: publicShareProxy,
sortType: .nameAZ,
driveFileManager: driveFileManager,
currentDirectory: frozenRootFolder,
apiFetcher: apiFetcher,
configuration: configuration)
let viewController = FileListViewController(viewModel: viewModel)
viewModel.onDismissViewController = { [weak viewController] in
viewController?.dismiss(animated: false)
}
let publicShareNavigationController = UINavigationController(rootViewController: viewController)
publicShareNavigationController.modalPresentationStyle = .fullScreen
publicShareNavigationController.modalTransitionStyle = .coverVertical

rootViewController.present(publicShareNavigationController, animated: true, completion: nil)
}
}

@MainActor public func present(file: File, driveFileManager: DriveFileManager) {
present(file: file, driveFileManager: driveFileManager, office: false)
}
Expand Down
24 changes: 24 additions & 0 deletions kDrive/Resources/Assets.xcassets/UFO.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"images" : [
{
"filename" : "abducted_files.svg",
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
39 changes: 39 additions & 0 deletions kDrive/Resources/Assets.xcassets/UFO.imageset/abducted_files.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"images" : [
{
"filename" : "lock-clear.svg",
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "lock-dark.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "img-kDrive.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "original"
}
}
Loading
Loading