Template parameters are migrated to initial state, common state between admin and user settings is shared in the CommonSettingsTrait.
The template is cleaned and replaced with only a stub for the Vue mount.
Code only used for the frontend of the settings is moved from the MountConfig to the CommonSettingsTrait (the missing dependency messages).
On the frontend a wrapper view is created that currently holds the global credentials settings and the external storages settings.
- The global credentials sections is now a stand-alone sections - fully implemented.
- The external storages section holds the table + user config + warnings on missing dependencies
The legacy UI is temporarly renamed but will be removed in a following commit.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
The root of the webdav client needs to be the public share root,
as accessing the `/files` folder is not possible for public shares.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Currently apps are broken if they have exports in the JS entry point,
because they then will import from the entry point but because they do
not know about the Nextcloud cache buster they will import without cache
buster.
This results in two problem:
1. The module might be outdated (old cached)
2. The module is duplicated, so the module will be loaded twice and will
have two different - out of sync - states. This also means it will
re-run sideeffects of the entry point.
To fix this we generate an import map which basically maps the plain
entry point script to the script with cache buster added.
(Some background: Bundler will try to minimize chunks (reduce page
loading time) so they can inline modules into entry points and thus
extend the entry point exports and then this issue would be caused).
For example:
```js
// entry.mjs
console.error('called')
async function onClick() {
await import('./chunk.mjs')
}
export const name = 'foo'
// chunk.mjs
import { name } from './entry.mjs'
console.error(name)
```
When calling `onClick` without this fix the output will be:
> called
> called
> foo
With this fix:
> called
> foo
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Fix the problem reported:
> [plugin vite:vue] apps/federatedfilesharing/src/components/PersonalSettings.vue: <pre> cannot be child of <p>, according to HTML specifications.
> This can cause hydration errors or potentially disrupt future functionality.
`p` only allows inline elements, but pre is none.
We either need to use `div` instead of `p` or `code` instead of `pre`.
But in this case we want a block of code, so we use `div` and inner
`<pre><code>`.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
The activity app integration was changed to use the files Node API
instead of the legacy FileInfo API. So the comments app needs to be
adjusted for it.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>