This works around a bug in KDE's qqc2-desktop-style which breaks buttons
with icons not based on a name. By forcing a style name the KDE Plasma
platformtheme plugin won't try to force qqc2-desktops-style anymore.
Can be removed once the bug in qqc2-desktop-style is gone.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
It it never set by calling code so the default value of 10000 is used. It is only used in the call to QSystemTrayIcon, which uses 10000 as default value too.
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
This allows the notification server to map a notification to the program's desktop file, which allows the server to do extra things. For example KDE Plasma adds the Nextcloud icon to the notification and allows to configure notifications from Nextcloud.
This is a standard hint from https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#hints
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
- Default: BUILD_UPDATER = NO
To ease builds for distro packages and contributors (regardless of the specified update URL)
- Enable updater build for Drone CI and AppImage builds
Signed-off-by: Michael Schuster <michael@schuster.ms>
- Application name, version number, OS
Example: Nextcloud Desktop Client
Version 2.6.4 (macOS)
- Keep previous version info in new method Theme::aboutDetails()
Signed-off-by: Michael Schuster <michael@schuster.ms>
So that user may continue to use http2 on their webpage
Signed-off-by: XNG <Milokita@users.noreply.github.com>
(cherry picked from commit dad95d4e46)
Signed-off-by: Michael Schuster <michael@schuster.ms>
The PropfindJob quota includes the size of shares and thus leads to confusion
in regard of the real space available, as shown in the UI.
This commit aims to streamline the behaviour with the Android and iOS apps,
which also utilize the API.
Details:
- Refactor the QuotaInfo class into UserInfo
- Use JsonApiJob (ocs/v1.php/cloud/user) instead of PropfindJob
- Let ConnectionValidator use the new UserInfo class to fetch
the user and the avatar image (to avoid code duplication)
- Allow updating the avatar image upon AccountSettings visibility,
using UserInfo's quota fetching
Signed-off-by: Michael Schuster <michael@schuster.ms>
Only save notes on submit. Else you will get spammed with a ton of
requests (and possibly mails)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
- Allow direct editing "Edit" when an editor is available for the mime type
- Show "Open in browser" if editing is unavailable (as previously)
(now on top of the menu list)
- Rename the menu title to the app name, "Nextcloud" instead of "Share via ..."
Signed-off-by: Michael Schuster <michael@schuster.ms>
- Fetch in ConnectionValidator::slotCapabilitiesRecieved
- Add editors to a list made of the new DirectEditor class
TODO:
- Add support for re-fetch and continously check for changes (ETag)
Signed-off-by: Michael Schuster <michael@schuster.ms>
- Modify Window.qml and Systray to show the App menu upon clicking the App button
on the top-right. Fall back to opening the general URL in case no apps are found.
- Introduce a new UserAppsModel in UserModel.cpp to access the fetched server Apps
from AccountState (propagated down from the User class).
Signed-off-by: Michael Schuster <michael@schuster.ms>
Since the per Account App list is now being built in AccountState's slotNavigationAppsFetched
it's easy to filter for the availability of the Talk app on the server by its ID property
upon App list building, thus eliminating the need for an extra fetch job.
Signed-off-by: Michael Schuster <michael@schuster.ms>
- Add a new class AccountApp to keep them in an AccountAppList
and also save properties like ID and Icon URL.
- Clear the app list upon re-fetch to avoid endlessly growing lists
like in the previous implementation in ownCloudGui.
Signed-off-by: Michael Schuster <michael@schuster.ms>
- Ensure that the folder integration stays persistent in Explorer,
the uninstaller removes the folder upon updating the client.
Recreate all entries upon start. This has the benefit of removing
old remains of non-working, outdated entries.
- Don't crash on the other systems when the user clicks the option
button "Show sync folders in Explorer's Navigation Pane".
Even though the option currently doesn't work on the other platforms,
crashing is never good...
Signed-off-by: Michael Schuster <michael@schuster.ms>
Fixes#1485
This was missed when creating the new share dialog.
Now it pops up with a nice share password dialog to enter for your link
share.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
The local date and time value was converted into a string, just to be converted
into another string, to be converted to a value once again, returning zero as
the result. This caused the widget to always display "now".
Looks like this was a simply copy and paste mistake from this line in
ActivityListModel::slotActivitiesReceived:
a._dateTime = QDateTime::fromString(json.value("date").toString(), Qt::ISODate);
Signed-off-by: Michael Schuster <michael@schuster.ms>
With QtKeychain on Windows, storing larger keys or certs in one keychain entry causes the
following error due to limits in the Windows APIs:
Error: "Credential size exceeds maximum size of 2560"
This fix implements the new wrapper class KeychainChunk with wrapper jobs ReadJob and WriteJob
to encapsulate the QKeychain handling of ReadPasswordJob and WritePasswordJob with binaryData
but split every supplied keychain entry's data into 2048 byte chunks, on Windows only.
The wrapper is used for all keychain operations in WebFlowCredentials, except for the server password.
All finished keychain jobs now get deleted properly, to avoid memory leaks.
For reference also see previous fixes:
- https://github.com/nextcloud/desktop/pull/1389
- https://github.com/nextcloud/desktop/pull/1394
This should finally fix the re-opened issue:
- https://github.com/nextcloud/desktop/issues/863
Signed-off-by: Michael Schuster <michael@schuster.ms>
- Improve status messages
- Add a counter to make sure that "Link copied to clipboard." is visible for
three seconds and to not enable the buttons too early
- Add more space between buttons and status
Signed-off-by: Michael Schuster <michael@schuster.ms>
- Flow2AuthCredsPage:
- Remove .ui file and embed Flow2AuthWidget into layout
- Flow2AuthWidget:
- Make use generic for Flow2AuthCredsPage and WebFlowCredentialsDialog
- Fix _errorLabel to render HTML tags instead of dumping them as plain text
- Flow2Auth:
- Explicitly start auth with startAuth(account) instead of using constructor
- Take control of copying the auth link to clipboard
- Request a new auth link on copying, to avoid expiry invalidation
- Use signals statusChanged() and result() to be more verbose (status, errors)
- Change timer invocation and add safety bool's to avoid weird behaviour when
the user triggers multiple link-copy calls (fetchNewToken)
Signed-off-by: Michael Schuster <michael@schuster.ms>
New widget on top of the layout, based on Qt's own modern wizard header banner.
This should improve the user's perception of the dialog.
Encapsulate the existing layout into a container layout to allow the banner taking
the full width of the dialog.
Signed-off-by: Michael Schuster <michael@schuster.ms>
- Add new signal to let WebFlowCredentials know and emit asked() to also
tell AccountState that the user won't authenticate, and triggering
log-out state in the settings window.
- Use deleteLater() to safely delete WebFlowCredentialsDialog, so
that Qt can free it at the right time and without crashes.
Do the same with it's _webView and _flow2AuthWidget on closeEvent().
Signed-off-by: Michael Schuster <michael@schuster.ms>
Also enable / disable buttons during polling.
This aims to make the authentication status more transparent and should avoid the
impression that the client is perhaps doing nothing.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Since the default remote poll interval has been re-raised recently to 30 seconds,
the delay between clicking "Grant access" in the browser and fetch and showing success
in the dialog may seem erroneous to the users and tempt them to click "Re-open browser"
again, causing the whole login process to restart.
This commit implements an event handler to pass the dialog's window activation
event down to the Login Flow v2 widget, in order to allow it to poll earlier.
See previous commits for dependent implementation details.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Purpose: The floating re-auth windows of the WebFlowCredentialsDialog often get hidden behind
the SettingsDialog, and the users have to minimize a lot of other windows to find them again.
See previous commit for dependent implementation details.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Signal the SettingsDialog's window activation event down to ownCloudGui and Application,
so that other classes can hook in to get notified when the SettingsDialog is being shown
again.
This approach has been chosen because we otherwise would have to deal with new instance
pointers of the current SettingsWindow - but Application is already there ;-)
Purpose: The floating re-auth windows of the WebFlowCredentialsDialog often get hidden
behind the SettingsDialog, and the users have to minimize a lot of other windows to find
them again. This commit implements the preparation for the upcoming fix commit.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Since the default remote poll interval has been re-raised recently to 30 seconds,
the delay between clicking "Grant access" in the browser and fetch and showing success
in the wizard may seem erroneous to the users and tempt them to click "Re-open browser"
again, causing the whole login process to restart.
This commit implements an event handler to pass the wizard's window activation
event down to the Login Flow v2 page, in order to allow it to poll earlier.
Signed-off-by: Michael Schuster <michael@schuster.ms>
After fixing the crash in the previous commit, double-clicking on Activity list rows still didn't work.
This fix partly reverts commit 8546d53b05 in ActivityItemDelegate::PathRole
of ActivityListModel::data, but adds a new check for relPath's existence in line 74.
I'm assuming the previous change there has been done to shorten the code and avoid opening the user's home
folder upon clicking entries which file value is "App Password". The new path-check takes care of that too now.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Also implement cached member icons in ActivityListModel and return their enums to
ActivityItemDelegate instead of always recreating them for each call to paint().
Signed-off-by: Michael Schuster <michael@schuster.ms>
Add checks to ActivityListModel::combineActivityLists in order to avoid adding
empty Activity entries to the _finalList.
The previous implementation always added an empty entry to the top of the list because
_notificationIgnoredFiles was appended without checking (_listOfIgnoredFiles.size() > 0).
Signed-off-by: Michael Schuster <michael@schuster.ms>
- Rename it to 'Finder' on macOS.
- This way we also avoid having the whole string re-translated on Transifex.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Use customizeStyle() to change link colours, icons and pixmaps in the ShareDialog and notify
it's widgets via slots.
TODO - known issue (macOS):
- The background and font colours in the ShareUserLine widget still stay the same.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Use customizeStyle() to change link colours in the SettingsDialog and notify it's widgets via slots.
Also modify the background colour of the errors messages in AccountSettings::showConnectionLabel
to always use an appropiate colour for it's custom-defined background.
Signed-off-by: Michael Schuster <michael@schuster.ms>
This introduces a new method to change the colours in the links in QLabel's.
Utilizes a custom crafted RegEx function to replace already-coloured links.
Moved code is based on stuff from the SettingsDialog class.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Reverts back to the SettingsDialog class because of bugs and glitches with
more recent Qt versions (Qt 5.12) and with the macOS Dark Mode.
See upstream: https://github.com/owncloud/client/pull/7492
Signed-off-by: Michael Schuster <michael@schuster.ms>
Clear the key chunk buffer, but don't set _clientSslKeyChunkCount to zero because we need it later for deleteKeychainEntries
Signed-off-by: Michael Schuster <michael@schuster.ms>
In certain cases don't write the app password in Account::writeAppPasswordOnce:
- id() is empty: This always happend once the Account Wizard showed the folder selection
- appPassword is empty: Caused by Logout -> Relaunch, preventing remote wipe on relaunch
Implement some logging to ease debugging in the future.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Client SSL certificates and keys cannot be deleted at this time because there is
no UI for selecting them on re-login.
We introduce this dirty hack here, to allow deleting them upon Remote Wipe.
Signed-off-by: Michael Schuster <michael@schuster.ms>
WebFlowCredentials:
- Remove _clientSslCaKeyWriteQueue and simply use _clientSslKeyChunkBufferPEM
- Store key's sub-chunks in slots with "." (dot) suffix
- Implement deletion of the key chunks in WebFlowCredentials::deleteKeychainEntries
- Remove spaces in log messages
- Improve code readability
Signed-off-by: Michael Schuster <michael@schuster.ms>
With QtKeychain on Windows, storing larger keys in one keychain entry causes the
following error due to limits in the Windows APIs:
Error: "Credential size exceeds maximum size of 2560"
To avoid overhead on the other platforms and balance code duplication, this
approach puts some read- and write-parts into Windows-only defines.
For reference also see previous fixes:
- https://github.com/nextcloud/desktop/pull/1389
- https://github.com/nextcloud/desktop/pull/1394
This (again) fixes the re-opened issue:
- https://github.com/nextcloud/desktop/issues/863
Signed-off-by: Michael Schuster <michael@schuster.ms>
This commit ensures that the check also occurs on re-authorization in case
the user gets logged out.
See: https://github.com/nextcloud/desktop/pull/1644
Signed-off-by: Michael Schuster <michael@schuster.ms>
There is no need to call toMSecsSinceEpoch() as QDateTime implements an
comparison operator itself. This is more efficient, because the
QDateTime comparison operator doesn't call localtime() in all cases. Thus, we
don't read /etc/localtime for every comparison. This improves
performance in some cases.
Signed-off-by: David Kahles <david.kahles96@gmail.com>