1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-10-26 06:42:48 +02:00
Commit Graph

7863 Commits

Author SHA1 Message Date
allexzander
ab128cc4aa Revert "Merge pull request #3042 from nextcloud/temp-fix-vfs-failure-wow6432"
This reverts commit cafa475398, reversing
changes made to 003e56f4e6.
2021-03-26 22:25:31 +02:00
allexzander
9d15334813 Temp fix for vfs failure.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-26 21:41:44 +02:00
Camila
9219926a74
Add checks in case userStatus is not available/fails on the server side.
Signed-off-by: Camila <hello@camila.codes>
2021-03-24 15:42:26 +01:00
Camila
d9a0778e52
Add UserStatus enum with the pre defined status.
- User QHash to map status strings and Status enum.

Signed-off-by: Camila <hello@camila.codes>
2021-03-24 15:41:31 +01:00
Camila
974e2fb718
Do not display notifications when user status is do not disturb.
- This information is retrieved from the notifications endpoint.
- Add icons for the different pre defined status.
- Make functions available to QML to decide which status icon to display.
- Display the user status icon on the avatar and
move the online/offline connection status to the folder icon.

Signed-off-by: Camila <hello@camila.codes>
2021-03-24 15:40:05 +01:00
Camila
f4d8699db8
Add UserStatus class to retrieve the user status.
- AccountState controls UserStatus.
- Display user status in the system tray menu next to user's avatar.

Signed-off-by: Camila <hello@camila.codes>
2021-03-24 15:39:13 +01:00
Valdnet
519dee9104 l10n: Change sync message #3027 2021-03-24 13:13:40 +00:00
allexzander
193e50311b Refresh Windows download dialog progress when hydrating a placeholder
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-24 14:09:06 +02:00
Felix Weilbach
d78774f29e Check reading from journal was successful before remove placeholder
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-24 10:51:50 +00:00
Felix Weilbach
c296a93cee Enable high dpi scaling on all platforms
Fixes #2295, #1079, #914

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-23 08:36:11 +00:00
Felix Weilbach
b1983d7d19 Increase logging around file removal events
To better see what is going on when and if files are removed by the
client.

See also: #260, #1433, #2913

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-22 07:48:39 +00:00
Felix Weilbach
9bf5b5c7ba CFAPI: Handle cancelation of hydration requests
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-18 10:43:48 +00:00
allexzander
5f0344abb2 Fix warnings in CfApiWrapper.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-18 12:07:07 +02:00
allexzander
3fde838bee Fix for Windows long path issue.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-18 12:07:07 +02:00
Felix Weilbach
f4853da2ab Fix crash when trying to open the folder creation dialog
The bug does seem to just appear in special compiler
constellations. We're unsure why this fix works. To better see if this
fix works or if crashes still occur, we added some logging.

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-17 08:43:32 +01:00
Felix Weilbach
c0f09ae12c Don't check against product name if checking server version
We should not rely on the product name because it is something the
user can change in the theming options on the server.

Fixes #3001

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-16 14:30:56 +00:00
Felix Weilbach
ff7932bb54 Display the content of the login dialog correct
This adjustment is necessary because of the changes of the new account
wizard that were introduced with:
e0b7ef15b2

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-16 13:34:34 +00:00
Kevin Ottens
a6bcd3af46 Force basic auth on get authentication required error
If the get job got an authentication required error on the account url
(not davUrl! at that stage we always get auth error there), then it is
safe to assume basic auth is used on the server. It is then kind of
pointless to use any other auth mode they will necessarily fail. Only
basic auth will do the job so force it.

Signed-off-by: Kevin Ottens <kevin.ottens@enioka.com>
2021-03-15 09:38:15 +00:00
Kevin Ottens
0d3459e85e Introduce an empty auth type
This is necessary to be able to distinguish between "I decided on basic
by default" and "I didn't write any auth type". To make sure all the
jobs end up writing something we then implement the "I decided on basic
by default" in the slots connected to the job and we assert it in
checkAllDone()

Signed-off-by: Kevin Ottens <kevin.ottens@enioka.com>
2021-03-15 09:38:15 +00:00
Kevin Ottens
7ad0208800 Finish cleaning up shibboleth
There were a couple of shibboleth related enums left, since that auth
method isn't supported anymore remove the code tied to those enums. It
was dead code anyway.

Signed-off-by: Kevin Ottens <kevin.ottens@enioka.com>
2021-03-15 09:38:15 +00:00
Felix Weilbach
cdc2e4c56e Don't customize settings dialog palette
Customizing of the palette will prevent the settings dialog from
display a dark theme correct.

Fixes #2993

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-12 11:47:16 +01:00
allexzander
c89d351d97 Fix incorrect type when reading the 'logExpire' property from config.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-12 10:23:31 +02:00
Felix Weilbach
88426de4dd Add missing error handling for downloads of client side encryption
The missing error handlers can cause the sync to hang forever

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-11 10:59:08 +00:00
Felix Weilbach
e3ac63e9ff Rename isActivityIgnored() to isUnsolvableconflict()
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-11 09:42:38 +00:00
Felix Weilbach
05d31e2e53 Split content of User::isValueableActivity()
Refactoring of User::isValueableactivity() because of changes
introduced with merge commit f17c52d.

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-11 09:42:38 +00:00
Felix Weilbach
e0b7ef15b2 Restyle wizard pages
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-10 09:55:40 +01:00
Felix Weilbach
f55e5b1885 Restyle wizard
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-10 09:55:40 +01:00
Felix Weilbach
9185956069 Split out wizard welcome page
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-10 09:55:40 +01:00
István Váradi
2e7cc96228 Do not include glib.h with extern C (2)
Signed-off-by: István Váradi <ivaradi@varadiistvan.hu>
2021-03-10 07:48:23 +01:00
István Váradi
db321d25ef Do no include glib.h with extern C
Signed-off-by: István Váradi <ivaradi@varadiistvan.hu>
2021-03-09 10:29:14 +01:00
Felix Weilbach
63dbb90bbd Iteration
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-05 11:32:44 +00:00
Felix Weilbach
ef5abac567 Fix crashes with conflict dialog
When the client runs and a conflict gets detected, the sync engine runs
two times.

On the first run, the sync engine detects the conflict, marks the
file as a conflict and propagates that to the GUI. This leads to an
error notification with the original filename in the main dialog.

The sync engine runs then a second time. On this second run, the file
that originally caused the conflict is not anymore a conflict
file. Instead, the sync engine detects the conflicted copy and
propagates that file as a conflict to the GUI.

When opening the conflict dialog with the original file name (not the
conflicted copy) a crash happens. Usually, the two sync runs are really
fast, so the user does not notice the first notification. However, a
problem can occur if a conflict gets created while the client is not
running. Since then, the client does not do two sync runs. It does only
run once.

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-05 11:32:44 +00:00
Felix Weilbach
523f1bcadd VFS Windows: Fix download of large files
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-04 09:05:17 +01:00
Felix Weilbach
4d05979be5 Log error message from CFAPI
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-02-27 17:44:26 +00:00
allexzander
88a21c0665 Do not add debug build to startup programs.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-02-18 13:19:06 +00:00
allexzander
4d66d209bc Fix incorrect logger output for non-latin strings.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-02-16 09:30:08 +02:00
Felix Weilbach
29e1a82f56 Add missing override specifer to WebFlowCredentials
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-02-13 10:22:01 +00:00
marcohald
6032f2baef
Merge branch 'master' into master 2021-02-12 15:19:34 +01:00
Marco Hald
43ed8423e5 Configuration Options for Windows Registry
Added the configuration  options
        confirmExternalStorage
        crashReporter
        newBigFolderSizeLimit
        useNewBigFolderSizeLimit
    to the Windows registry

Signed-off-by: Marco Hald <marcohald@users.noreply.github.com>
2021-02-12 12:23:51 +01:00
Felix Weilbach
74d07e28cf Validate the providers ssl certificate
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-02-12 08:25:59 +00:00
allexzander
013f3cea70 Validate sensitive URLs to onle allow http(s) schemes.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-02-09 15:00:35 +02:00
allexzander
e97b7d8a25 Default parameter nullptr widget for openBrowser.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-02-09 08:40:51 +00:00
István Váradi
92f1074fcc Put FolderCreationDialog into the OCC namespace.
Signed-off-by: István Váradi <ivaradi@varadiistvan.hu>
2021-02-05 16:27:25 +01:00
Kevin Ottens
856f0567a7 Make sure we pass a full remote path to LSCOL jobs
Indeed the path we have is supposedly not fully qualified in case of a
sync folder which doesn't point to / on the remote end. But LSCOL works
with absolute paths on the server so make sure this is what we give it
out.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-02-04 11:16:48 +00:00
Kevin Ottens
dd83efb543 The e2eMangledName was relative to the remote folder, repair it
This got broken during the huge discovery refactoring. I wrongly passed
the mangled name as is out of discovery, but coming from listing jobs it
was fully qualified while the jobs at propagation time and the db expect
those paths to be relative to the remote folder.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-02-04 11:16:48 +00:00
allexzander
81a090b362 Allow creation of new folders from the Settings Dialog.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-02-04 10:05:18 +02:00
allexzander
3d266b9246 Win tests compilation fix. For Windows, the build was failing because of not being able to locate #include <sqlite3.h> in tests.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-02-03 13:52:10 +02:00
Kevin Ottens
55fd0562de
Load the theme resource explictly
Otherwise they won't be loaded automatically at startup leading to lots
of missing icons. Since they're now in a static library they need that
explicit loading.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-02-02 18:33:45 +01:00
Felix Weilbach
d8493a9b3b Add automoc property to updater
Signed-off-by: Felix Weilbach <felix.weilbach@t-online.de>
2021-02-02 13:35:04 +00:00
Felix Weilbach
02dd363feb Add test utils library
The test utils library collects all dependencies that are needed for
tests and gets automatically linked with every test.

