-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: John Molakvoæ <[email protected]>
- Loading branch information
Showing
4 changed files
with
67 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
============ | ||
Activity API | ||
============ | ||
======== | ||
Activity | ||
======== | ||
|
||
Find the documentation in the `Activity app repo <https://github.com/nextcloud/activity/blob/master/docs/endpoint-v2.md>`__. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
===== | ||
Files | ||
===== | ||
|
||
.. sectionauthor:: John Molakvoæ <[email protected]> | ||
|
||
Since Nextcloud 27, the files app has been rewritten to use new standards | ||
and frameworks. This means that the old documentation is no longer valid. | ||
We will update and document the new files app APIs and methods here. | ||
|
||
.. note:: Some external libraries offers in-depth technical documentation. | ||
Please have a look at the following: | ||
* https://github.com/nextcloud/nextcloud-files (`docs <https://nextcloud.github.io/nextcloud-files/>`_) | ||
* https://github.com/nextcloud/nextcloud-upload | ||
|
||
|
||
Router | ||
^^^^^^ | ||
|
||
To change views and parameters of the current Files app, we expose the router. | ||
This directly maps to the Vue router. You can check their own `documentation <https://router.vuejs.org/guide/essentials/navigation.html#navigate-to-a-different-location>`_ to | ||
better understand the methods. | ||
|
||
.. code-block:: ts | ||
/** | ||
* Trigger a route change on the files app | ||
* | ||
* @param path the url path, eg: '/trashbin?dir=/Deleted' | ||
* @param replace replace the current history | ||
* @see https://router.vuejs.org/guide/essentials/navigation.html#navigate-to-a-different-location | ||
*/ | ||
goTo(path: string, replace: boolean = false): Promise<Route> | ||
/** | ||
* Trigger a route change on the files App | ||
* | ||
* @param name the route name | ||
* @param params the route parameters | ||
* @param query the url query parameters | ||
* @param replace replace the current history | ||
* @see https://router.vuejs.org/guide/essentials/navigation.html#navigate-to-a-different-location | ||
*/ | ||
goToRoute( | ||
name?: string, | ||
params?: Dictionary<string>, | ||
query?: Dictionary<string | (string | null)[] | null | undefined>, | ||
replace?: boolean, | ||
): Promise<Route> | ||
Examples | ||
--------- | ||
|
||
.. code-block:: js | ||
OCP.Files.Router.goTo('/trashbin?dir=/Unsplash.d1680193199') | ||
OCP.Files.Router.goToRoute('fileslist', { view: 'files' }, { dir: '/Folders/Group folder' }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters