зеркало из https://github.com/nextcloud/activity.git
fix: Allow directly navigating to a the filtered app view
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Родитель
430b86f48d
Коммит
5b9f53a039
|
@ -15,6 +15,7 @@
|
|||
<licence>agpl</licence>
|
||||
<author>Frank Karlitschek</author>
|
||||
<author>Joas Schilling</author>
|
||||
<author>Ferdinand Thiessen</author>
|
||||
|
||||
<default_enable />
|
||||
<types>
|
||||
|
@ -64,7 +65,7 @@
|
|||
<navigations>
|
||||
<navigation>
|
||||
<name>Activity</name>
|
||||
<route>activity.Activities.showList</route>
|
||||
<route>activity.Activities.index</route>
|
||||
<icon>activity.svg</icon>
|
||||
<order>1</order>
|
||||
</navigation>
|
||||
|
|
|
@ -31,7 +31,8 @@ return [
|
|||
['name' => 'Settings#personal', 'url' => '/settings', 'verb' => 'POST'],
|
||||
['name' => 'Settings#admin', 'url' => '/settings/admin', 'verb' => 'POST'],
|
||||
['name' => 'Settings#feed', 'url' => '/settings/feed', 'verb' => 'POST'],
|
||||
['name' => 'Activities#showList', 'url' => '/', 'verb' => 'GET'],
|
||||
['name' => 'Feed#show', 'url' => '/rss.php', 'verb' => 'GET'],
|
||||
['name' => 'Activities#index', 'url' => '/', 'verb' => 'GET'],
|
||||
['name' => 'Activities#showList', 'url' => '/{filter}', 'verb' => 'GET'],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -53,6 +53,17 @@ class ActivitiesController extends Controller {
|
|||
parent::__construct($appName, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @param string $filter
|
||||
* @return TemplateResponse
|
||||
*/
|
||||
public function index(): TemplateResponse {
|
||||
return $this->showList('all');
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
|
|
|
@ -105,7 +105,7 @@ class ActivityWidget implements IAPIWidget, IButtonWidget, IIconWidget, IReloada
|
|||
*/
|
||||
public function getUrl(): ?string {
|
||||
return $this->urlGenerator->getAbsoluteURL(
|
||||
$this->urlGenerator->linkToRoute(Application::APP_ID . '.Activities.showList')
|
||||
$this->urlGenerator->linkToRoute(Application::APP_ID . '.Activities.index')
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ class ActivityWidget implements IAPIWidget, IButtonWidget, IIconWidget, IReloada
|
|||
new WidgetButton(
|
||||
WidgetButton::TYPE_MORE,
|
||||
$this->urlGenerator->getAbsoluteURL(
|
||||
$this->urlGenerator->linkToRoute(Application::APP_ID . '.Activities.showList')
|
||||
$this->urlGenerator->linkToRoute(Application::APP_ID . '.Activities.index')
|
||||
),
|
||||
$this->l10n->t('More activities')
|
||||
),
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
import type { RouteConfig } from 'vue-router'
|
||||
import ActivityFeed from './views/ActivityFeed.vue'
|
||||
|
||||
export const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'root',
|
||||
redirect: { path: '/all' },
|
||||
},
|
||||
{
|
||||
path: '/:view',
|
||||
component: ActivityFeed,
|
||||
props: true,
|
||||
},
|
||||
]
|
||||
] as RouteConfig[]
|
||||
|
|
Загрузка…
Ссылка в новой задаче