Kevin Ottens [Tue, 20 Oct 2020 15:05:57 +0000 (17:05 +0200)]
Don't use depth infinity anymore to get the folders e2ee status
This way we avoid the expensive SQL query on the server at the price of
more round-trips since we're doing the recursive traversal by hand now.
Also it turns out this depth was used for all the other propfind calls
during sync when we want fresher information regarding a folder. This
was very inefficient in all cases and won't happen anymore.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 14 Oct 2020 16:37:34 +0000 (18:37 +0200)]
Inform _emptyShareLinkWidget of linkShareRequiresPassword signals
All the other ShareLinkWidgets process that signal (which allows to
display error messages for instance) but not that one for some reason.
That being said it might need to deal with an enforced password
situation.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 14 Oct 2020 16:35:12 +0000 (18:35 +0200)]
Emit last to avoid use after delete crash
It turns out the shareDeleted() signal is connected to a function
cleaning up the ShareLinkWidget holding the last shared pointer to the
Share object. Since we use member variables for calling updateFolder()
this would lead to using deleted objects.
Just swap the call and the signal to have everything back in order.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Thu, 8 Oct 2020 15:39:24 +0000 (17:39 +0200)]
Fix the secure lock label aspect
Make sure we got a fixed size for that label. Also ensure that the
pixmap we display there is properly scaled to fit while maintaining the
aspect ratio.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Nicolas Fella [Fri, 9 Oct 2020 22:26:18 +0000 (00:26 +0200)]
Avoid string translation puzzle
Combining translated strings like this makes them hard to translate since the order of words is different between languages.
Use proper placeholder strings instead.
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
Nicolas Fella [Tue, 21 Jul 2020 11:24:59 +0000 (13:24 +0200)]
Make QML code more declarative by using properties
By using properties and property bindings the QML code gets more declarative rather than imperative, which is considered better.
This patch:
- Introduces a currentUserId property in UserModel that replaces the equivalent Q_INVOKABLE call
- Introduces an avatar property in User that contains the avatar's image provider url without any fallback
- Introduces new image provider urls for fallback images
- Moves the fallback image selection to QML since we want different fallbacks according to where it is used
- Wires up the necessary signals to propagate a changing avatar
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
Kevin Ottens [Thu, 8 Oct 2020 13:58:29 +0000 (15:58 +0200)]
Export the WordList functions
Now that they are used from gui/ they need to be properly exported so
that linking doesn't fail when visibility is activated (only on our
Windows build it seems).
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Tue, 6 Oct 2020 15:28:20 +0000 (17:28 +0200)]
Use friendly user agent during webflow2 auth
This way the server displays a less scary string while granting access
from the browser. Also this same string will be used in the "Devices and
sessions" section of the server settings.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Mon, 5 Oct 2020 17:20:26 +0000 (19:20 +0200)]
Add dependency on QtGuiPrivate
I'm not a huge fan of using private APIs but QZip is really the API with
the least hassles for our debug archive need. No external dependency and
we know it is generally available and stable despite the lack of
stability promise.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Mon, 5 Oct 2020 17:36:25 +0000 (19:36 +0200)]
Expose more of the logger state
It is better to rely on the Logger state to know exactly where we're
logging. Indeed due to the the various ways to impact its state the
config alone might not now where we're logging.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Mon, 5 Oct 2020 17:34:46 +0000 (19:34 +0200)]
Make sure --logfile has precedence on config
Since we changed the default in the config file and since log dir had
precedence on log file, the --logfile command line option wasn't doing
anything anymore.
We make sure it has an effect again overriding --logdir or the logDir
config entry.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Mon, 5 Oct 2020 15:48:30 +0000 (17:48 +0200)]
Change the defaults for logging
Turn on the logging by default for everyone. Let's use a log dir within
the config directory of the application and have debug logs expiring
after a day.
This obviously means we'll generate quite some logs but with the
automated compression it shouldn't be too horrible. Obviously that
scales with the amount of files and syncs occurring. In our tests with a
large setup we're around 100 MB for a day worth of logs, this shouldn't
be too much of an issue on today's average desktop/laptop.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Tue, 6 Oct 2020 12:01:53 +0000 (14:01 +0200)]
If askForOptionalPassword is enabled preset a random password
This is the same approach used on the server side. Turns out I quite
like it, this avoids popping up a dialog to the user and since she won't
know the password she'll have to set a new one anyway or disable it.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>