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>
* 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>
< 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>
The loading icon visually informs that the node is currently loading,
but there is no non-visual information (accessible information).
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
In grid view, this was messing with the reported available list width which was breaking the computed layout.
Fix https://github.com/nextcloud/server/issues/47599
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Renaming is basically copy + delete (a move), so no need to update permissions.
Especially if the node is in a invalid directory the node should be moveable but not editable.
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 prevents jumping of that toggle button when the view is loading.
Also adjust the design for Nextcloud 30 (prevent jumping of breadcrumbs when loading due to increased height).
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Instead of trigger a PROPFIND for every new-menu entry clicks,
or conflict handling of uploads, we can just use the cached content from the file store.
If we do not have any cache entry we fetch new, but otherwise this is not needed.
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>