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>
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>
* Resolves https://github.com/nextcloud/server/issues/45409
This includes two fixes:
1. The name in the "new node" dialog is correctly selected (e.g. `file.txt` only `file` is selected by default), to allow quick naming
2. `@nextcloud/files` functions for filename validation are used, this allows to use new Nextcloud 30 capabilities (e.g. reserved names)
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This will enable showing more details what exactly is wrong with the filename.
Especially with the new capabilities introduced with Nextcloud 30.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
When files are loaded from API the `fileid` might be set to `-1` indicating
an error on the API.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
- Special attribute `is` is deprecated and removed in Vue 3
- It is confusing, that `<a>` element is rendered as `span` sometimes
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>