Skip to content
Prev Previous commit
Next Next commit
Cleanup frontend code
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Aug 20, 2020
commit 06078c85ee125a37fa7d8b3a443e16c7cf9ba0c3
7 changes: 3 additions & 4 deletions src/components/Controls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@
({{ t('deck', 'Archived cards') }})
</p>
</div>
<div v-if="dashboardName" class="board-title">
<!-- <div :style="{backgroundColor: '#' + board.color}" class="board-bullet" /> -->
<h2><a href="#">{{ dashboardName }}</a></h2>
<div v-if="overviewName" class="board-title">
<h2><a href="#">{{ overviewName }}</a></h2>
</div>
<div v-if="board" class="board-actions">
<div v-if="canManage && !showArchived && !board.archived"
Expand Down Expand Up @@ -210,7 +209,7 @@ export default {
required: false,
default: null,
},
dashboardName: {
overviewName: {
type: String,
required: false,
default: null,
Expand Down
2 changes: 1 addition & 1 deletion src/components/cards/CardItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default {
},
methods: {
openCard() {
const boardId = this.card ? this.card.boardId : this.$route.params.id
const boardId = this.card && this.card.boardId ? this.card.boardId : this.$route.params.id
this.$router.push({ name: 'card', params: { id: boardId, cardId: this.card.id } }).catch(() => {})
},
startEditing(card) {
Expand Down
14 changes: 1 addition & 13 deletions src/components/navigation/AppNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@
import axios from '@nextcloud/axios'
import { mapGetters } from 'vuex'
import ClickOutside from 'vue-click-outside'
import { AppNavigation as AppNavigationVue, AppNavigationSettings, Multiselect } from '@nextcloud/vue'
import { AppNavigation as AppNavigationVue, AppNavigationItem, AppNavigationSettings, Multiselect } from '@nextcloud/vue'
import AppNavigationAddBoard from './AppNavigationAddBoard'
import AppNavigationBoardCategory from './AppNavigationBoardCategory'
import AppNavigationItem from '@nextcloud/vue/dist/Components/AppNavigationItem'
import { loadState } from '@nextcloud/initial-state'
import { generateUrl, generateOcsUrl } from '@nextcloud/router'

Expand Down Expand Up @@ -107,27 +106,16 @@ export default {
groupLimit: [],
groupLimitDisabled: true,
canCreate: canCreateState,
allDashboards: [{
id: 1,
title: 'due',
color: '999999',
acl: [],
permissions: {
PERMISSION_MANAGE: false,
},
}],
}
},
computed: {
...mapGetters([
'noneArchivedBoards',
'archivedBoards',
'sharedBoards',
// 'dashboards',
]),
isAdmin() {
// eslint-disable-next-line
//return oc_isadmin
return OC.isUserAdmin()
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/overview/Overview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const FILTER_ASSIGNED = 'assigned'

const SUPPORTED_FILTERS = [
FILTER_ASSIGNED,
FILTER_DUE
FILTER_DUE,
]

export default {
Expand All @@ -105,7 +105,7 @@ export default {
default: '',
},
},
data: function() {
data() {
return {
loading: true,
}
Expand Down
3 changes: 0 additions & 3 deletions src/store/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ export default {
},
},
mutations: {
clearCards(state) {
state.cards = []
},
addCard(state, card) {
card.labels = card.labels || []
card.assignedUsers = card.assignedUsers || []
Expand Down
7 changes: 0 additions & 7 deletions src/store/overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ export default {
assignedCards: [],
},
getters: {
dueOverdue: state => {
return state.withDue.filter((card) => {
return card
})

},
withDueDashboard: state => {
return state.withDue
},
Expand All @@ -52,7 +46,6 @@ export default {
setAssignedCards(state, assignedCards) {
state.assignedCards = assignedCards
},

},
actions: {
async loadDueDashboard({ commit }) {
Expand Down
1 change: 0 additions & 1 deletion src/store/stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export default {
})
},
async loadStacks({ commit }, boardId) {
commit('clearCards')
let call = 'loadStacks'
if (this.state.showArchived === true) {
call = 'loadArchivedStacks'
Expand Down