Signed-off-by: Felix Weilbach <felix.weilbach@t-online.de>
2021-02-02 13:35:04 +00:00
Felix Weilbach
73a41d8e34 Compile nextcoud gui as separate library
Compiling nextcoud gui as a separate library. This is needed to more
easily write tests. The whole nextcloud application can now be linked
against the tests.

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-02-02 13:35:04 +00:00
Kevin Ottens
1456d6e433
Revert "Specify PUBLIC for the link targets to make them visible to windeployqt"
This reverts commit 002abdc38b.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-27 19:06:23 +01:00
allexzander
8c4d5333c1 Use push notifications for Tray activities/notifications fetch trigger.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-01-27 19:53:28 +02:00
Kevin Ottens
002abdc38b
Specify PUBLIC for the link targets to make them visible to windeployqt
I went full steam on making it all public which is not really required,
it's only really QtWebSockets we're after. Could always be fine tuned
later on if this works as expected.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-27 18:00:26 +01:00
Felix Weilbach
51d8cf8102 Start file conflict resolve dialog asynchronous
Fixes #2804

Signed-off-by: Felix Weilbach <felix.weilbach@t-online.de>
2021-01-27 08:01:25 +00:00
Valdnet
d8a88fd047 Replace dots with ellipses and add spaces. 2021-01-27 07:36:52 +00:00
Kevin Ottens
ebfe51b7e7 Don't treat new folders in unpinned folders as files to dehydrate
This would only happen if the parent of the newly created folder would
be explicitly set to online only, hence why it went under the radar
previously.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 17:09:24 +00:00
Valdnet
817d460b84 Move space in "owncloudadvancedsetuppage.cpp" 2021-01-26 16:40:46 +00:00
Kevin Ottens
d20fc1a6ce Remove unused method
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 11:20:13 +00:00
Kevin Ottens
4168c0d082 Avoid keeping Account alive via a shared ptr in ClientSideEncryption
This account object was really only used during the initialization phase
or for forgetting the sensitive data. So let's receive it as parameter
there and pass it on from job to job as needed.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 11:20:13 +00:00
Kevin Ottens
21035d48a6 Don't crash when the same request is filled twice
The OS might request the same file again if we take too much time to
fulfill a request. So in case it's queueing the same one again instead
of bailing out just fail the second one and let the first one finish
properly.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 10:58:14 +00:00
Kevin Ottens
d3c7218ee8 Be a bit more resilient with errors
In case we'd been to slow to fullfill or we're still processing a
cancelled request better not just crash. We still log the issue though.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 10:58:14 +00:00
Valdnet
f365ec1e4c Move space in "folderwizard.cpp" 2021-01-25 17:42:38 +00:00
Valdnet
8539dc7dc6 Change the quotation marks 2021-01-25 17:33:46 +00:00
Felix Weilbach
78f00acaa2 Add push notifications for file changes
Resolves #2802

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-01-25 17:01:09 +00:00
Kevin Ottens
4992bfa8ef
Ensure the right radio is selected when selective sync is picked
This got broken previously when trying to reconcile during a
cherry-pick. This also repairs the case when the theme tells us the
default is to not select anything (not that we're using this right now
but in case we'd like to brand this).

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-25 16:53:21 +01:00
Kevin Ottens
2b2dac10ef
It's not really recommended anymore at least not on Windows
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-25 16:24:44 +01:00
allexzander
eb80f54dcf E2EE Fix incorrect name of a nested encrypted item in the Settings dialog when the root folder is non-encrypted and it is renamed.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-01-25 10:35:54 +02:00
allexzander
483a874cb6 Fix folder upload issue due to wrong Lock/Unlock order
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-01-25 10:35:30 +02:00
allexzander
79fe231acc Fix E2EE root folder rename issue.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-01-25 10:35:30 +02:00
Nicolas Fella
ab064c92b6 Fix build against Qt 5.15.3
Use QLatin1Char to prevent build error due to stricter QT_NO_CAST_FROM_ASCII

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2021-01-25 08:19:49 +00:00
rakekniven
c3403b83ef Removed blank before colon
Signed-off-by: rakekniven <mark.ziegler@rakekniven.de>
2021-01-25 08:08:13 +00:00
Kevin Ottens
48f0c54a90 Fix the branding detection for monochrome icons on Mac
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-21 06:39:11 +00:00
Kevin Ottens
96b2b2a509 Revert "Make monochrome icons the default on Linux and Mac OS."
This reverts commit 016410dbaa.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-21 06:39:11 +00:00
Kevin Ottens
471bb25e62
Use APPLICATION_ICON_SET for themed icons
We now favor APPLICATION_ICON_SET to isBranded() regarding the decision
to use PNG or SVG for icons.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-20 15:11:57 +01:00
Kevin Ottens
88986749a4
Use the SVG wizard logo when APPLICATION_ICON_SET says so
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-20 15:09:58 +01:00
allexzander
96472320e4 Fix e2ee folder move issue
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-01-14 15:54:30 +02:00
Kevin Ottens
1aeb77c967
Add the XAttr backend prototype with its test suite
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-14 12:57:03 +01:00
Kevin Ottens
7c8b7db725
Don't detect file changes during hydration for virtual files
Indeed, that file size will almost always change between the 1 byte
placeholder and the hydrated file. Only when using the CfAPI on Windows
this won't be the case since because it will expose the original size
even for placeholders.

Also worth noting: the suffix backend didn't hit that case since the
filename changes (with suffix for placeholders, without for hydrated
files).

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-14 12:57:03 +01:00
Kevin Ottens
6e51dcf9c6
Provide the path to the current folder to statTypeVirtualFile on unix
Otherwise backends can't get to the actual file which will be needed for
the XAttr backend.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-14 12:57:03 +01:00
Kevin Ottens
a89b483773
Add the plumbing for a new extended attributes backend
Ideally this will end up being the backend we use for both Linux and
macOS but that will require work with desktop environments on the Linux
side and to reverse engineering at least on xattr value on macOS.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-14 12:57:02 +01:00
allexzander
bf5b214e0e E2EE fix upload parallelism issue.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-01-14 06:59:05 +00:00
Kevin Ottens
5325e058d8
Repair chunked uploads
There's been a confusion between the chunk number and the chunk
offset leading to corruptions... Let's pass the proper offset to
the UploadDevice again.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-13 18:00:19 +01:00
allexzander
4ed7feab2b Implement nested items removal when removing root encrypted folder.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-01-11 21:12:58 +02:00
Kevin Ottens
2d8eb19ee5
Second attempt at fixing CfAPI wrapper build in Win32 mode
MSVC having so useless error messages it didn't quite point to the root
cause of the issue... it turns out that through the maze of macros
defined in the windows API, there's one which impacted the function
pointer definition of CfCloseHandle which would then not convert to
FileHandle::Deleter as expected. So I end up wrapping it in a lambda to
help... luckily this kind of lambdas decay into a simple function
pointer so there's likely no overhead it's just to coerce the compiler
into doing the right thing.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-07 13:49:10 +01:00
Kevin Ottens
79a54d68ed
Revert "Fix CfAPI wrapper build in Win32 mode"
This reverts commit 3b3864296a.
2021-01-07 13:40:01 +01:00
Kevin Ottens
3b3864296a
Fix CfAPI wrapper build in Win32 mode
For some reason MSVC manages to deduce the right constructor in Win64
mode but not in Win32 mode. So let's be more explicit about what we
return.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-06 17:07:50 +01:00
Felix Weilbach
db0f1e245d Remove NO_SHIBBOLETH flag and dead code
Signed-off-by: Felix Weilbach <felix.weilbach@t-online.de>
2021-01-05 12:58:58 +01:00
Hannah von Reth
09cc988026
Fix a possible crash with the remove all files dialog 2020-12-30 16:20:43 +01:00
Kevin Ottens
da3ff631ef
Use Q_REQUIRED_RESULT directly like in other places
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 16:20:42 +01:00
Hannah von Reth
72b6118c3e
Mark vfs functions as OC_REQUIRED_RESULT 2020-12-30 16:17:48 +01:00
Hannah von Reth
aadda32633
Handle errors in convertToPlaceholder 2020-12-30 16:17:47 +01:00
Hannah von Reth
552427ffc3
Update windows launch on start binary location
Fixes: #7672
2020-12-30 16:17:47 +01:00
Hannah von Reth
713a429675
Add todo for Qt 5.15 2020-12-30 16:17:47 +01:00
Hannah von Reth
1144473f5d
Cleanup pathtoUNC and its test 2020-12-30 16:17:46 +01:00
Hannah von Reth
51d73e27ea
Clarify comment 2020-12-30 16:17:46 +01:00
Hannah von Reth
3f873ed2ee
Simplify file comparison 2020-12-30 16:17:46 +01:00
Hannah von Reth
157d526129
Include auth type in http log 2020-12-30 16:17:46 +01:00
Hannah von Reth
f6f7789afa
Log the final http request 2020-12-30 16:17:41 +01:00
Kevin Ottens
46a5bd6b25
Ensure we properly cancel hydration on server errors
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:59 +01:00