Provided values are not reactive by default and by design,
we must need computed to make them reactive.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
When downloading files in e.g. the *favorites* or *recent* view,
then the nodes are not always share the same parent folder
and we can not use the current directory as it is probably just a
virtual one.
So we calculate the longest common base and use that as the directory
for the download endpoint.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Problem: Is a node is renamed and the new name is out of the current
visible list of nodes the component will be recycled, this means
the props will change, so when the `onRename` functions is about to reset
the state the `this.source` will point to a different node.
To fix this, but also to separate business logic from visual representation,
the logic is moved into the renaming store and the component is only
responsible for rendering.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Resolves https://github.com/nextcloud/server/issues/47904
We need to make sure that we only add one source (unique!) once as a child,
this is ensured by simply use a native `Set`.
Also we need to remove children on from folders when the `files:node:deleted`
event is emitted.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Resolves: https://github.com/nextcloud/server/issues/46645
This adds loading toast notification while the move operation is running.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
< 0 values for "free" do not mean that the storage is full: 6befdd6dd7/lib/public/Files/FileInfo.php (L31-L42)
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
When the viewer or the sidebar is opened, we add the fileid to the route.
When both of them are closed, we do not remove the fileid from the route.
This means that, upon reload, the sidebar will be opened even though it was closed previously.
This PR ensure that the fileid is removed from the route when both the Sidebar and the Viewer are closed.
Signed-off-by: Louis Chemineau <louis@chmn.me>
* Resolves https://github.com/nextcloud/server/issues/46934
Ensure that after a right-click the context menu position is resetted,
so that pressing the "actions"-menu button it is displayed on the correct location.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
The initial state is no longer used, it was only used in legacy UI and in the f2v rewrite
it was only used for the `id` which can be loaded just from the URL.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
On firefox there is an old bug where when you move a dragged file outside
the window the `dragleave` event is never emitted.
So we just use a timeout to reset the drag over state.
Also a small change: Use the ID of the main container instead of relying on tag name and class.
(The ID is guranteed as other APIs rely on it, while the class is just used internally).
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This fixes non reactive default action text of the name component.
Also use download action as default action so that only one place
is needed to define how to download a file.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
The recent search works on a different remote URL so the source of the files were wrong,
because the remote url was included twice in the source.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>