Skip to content

Commit df5f5cc

Browse files
authored
Merge pull request #8012 from nextcloud/backport/8008/stable34
[stable34] fix: correctly handle upcoming url path
2 parents 3904d8a + b8b365b commit df5f5cc

4 files changed

Lines changed: 11 additions & 1 deletion

File tree

appinfo/routes.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
return [
99
'routes' => [
1010
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
11+
['name' => 'page#indexUpcoming', 'url' => '/upcoming', 'verb' => 'GET'],
1112
['name' => 'page#indexList', 'url' => '/board', 'verb' => 'GET'],
1213
['name' => 'page#indexBoard', 'url' => '/board/{boardId}', 'verb' => 'GET'],
1314
['name' => 'page#indexBoardDetails', 'url' => '/board/{boardId}/details', 'verb' => 'GET'],

lib/Controller/PageController.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ public function indexCard(int $cardId): TemplateResponse {
107107
return $this->index();
108108
}
109109

110+
#[NoAdminRequired]
111+
#[NoCSRFRequired]
112+
public function indexUpcoming(): TemplateResponse {
113+
return $this->index();
114+
}
115+
110116
#[NoAdminRequired]
111117
#[NoCSRFRequired]
112118
public function redirectToCard($cardId): RedirectResponse {

src/components/navigation/AppNavigation.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
:exact="true"
1111
to="/upcoming">
1212
<template #icon>
13-
<CalendarIcon v-if="$route.path === '/'" :size="20" />
13+
<CalendarIcon v-if="$route.path === '/upcoming'" :size="20" />
1414
<CalendarOutlineIcon v-else :size="20" />
1515
</template>
1616
</NcAppNavigationItem>

src/router.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ router.beforeEach((to, from, next) => {
166166
if (defaultBoardId) {
167167
next({ name: 'board', params: { id: parseInt(defaultBoardId, 10) } })
168168
return
169+
} else {
170+
next({ name: 'upcoming' })
171+
return
169172
}
170173
}
171174
next()

0 commit comments

Comments
 (0)