1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-09-29 18:42:44 +02:00
Commit Graph

15187 Commits

Author SHA1 Message Date
Nextcloud bot
16ed62d548
[tx-robot] updated from transifex 2019-12-25 04:13:59 +00:00
Michael Schuster
2b2810511d
KeychainChunk: Fix error handling in ReadJob::slotReadJobDone
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-24 12:17:43 +01:00
Michael Schuster
e07859fb3c Fix date in ActivityWidget and remove unnecessary string conversion
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>
2019-12-24 08:53:14 +01:00
Michael Schuster
9b034a2eb0 Heavy refactoring: Windows workaround for >= 4k (4096 bit) client-cert SSL keys and large certs
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>
2019-12-24 07:47:35 +01:00
Michael Schuster
bd9652b24c Flow2AuthWidget: Minor fixes and improvements
- 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>
2019-12-24 07:46:57 +01:00
Michael Schuster
8b5f09305c Flow2: Refactor UI into Flow2AuthWidget only and improve Flow2Auth
- 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>
2019-12-24 07:46:57 +01:00
Michael Schuster
6d033f2964 Add new HeaderBanner class for WebFlowCredentialsDialog
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>
2019-12-24 07:46:57 +01:00
Michael Schuster
0bcac1882a Make WebFlowCredentialsDialog cancellation- and deletion-safe
- 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>
2019-12-24 07:46:57 +01:00
Michael Schuster
b6b04aeff8 WebFlowCredentialsDialog: Bring re-auth dialog to top (raise) on error
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-24 07:46:57 +01:00
Michael Schuster
a69aed80e6 Flow2: Make ProgressIndicator's background-aware (Dark-/Light-Mode switching)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-24 07:46:57 +01:00
Michael Schuster
e81f972270 Flow2: Add poll status text, ProgressIndicator and countdown timer
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>
2019-12-24 07:46:57 +01:00
Michael Schuster
542590db7c Small fixes and code cleanup
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-24 07:46:57 +01:00
Michael Schuster
e04aae94bc Flow2: Poll for re-auth result upon WebFlowCredentialsDialog window activation
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>
2019-12-24 07:46:57 +01:00
Michael Schuster
aa18667905 WebFlowCredentialsDialog: Bring re-auth dialog to top (raise) upon showing SettingsDialog
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>
2019-12-24 07:46:57 +01:00
Michael Schuster
addb27a085 Add helper slots and signals to catch SettingsDialog's window activation events
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>
2019-12-24 07:46:57 +01:00
Michael Schuster
be10d5200f Flow2: Use ownCloudGui::raiseDialog to bring account setup wizard to top (raise) on auth result
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-24 07:46:57 +01:00
Michael Schuster
e8348612b4 Flow2: Poll for auth result upon account setup wizard window activation
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>
2019-12-24 07:46:57 +01:00
Michael Schuster
3a160a4dce Flow2: Bring account setup wizard to top (raise) on auth result
Show and raise the wizard on success / error in the Login Flow v2 auth.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-24 07:46:57 +01:00
Michael Schuster
ccd20f0172 Fix issue #1237: White text on almost-white background
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-24 07:44:18 +01:00
Michael Schuster
c03bc8540c Fix folder opening in ActivityListModel
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>
2019-12-24 07:42:01 +01:00
Michael Schuster
003acb7254 Fix crash in ActivityListModel (fixes #1693)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-24 07:42:01 +01:00
Michael Schuster
b961b683d6 Show date and time in activity log (fixes issue #1683)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-24 07:40:42 +01:00
Nextcloud bot
f82ef95866
[tx-robot] updated from transifex 2019-12-24 04:15:27 +00:00
Nextcloud bot
ed9000bb07
[tx-robot] updated from transifex 2019-12-23 04:17:38 +00:00
Nextcloud bot
6afe2b124d
[tx-robot] updated from transifex 2019-12-22 04:20:47 +00:00
Nextcloud bot
629d23d832
[tx-robot] updated from transifex 2019-12-21 03:50:38 +00:00
Nextcloud bot
d837feca71
[tx-robot] updated from transifex 2019-12-20 03:50:25 +00:00
Michael Schuster
a7dade979c Fix build (missing refactoring)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-19 22:07:30 +01:00
Michael Schuster
3a2caf61e5 Mac and high-dpi displays: Add workaround in ActivityItemDelegate to show full uncropped activity's actionText and timeText
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-19 22:07:30 +01:00
Michael Schuster
b5ed16088a Make all ProgressIndicator's background-aware (Dark-/Light-Mode switching)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-19 22:07:30 +01:00
Michael Schuster
e4a20b9e72 Make OwncloudWizard and its pages background-aware (Dark-/Light-Mode switching)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-19 22:07:30 +01:00
Michael Schuster
37e5fe786f Remove unnecessary string translation and copy in ActivityItemDelegate
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-19 22:07:30 +01:00
Michael Schuster
643995528b Remove unnecessary breaks in ActivityListModel
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-19 22:07:30 +01:00
Michael Schuster
ecd17f2ea2 Make ActivityItemDelegate background- and selection-aware (Dark-/Light-Mode switching)
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>
2019-12-19 22:07:30 +01:00
Michael Schuster
bf0bf2c1b6 Refactor ActivitySettings: Rename member variable ui to _ui
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-19 22:07:30 +01:00
Michael Schuster
acedf362b6 Make AccountSettings and ActivitySettings background-aware (Dark-/Light-Mode switching)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-19 22:07:30 +01:00
Michael Schuster
3b580eeca7 Change error link colour in AccountSettings::showConnectionLabel
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-19 22:07:30 +01:00
Michael Schuster
6adfff1f13 Add new Theme helper method to custom-colourize links
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-19 22:07:30 +01:00
Michael Schuster
7d542d7989 Change Dark Mode link colour
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-19 22:07:30 +01:00
Nextcloud bot
b6a8195cb0
[tx-robot] updated from transifex 2019-12-19 03:51:44 +00:00
Michael Schuster
cc21d175f1 Fix Activity List: Add check to avoid first empty entry
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>
2019-12-18 03:29:54 +01:00
Nextcloud bot
ade4b198cf
[tx-robot] updated from transifex 2019-12-17 03:51:18 +00:00
Nextcloud bot
32b65f576f
[tx-robot] updated from transifex 2019-12-15 03:50:26 +00:00
Nextcloud bot
f2bbb90d52
[tx-robot] updated from transifex 2019-12-14 03:50:17 +00:00
Nextcloud bot
ffbf06755f
[tx-robot] updated from transifex 2019-12-13 03:50:26 +00:00
Nextcloud bot
58716bb406
[tx-robot] updated from transifex 2019-12-12 03:50:18 +00:00
Nextcloud bot
782d68afa8
[tx-robot] updated from transifex 2019-12-11 03:10:56 +00:00
Nextcloud bot
1c1f291778
[tx-robot] updated from transifex 2019-12-10 03:14:17 +00:00
Michael Schuster
b754eacd74 macOS: Rename 'Explorer' appropriately on non-Windows
- 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>
2019-12-09 21:37:21 +01:00
Michael Schuster
7ce8a6a201 Make the ShareDialog background-aware (Dark-/Light-Mode switching)
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>
2019-12-09 21:37:21 +01:00