Skip to content

Commit 06078c8

Browse files
committed
Cleanup frontend code
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent b199442 commit 06078c8

7 files changed

Lines changed: 7 additions & 31 deletions

File tree

src/components/Controls.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@
3030
({{ t('deck', 'Archived cards') }})
3131
</p>
3232
</div>
33-
<div v-if="dashboardName" class="board-title">
34-
<!-- <div :style="{backgroundColor: '#' + board.color}" class="board-bullet" /> -->
35-
<h2><a href="#">{{ dashboardName }}</a></h2>
33+
<div v-if="overviewName" class="board-title">
34+
<h2><a href="#">{{ overviewName }}</a></h2>
3635
</div>
3736
<div v-if="board" class="board-actions">
3837
<div v-if="canManage && !showArchived && !board.archived"
@@ -210,7 +209,7 @@ export default {
210209
required: false,
211210
default: null,
212211
},
213-
dashboardName: {
212+
overviewName: {
214213
type: String,
215214
required: false,
216215
default: null,

src/components/cards/CardItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export default {
154154
},
155155
methods: {
156156
openCard() {
157-
const boardId = this.card ? this.card.boardId : this.$route.params.id
157+
const boardId = this.card && this.card.boardId ? this.card.boardId : this.$route.params.id
158158
this.$router.push({ name: 'card', params: { id: boardId, cardId: this.card.id } }).catch(() => {})
159159
},
160160
startEditing(card) {

src/components/navigation/AppNavigation.vue

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,9 @@
7272
import axios from '@nextcloud/axios'
7373
import { mapGetters } from 'vuex'
7474
import ClickOutside from 'vue-click-outside'
75-
import { AppNavigation as AppNavigationVue, AppNavigationSettings, Multiselect } from '@nextcloud/vue'
75+
import { AppNavigation as AppNavigationVue, AppNavigationItem, AppNavigationSettings, Multiselect } from '@nextcloud/vue'
7676
import AppNavigationAddBoard from './AppNavigationAddBoard'
7777
import AppNavigationBoardCategory from './AppNavigationBoardCategory'
78-
import AppNavigationItem from '@nextcloud/vue/dist/Components/AppNavigationItem'
7978
import { loadState } from '@nextcloud/initial-state'
8079
import { generateUrl, generateOcsUrl } from '@nextcloud/router'
8180
@@ -107,27 +106,16 @@ export default {
107106
groupLimit: [],
108107
groupLimitDisabled: true,
109108
canCreate: canCreateState,
110-
allDashboards: [{
111-
id: 1,
112-
title: 'due',
113-
color: '999999',
114-
acl: [],
115-
permissions: {
116-
PERMISSION_MANAGE: false,
117-
},
118-
}],
119109
}
120110
},
121111
computed: {
122112
...mapGetters([
123113
'noneArchivedBoards',
124114
'archivedBoards',
125115
'sharedBoards',
126-
// 'dashboards',
127116
]),
128117
isAdmin() {
129118
// eslint-disable-next-line
130-
//return oc_isadmin
131119
return OC.isUserAdmin()
132120
},
133121
},

src/components/overview/Overview.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const FILTER_ASSIGNED = 'assigned'
9090
9191
const SUPPORTED_FILTERS = [
9292
FILTER_ASSIGNED,
93-
FILTER_DUE
93+
FILTER_DUE,
9494
]
9595
9696
export default {
@@ -105,7 +105,7 @@ export default {
105105
default: '',
106106
},
107107
},
108-
data: function() {
108+
data() {
109109
return {
110110
loading: true,
111111
}

src/store/card.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ export default {
9696
},
9797
},
9898
mutations: {
99-
clearCards(state) {
100-
state.cards = []
101-
},
10299
addCard(state, card) {
103100
card.labels = card.labels || []
104101
card.assignedUsers = card.assignedUsers || []

src/store/overview.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ export default {
3232
assignedCards: [],
3333
},
3434
getters: {
35-
dueOverdue: state => {
36-
return state.withDue.filter((card) => {
37-
return card
38-
})
39-
40-
},
4135
withDueDashboard: state => {
4236
return state.withDue
4337
},
@@ -52,7 +46,6 @@ export default {
5246
setAssignedCards(state, assignedCards) {
5347
state.assignedCards = assignedCards
5448
},
55-
5649
},
5750
actions: {
5851
async loadDueDashboard({ commit }) {

src/store/stack.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ export default {
7676
})
7777
},
7878
async loadStacks({ commit }, boardId) {
79-
commit('clearCards')
8079
let call = 'loadStacks'
8180
if (this.state.showArchived === true) {
8281
call = 'loadArchivedStacks'

0 commit comments

Comments
 (0)