Claudio Cambra
726503f3c7
Add custom equality check to FileProviderItemMetadata
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:13 +08:00
Claudio Cambra
269fb03351
Add starter FileProviderMaterialisedItemsModel
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:13 +08:00
Claudio Cambra
389e663219
Add method to get qtified file provider item metadata for account in FileProviderSettingsController
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:13 +08:00
Claudio Cambra
134eae63dd
Add static convenience method to FileProviderItemMetadata to convert from NSFileProviderItem
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:13 +08:00
Claudio Cambra
e3a0dabb07
Add convenience function to convert extendedAttributes to QHash
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:13 +08:00
Claudio Cambra
a34a390790
Add a convenience function to convert from nsnamecomponents to qstring
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
57d1dc84aa
Add a Qt-based data class for file provider items
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
fec9902a25
Store materialised file metadata in file provider settings controller
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
c3490db271
Keep track of materialised files in storageuseenumerationobserver
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
0b8a2315a0
Leave usage as a property of materialised files enumerator
...
Do this instead of passing as variable in completion handler
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
02b47b47f8
Fix positioning fo elements in FileProviderSettings UI
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
679177eae2
Add property to file provider settings controller displaying remote file storage usage
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
f68965a241
Fetch and store user info for accounts in file provider settings controller
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
7d229b569f
Move GB with decimal number calculation to function
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
4e8eab6cd9
Handle edge cases with materialised files enumeration and improve logging
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
22a521d2a2
Hold a strong reference to UsageEnumerationFinishedHandler
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
9105a4584e
Use NSUInteger directly when calculationg usage in FileProviderStorageUseEnumerationObserver
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
18ed46ef77
Expose local storage usage for account in gigabytes to QML
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
2105596643
Fetch materialised files storage usage per account on creation of FileProviderSettingsController
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
8fdc69b3cc
Calculate total storage use from enumerator for materialised files in fileproviderstorageuseenumerationobserver
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
435e25d75c
Define ompletion block for fileproviderstorageuseenumerationobserver
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
b83f0a51a9
Add starter fileproviderstorageuseenumerationobserver
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
97c963dcab
Remove fp domain id from registered domains when removal is confirmed
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
5aa7138643
Do not bother trying to add a fp domain if we know it is active
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
e4aeb5b481
Update file provider domain enablement status upon settings change
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
15525bca62
Separate file provider domain updating into separate slot
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
ee6c081603
Enable file provider domains per the settings in the file provider domain manager
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
1db59fecc1
Remove ConfigFile().macFileProviderModuleEnabled() config flag
...
Since we are going to distribute the file provider client as separate
from the normal client, this flag doesn't make any practical sense.
The user using the FileProvider desktop client will not want to not
use the file provider module
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
0c40ceff9c
Init widely-used variables in MacImplementation at declaration, fix nullability warnings
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
58262a8d94
Ensure account is file provider vfs enablement is correctly set in NSUserDefaults
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
f5b80e9ec1
Run initial check on creation of FileProviderSettingsController
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
5f059a23ce
Add method to enable file provider vfs for all accounts
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
42b72f9d9a
Use [[nodiscard]] for MacImplementation methods
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
556bce2672
Move fp settings controller out of ui folder
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
e9451e9281
Set account as property of settings view root object rather than context property
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
a57cb3df9d
Register file provider settings controller as singleton in qml engine
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
ba3baa406b
Expose account user id with host to QML
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
3c26e25a3c
Notify when enabled file provider vfs accounts change
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
ac608a661d
Use default constructor for FileProviderSettingsController::MacImplementation
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
9a880f4199
Implement modification of file provider enabled for account
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
c69bb4375c
Make it possible to check whether an account has vfs enabled or not
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
94ce3da9c5
Treat FileProviderSettingsController::settingsViewWidget as a factory method
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
20f89c6999
Make the fp settings controller static
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
0e02a64c5e
Lazily load settings view widget
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
d80962b634
Instantiate internal MacImplementation in file provider settings controller
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
27c803a3d8
Add MacImplementation private class to interface with obj-c settings API
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:07 +08:00
Claudio Cambra
7e4d643ade
Add starter FileProviderSettings objective c class
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:07 +08:00
Claudio Cambra
2863415428
Add access to FileProviderSettingsController in FileProviderSettings page
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:07 +08:00
Claudio Cambra
f607bfaca1
Make file provider settings controller implementation an Objective-C++ file
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:07 +08:00
Claudio Cambra
8070dbd9f6
Implement basic layout for file provider configuration UI
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:07 +08:00