Commit graph

33 commits

Author SHA1 Message Date
Ferdinand Thiessen
91f3b6b4ee
chore: adjust code to new codestyle
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-10-02 13:19:42 +02:00
skjnldsv
c7dd6dd645 feat(files): allow hidding files extensions
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-07-28 18:05:15 +02:00
Ferdinand Thiessen
e712104e58
feat(files): allow to ignore warning to change file type
* Missing pieces of https://github.com/nextcloud/server/issues/46528
  * Add checkbox to not show this dialog again
  * Add user config as suggested by designers in files settings to
    reenable or diable this behavior.
  * Fix behavior of dialog: It says "keep .ext" but it does not keep the
    extension but cancels the operation. From the button label the user
    expects that the operation is continued but with the old extension.
  * Added more test coverage by adding component tests.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-02-25 02:16:56 +01:00
Ferdinand Thiessen
b06f5ba4c4
refactor: Migrate nextcloud-vue usage to new import schema
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-02-20 02:28:13 +01:00
skjnldsv
232651774e fix(files): cancel renaming on enter if no file name changes
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-12-10 10:31:59 +00:00
Ferdinand Thiessen
675e7a953f
refactor(files): Provide useFileListWidth composable
Replace the mixin with a composable, this is better typed and works in
both: Options- and Composition API.
Also added component tests for it.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-11-20 19:08:21 +01:00
Ferdinand Thiessen
c06723c44a
refactor(files): Adjust useNavigation composable to enforce active view
In some cases it is guaranteed that we have a proper active view,
e.g. when the file list is loaded (so within FileEntry* components).
This does not change anything but the Typescript types,
so the `currentView` is typed as `View` instead of `View | null´.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-11-16 22:00:30 +01:00
Ferdinand Thiessen
cce34c591e
fix(files): Revert CSS causing the file name to have no bounding box
Instead add the direction only to the filename wrapper not the button.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-11-11 19:56:07 +01:00
Ferdinand Thiessen
ef5a9cf00d
fix(files): Ensure renaming state is correctly reset
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>
2024-10-15 18:20:16 +02:00
Mostafa Ahangarha
723780d184 feat: Add bidi support in core directory
Signed-off-by: Mostafa Ahangarha <ahangarha@riseup.net>
2024-08-29 08:32:47 +00:00
Christopher Ng
3fabc4f733 feat: Navigate via folder tree
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2024-08-01 09:17:56 -07:00
Ferdinand Thiessen
172c43351e
refactor(files): Migrate logger util to Typescript
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-01 03:20:56 +02:00
Ferdinand Thiessen
7ec1a7888e
fix(files): Add missing directory variable to error message
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-01 01:54:47 +02:00
Ferdinand Thiessen
a39f13e94e
fix(files): Provide file actions from list entry to make it reactive
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>
2024-08-01 01:54:42 +02:00
Ferdinand Thiessen
dd88fa03a4 fix(files): Correctly validate new node name
* 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>
2024-07-26 08:46:23 +00:00
Ferdinand Thiessen
523e0d3f2b
fix(files): Use @nextcloud/files filename validation to show more details
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>
2024-07-25 15:49:33 +02:00
Ferdinand Thiessen
5dc8e06014
fix(files): Do not split filename into base and extension for folders
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-25 01:24:26 +02:00
Maksim Sukharev
5709e54b8d fix(files): validate input when creating file/directory
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
2024-07-24 13:14:56 +02:00
Ferdinand Thiessen
d4352fe2ff
fix(files): Properly handle files in failed state
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>
2024-06-24 12:52:11 +02:00
Ferdinand Thiessen
3ed32ffbb4
refactor: Use composable for currentView and views to make it reactive when shared with other Vue apps
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-06-23 16:53:27 +02:00
Ferdinand Thiessen
1d0a65db93
fix: Do not import from axios but only @nextcloud/axios
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-06-20 12:34:37 +02:00
John Molakvoæ (skjnldsv)
a094ac0b6d fix(files): also trigger new tab on file name middle click
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2024-06-12 11:52:22 +00:00
Andy Scherzinger
5b7dcc1427
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-29 08:58:16 +02:00
Ferdinand Thiessen
7dbe89f921 fix(files): Add missing properties and fix Typescript errors in FileEntryName
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-05-02 20:03:23 +02:00
Raphaël Jakse
c53e4a8b96 fix(files): apply the renaming when leaving the input field
Refs: #42689

Signed-off-by: Raphaël Jakse <raphael.git@jakse.fr>
2024-05-02 16:30:12 +02:00
Ferdinand Thiessen
c6f3aecef1
fix(files): Use string array instead of string for forbidden characters
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-04-29 17:15:00 +02:00
Grigorii K. Shartsev
d682aa25be fix(files): focus file name on renaming also initially
When new folder is created, new file entry is initially in renaming mode.

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
2024-01-02 17:25:14 +01:00
Ferdinand Thiessen
9dbaf7aa5b fix(files): Do not add drag and drop listeners when renaming a file
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-12-13 11:56:48 -06:00
Grigorii K. Shartsev
e6bdbdbdb8 refactor(files): replace deprecated is attr on <a> with dynamic component
- 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>
2023-11-28 22:04:39 +01:00
Grigorii K. Shartsev
fedd5316d3 fix(files): make file list item link focusable
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
2023-11-28 22:04:39 +01:00
John Molakvoæ
f434483248
fix(files): add missing Overwrite: F header in renaming
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-11-08 09:11:40 +01:00
John Molakvoæ
16975ae457
feat(files): grid view
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-10-17 11:19:02 +02:00
John Molakvoæ
694fd51cba
fix(files): split FileEntry Name
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-10-17 11:19:02 +02:00