Age | Commit message (Collapse) | Author |
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
We send some (not always sensitive but still) infor in the GET requests.
Better to do this with PUT (create session) and POST (fetch and close).
So that we don't leak anything we do not want to leak.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Bumps [@nextcloud/vue](https://github.com/nextcloud/nextcloud-vue) from 2.3.0 to 2.6.4.
- [Release notes](https://github.com/nextcloud/nextcloud-vue/releases)
- [Commits](https://github.com/nextcloud/nextcloud-vue/compare/v2.3.0...v2.6.4)
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
|
|
This is more relyable then parsing the window location query for dir:
* ?dir does not change when navigating between files right now
* ?dir is not present when the viewer is used from within other apps.
We used to fallback to the viewer state which solved the latter.
However it is easier and less error prone
to just rely on viewer state in the first place.
Signed-off-by: Azul <azul@riseup.net>
|
|
make sure there are decimals in the fileId
Co-authored-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Azul <azul@riseup.net>
|
|
Signed-off-by: Azul <azul@riseup.net>
|
|
This used to be working but was broken
by having full hrefs rather than just the query part.
Now we check if the domain remains the same
and if we have a `dir` param in the query
and a `relPath` param in the fragment.
This should be a pretty good check for links
that we can open in the viewer right away.
Signed-off-by: Azul <azul@riseup.net>
|
|
This way they also work if the viewer was opened from other apps
than the file app.
Also move the `relPath` param into the fragment.
It is only used to remember the relative path
for generating the short markdown form from the link.
Signed-off-by: Azul <azul@riseup.net>
|
|
rather than opening a completely new page
Signed-off-by: Azul <azul@riseup.net>
|
|
Signed-off-by: Azul <azul@riseup.net>
|
|
also take into account `ctrl` keys.
Use the href from html rather than markdown.
This is an actual link that will work in nextcloud.
Signed-off-by: Azul <azul@riseup.net>
|
|
When navigating between different text documents
one does not expect to open new windows all the time.
Next steps:
* open in new tab on middle click.
Signed-off-by: Azul <azul@riseup.net>
|
|
The markdown we create for links to local files looks like this:
```
[Check this out!](subdir/file.md?fileid=123)
```
Turn this into a link like this
```
<a href="?dir=/current&openfile=123&relPath=subdir/file.md">
Check this out!
</a>
```
The `relPath` part of the url is needed
to convert it back to the original markdown.
Includes a test.
Next steps:
* open links to local files in same tab.
* change dir param according to relative Path.
Signed-off-by: Azul <azul@riseup.net>
|
|
The short relative links used in markdown
need to be converted to working urls in the href attributes.
In order to properly serialize the content
the full urls in html need to be converted to relative links as well.
This commit splits out the href handling into a new helper.
This way it can be easily tested.
Signed-off-by: Azul <azul@riseup.net>
|
|
Since the menu bubble deals with links
it makes more sense to add the button here.
Moved it to the initial part of the menu bubble
as an alternative to the link form.
Hand current path to menu bubble and use it
* to start from there when picking the file to link to
* to calculate the relative path.
Signed-off-by: Azul <azul@riseup.net>
|
|
Tries both approaches: from the menu bubble and the menu bar
Menu bubble works quite well so far.
Only uses absolute paths.
Menu bar uses relative paths.
Pass filepath to Menu bubble so it cat
* start there
* calculate relative paths
Move the logic for relative paths to helper.
Make all strings translateable.
Render relative links properly.
The way we do this for img tags serves as an example.
Signed-off-by: Azul <azul@riseup.net>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
This api is also available in other apps while
the internal structures used in fetchFileInfo are not.
fixes #920
Signed-off-by: Azul <azul@riseup.net>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Bumps [@nextcloud/vue](https://github.com/nextcloud/nextcloud-vue) from 1.5.0 to 2.0.0.
- [Release notes](https://github.com/nextcloud/nextcloud-vue/releases)
- [Commits](https://github.com/nextcloud/nextcloud-vue/compare/v1.5.0...v2.0.0)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
|
|
* hand the path of the file that is currently edited to the menubar
as a prop
* calculate the relative path when inserting an image
* compare the number of path separators in the relative and absolute path
* use relative path if it has fewer separators
Also escape the paths and filename in the src
so filenames and paths with spaces work.
Do not escape the slashes
that separate the path components
- slashes are fine in urls and easier to read.
The algorithm will pick
/some/common/and/different/paths/file.jpg
over
../../../and/different/paths/file.jpg
On the other hand it will pick
../../and/different/paths/file.jpg
over
/some/common/and/different/paths/file.jpg
Signed-off-by: Azul <azul@riseup.net>
|
|
includes a unit test for turning the src in markdown
into a src for html that can be resolved by nextcloud
Signed-off-by: Azul <azul@riseup.net>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Emit the `ready` signal via `$parent` as well.
In a wiki app we render a preview of the markdown content
while loading the text editor.
In order to know when the text editor is ready
we need `ready` to be emitted by the parent.
Alternatives:
* We are currently using the ViewerComponent in our app.
Just reemitting `ready` from it would work as well.
* Ideally we would be able to build our own component
based on the EditorWrapper component.
Making the `EditorWrapper` public would work as well -
but i guess that is not really an option
because it may change or disappear in the future.
Signed-off-by: Azul <azul@riseup.net>
|
|
There is no reason to retry since 403 error is most likely not temporarily,
so the editor connection can be closed whenever this happens.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Since Nextcloud 18.0.4 the Files app triggers the "LoadViewer" event, so
that event can be used to register Text with Viewer instead of doing it
through the "OCA\Files::loadAdditionalScripts" event.
Besides being more correct for the Files app it also makes possible to
use Text when opening files through Viewer in other apps, like Talk.
Note, however, that in public share pages Text is still opened using the
fallback actions instead of through Viewer, as Viewer currently does not
provide the share token of the public shared folder that contains the
file to be opened.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
|
|
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
Bumps [webpack](https://github.com/webpack/webpack) from 4.42.0 to 4.42.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.42.0...v4.42.1)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
|
|
Bumps [@nextcloud/axios](https://github.com/nextcloud/nextcloud-axios) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/nextcloud/nextcloud-axios/releases)
- [Changelog](https://github.com/nextcloud/nextcloud-axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/nextcloud-axios/compare/v1.3.1...v1.3.2)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
|
|
Bumps [@nextcloud/event-bus](https://github.com/nextcloud/nextcloud-event-bus) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/nextcloud/nextcloud-event-bus/releases)
- [Changelog](https://github.com/nextcloud/nextcloud-event-bus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/nextcloud-event-bus/compare/v1.1.2...v1.1.3)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
|
|
Bumps [@nextcloud/router](https://github.com/nextcloud/nextcloud-router) from 1.0.0 to 1.0.2.
- [Release notes](https://github.com/nextcloud/nextcloud-router/releases)
- [Changelog](https://github.com/nextcloud/nextcloud-router/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/nextcloud-router/compare/v1.0.0...v1.0.2)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
|
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|