feat: formatting
- remove unneeded data props - prepare for compiler warnings vue3; see https://v3.vuejs.org/guide/migration/v-bind.html
This commit is contained in:
parent
4454e6cf22
commit
0da7a46612
15 changed files with 30 additions and 38 deletions
|
@ -11,9 +11,7 @@
|
||||||
<navigation/>
|
<navigation/>
|
||||||
<div
|
<div
|
||||||
:class="[
|
:class="[
|
||||||
{
|
{ 'is-menu-enabled': menuActive },
|
||||||
'is-menu-enabled': menuActive,
|
|
||||||
},
|
|
||||||
$route.name,
|
$route.name,
|
||||||
]"
|
]"
|
||||||
class="app-content"
|
class="app-content"
|
||||||
|
@ -58,10 +56,6 @@ export default {
|
||||||
this.loadLabels()
|
this.loadLabels()
|
||||||
},
|
},
|
||||||
computed: mapState({
|
computed: mapState({
|
||||||
namespaces(state) {
|
|
||||||
return state.namespaces.namespaces.filter(n => !n.isArchived)
|
|
||||||
},
|
|
||||||
currentList: CURRENT_LIST,
|
|
||||||
background: 'background',
|
background: 'background',
|
||||||
menuActive: MENU_ACTIVE,
|
menuActive: MENU_ACTIVE,
|
||||||
userInfo: state => state.auth.info,
|
userInfo: state => state.auth.info,
|
||||||
|
|
|
@ -83,12 +83,12 @@
|
||||||
triggered by the change needs to have access to the current namespace
|
triggered by the change needs to have access to the current namespace
|
||||||
-->
|
-->
|
||||||
<draggable
|
<draggable
|
||||||
|
v-bind="dragOptions"
|
||||||
:value="activeLists[nk]"
|
:value="activeLists[nk]"
|
||||||
@input="(lists) => updateActiveLists(n, lists)"
|
@input="(lists) => updateActiveLists(n, lists)"
|
||||||
:group="`namespace-${n.id}-lists`"
|
:group="`namespace-${n.id}-lists`"
|
||||||
@start="() => drag = true"
|
@start="() => drag = true"
|
||||||
@end="e => saveListPosition(e, nk)"
|
@end="e => saveListPosition(e, nk)"
|
||||||
v-bind="dragOptions"
|
|
||||||
handle=".handle"
|
handle=".handle"
|
||||||
:disabled="n.id < 0"
|
:disabled="n.id < 0"
|
||||||
:class="{'dragging-disabled': n.id < 0}"
|
:class="{'dragging-disabled': n.id < 0}"
|
||||||
|
|
|
@ -47,8 +47,6 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
-webkit-border-radius: 100%;
|
|
||||||
-moz-border-radius: 100%;
|
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
|
@ -54,6 +54,8 @@ import names from '@/models/constants/notificationNames.json'
|
||||||
import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside'
|
import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside'
|
||||||
import {mapState} from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
|
|
||||||
|
const LOAD_NOTIFICATIONS_INTERVAL = 10000
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'notifications',
|
name: 'notifications',
|
||||||
components: {User},
|
components: {User},
|
||||||
|
@ -71,7 +73,7 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadNotifications()
|
this.loadNotifications()
|
||||||
document.addEventListener('click', this.hidePopup)
|
document.addEventListener('click', this.hidePopup)
|
||||||
this.interval = setInterval(this.loadNotifications, 10000)
|
this.interval = setInterval(this.loadNotifications, LOAD_NOTIFICATIONS_INTERVAL)
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
document.removeEventListener('click', this.hidePopup)
|
document.removeEventListener('click', this.hidePopup)
|
||||||
|
|
|
@ -196,7 +196,6 @@ export default {
|
||||||
return {
|
return {
|
||||||
linkShares: [],
|
linkShares: [],
|
||||||
linkShareService: LinkShareService,
|
linkShareService: LinkShareService,
|
||||||
newLinkShare: LinkShareModel,
|
|
||||||
rights: rights,
|
rights: rights,
|
||||||
selectedRight: rights.READ,
|
selectedRight: rights.READ,
|
||||||
name: '',
|
name: '',
|
||||||
|
@ -277,9 +276,7 @@ export default {
|
||||||
this.showDeleteModal = false
|
this.showDeleteModal = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
copy(text) {
|
copy,
|
||||||
copy(text)
|
|
||||||
},
|
|
||||||
getShareLink(hash) {
|
getShareLink(hash) {
|
||||||
return this.frontendUrl + 'share/' + hash + '/auth'
|
return this.frontendUrl + 'share/' + hash + '/auth'
|
||||||
},
|
},
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="has-text-success"
|
class="has-text-success"
|
||||||
v-if="
|
v-else-if="
|
||||||
!taskCommentService.loading &&
|
!taskCommentService.loading &&
|
||||||
saved === c.id
|
saved === c.id
|
||||||
"
|
"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<span class="loader is-inline-block mr-2"></span>
|
<span class="loader is-inline-block mr-2"></span>
|
||||||
{{ $t('misc.saving') }}
|
{{ $t('misc.saving') }}
|
||||||
</span>
|
</span>
|
||||||
<span class="is-small has-text-success" v-if="!loading && saved">
|
<span class="is-small has-text-success" v-else-if="!loading && saved">
|
||||||
<icon icon="check"/>
|
<icon icon="check"/>
|
||||||
{{ $t('misc.saved') }}
|
{{ $t('misc.saved') }}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
<h1 class="title task-id">
|
<h1 class="title task-id">{{ textIdentifier }}</h1>
|
||||||
{{ task.getTextIdentifier && task.getTextIdentifier() ? task.getTextIdentifier() : '' }}
|
|
||||||
</h1>
|
|
||||||
<div class="is-done" v-if="task.done">Done</div>
|
<div class="is-done" v-if="task.done">Done</div>
|
||||||
<h1
|
<h1
|
||||||
class="title input"
|
class="title input"
|
||||||
|
@ -11,13 +9,16 @@
|
||||||
@keydown.enter.prevent.stop="$event.target.blur()"
|
@keydown.enter.prevent.stop="$event.target.blur()"
|
||||||
:contenteditable="canWrite ? 'true' : 'false'"
|
:contenteditable="canWrite ? 'true' : 'false'"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
ref="taskTitle">{{ task.title.trim() }}</h1>
|
ref="taskTitle"
|
||||||
|
>
|
||||||
|
{{ task.title.trim() }}
|
||||||
|
</h1>
|
||||||
<transition name="fade">
|
<transition name="fade">
|
||||||
<span class="is-inline-flex is-align-items-center" v-if="loading && saving">
|
<span class="is-inline-flex is-align-items-center" v-if="loading && saving">
|
||||||
<span class="loader is-inline-block mr-2"></span>
|
<span class="loader is-inline-block mr-2"></span>
|
||||||
{{ $t('misc.saving') }}
|
{{ $t('misc.saving') }}
|
||||||
</span>
|
</span>
|
||||||
<span class="has-text-success is-inline-flex is-align-content-center" v-if="!loading && showSavedMessage">
|
<span class="has-text-success is-inline-flex is-align-content-center" v-else-if="!loading && showSavedMessage">
|
||||||
<icon icon="check" class="mr-2"/>
|
<icon icon="check" class="mr-2"/>
|
||||||
{{ $t('misc.saved') }}
|
{{ $t('misc.saved') }}
|
||||||
</span>
|
</span>
|
||||||
|
@ -41,6 +42,9 @@ export default {
|
||||||
task() {
|
task() {
|
||||||
return this.value
|
return this.value
|
||||||
},
|
},
|
||||||
|
textIdentifier() {
|
||||||
|
return this.task?.getTextIdentifier() || ''
|
||||||
|
},
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<span class="loader is-inline-block mr-2"></span>
|
<span class="loader is-inline-block mr-2"></span>
|
||||||
{{ $t('misc.saving') }}
|
{{ $t('misc.saving') }}
|
||||||
</span>
|
</span>
|
||||||
<span class="has-text-success" v-if="!taskRelationService.loading && saved">
|
<span class="has-text-success" v-else-if="!taskRelationService.loading && saved">
|
||||||
{{ $t('misc.saved') }}
|
{{ $t('misc.saved') }}
|
||||||
</span>
|
</span>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {filterObject} from '@/helpers/filterObject'
|
||||||
import {setLoading} from '../helper'
|
import {setLoading} from '../helper'
|
||||||
import TaskCollectionService from '@/services/taskCollection'
|
import TaskCollectionService from '@/services/taskCollection'
|
||||||
|
|
||||||
const tasksPerBucket = 25
|
const TASKS_PER_BUCKET = 25
|
||||||
|
|
||||||
const addTaskToBucketAndSort = (state, task) => {
|
const addTaskToBucketAndSort = (state, task) => {
|
||||||
const bi = filterObject(state.buckets, b => b.id === task.bucketId)
|
const bi = filterObject(state.buckets, b => b.id === task.bucketId)
|
||||||
|
@ -174,7 +174,7 @@ export default {
|
||||||
// Clear everything to prevent having old buckets in the list if loading the buckets from this list takes a few moments
|
// Clear everything to prevent having old buckets in the list if loading the buckets from this list takes a few moments
|
||||||
ctx.commit('setBuckets', [])
|
ctx.commit('setBuckets', [])
|
||||||
|
|
||||||
params.per_page = tasksPerBucket
|
params.per_page = TASKS_PER_BUCKET
|
||||||
|
|
||||||
const bucketService = new BucketService()
|
const bucketService = new BucketService()
|
||||||
return bucketService.getAll({listId: listId}, params)
|
return bucketService.getAll({listId: listId}, params)
|
||||||
|
@ -228,7 +228,7 @@ export default {
|
||||||
params.filter_comparator = [...(params.filter_comparator ?? []), 'equals']
|
params.filter_comparator = [...(params.filter_comparator ?? []), 'equals']
|
||||||
}
|
}
|
||||||
|
|
||||||
params.per_page = tasksPerBucket
|
params.per_page = TASKS_PER_BUCKET
|
||||||
|
|
||||||
const taskService = new TaskCollectionService()
|
const taskService = new TaskCollectionService()
|
||||||
return taskService.getAll({listId: listId}, params, page)
|
return taskService.getAll({listId: listId}, params, page)
|
||||||
|
|
|
@ -132,7 +132,8 @@ export default {
|
||||||
},
|
},
|
||||||
computed: mapState({
|
computed: mapState({
|
||||||
userInfo: state => state.auth.info,
|
userInfo: state => state.auth.info,
|
||||||
labels: state => Object.values(state.labels.labels).sort((f, s) => f.title > s.title ? 1 : -1), // Alphabetically sort the labels
|
// Alphabetically sort the labels
|
||||||
|
labels: state => Object.values(state.labels.labels).sort((f, s) => f.title > s.title ? 1 : -1),
|
||||||
loading: state => state[LOADING] && state[LOADING_MODULE] === 'labels',
|
loading: state => state[LOADING] && state[LOADING_MODULE] === 'labels',
|
||||||
}),
|
}),
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -167,10 +168,7 @@ export default {
|
||||||
// Duplicating the label to make sure it does not look like changes take effect immediatly as the label
|
// Duplicating the label to make sure it does not look like changes take effect immediatly as the label
|
||||||
// object passed to this function here still has a reference to the store.
|
// object passed to this function here still has a reference to the store.
|
||||||
this.labelEditLabel = new LabelModel({
|
this.labelEditLabel = new LabelModel({
|
||||||
id: label.id,
|
...label,
|
||||||
title: label.title,
|
|
||||||
description: label.description,
|
|
||||||
hexColor: label.hexColor,
|
|
||||||
})
|
})
|
||||||
this.isLabelEdit = true
|
this.isLabelEdit = true
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
:class="{ 'is-loading': loading && !oneTaskUpdating}"
|
:class="{ 'is-loading': loading && !oneTaskUpdating}"
|
||||||
class="kanban kanban-bucket-container loader-container">
|
class="kanban kanban-bucket-container loader-container">
|
||||||
<draggable
|
<draggable
|
||||||
|
v-bind="dragOptions"
|
||||||
v-model="buckets"
|
v-model="buckets"
|
||||||
@start="() => dragBucket = true"
|
@start="() => dragBucket = true"
|
||||||
@end="updateBucketPosition"
|
@end="updateBucketPosition"
|
||||||
group="buckets"
|
group="buckets"
|
||||||
v-bind="dragOptions"
|
|
||||||
:disabled="!canWrite"
|
:disabled="!canWrite"
|
||||||
:class="{'dragging-disabled': !canWrite}"
|
:class="{'dragging-disabled': !canWrite}"
|
||||||
>
|
>
|
||||||
|
@ -129,11 +129,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div :ref="`tasks-container${bucket.id}`" class="tasks">
|
<div :ref="`tasks-container${bucket.id}`" class="tasks">
|
||||||
<draggable
|
<draggable
|
||||||
|
v-bind="dragOptions"
|
||||||
v-model="bucket.tasks"
|
v-model="bucket.tasks"
|
||||||
@start="() => dragstart(bucket)"
|
@start="() => dragstart(bucket)"
|
||||||
@end="updateTaskPosition"
|
@end="updateTaskPosition"
|
||||||
:group="{name: 'tasks', put: shouldAcceptDrop(bucket) && !dragBucket}"
|
:group="{name: 'tasks', put: shouldAcceptDrop(bucket) && !dragBucket}"
|
||||||
v-bind="dragOptions"
|
|
||||||
:disabled="!canWrite"
|
:disabled="!canWrite"
|
||||||
:class="{'dragging-disabled': !canWrite}"
|
:class="{'dragging-disabled': !canWrite}"
|
||||||
:data-bucket-index="k"
|
:data-bucket-index="k"
|
||||||
|
|
|
@ -81,11 +81,11 @@
|
||||||
v-if="tasks && tasks.length > 0"
|
v-if="tasks && tasks.length > 0"
|
||||||
>
|
>
|
||||||
<draggable
|
<draggable
|
||||||
|
v-bind="dragOptions"
|
||||||
v-model="tasks"
|
v-model="tasks"
|
||||||
group="tasks"
|
group="tasks"
|
||||||
@start="() => drag = true"
|
@start="() => drag = true"
|
||||||
@end="saveTaskPosition"
|
@end="saveTaskPosition"
|
||||||
v-bind="dragOptions"
|
|
||||||
handle=".handle"
|
handle=".handle"
|
||||||
:disabled="!canWrite"
|
:disabled="!canWrite"
|
||||||
:class="{'dragging-disabled': !canWrite}"
|
:class="{'dragging-disabled': !canWrite}"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="content loader-container is-max-width-desktop" v-bind:class="{ 'is-loading': teamService.loading}">
|
<div class="content loader-container is-max-width-desktop" :class="{ 'is-loading': teamService.loading}">
|
||||||
<x-button
|
<x-button
|
||||||
:to="{name:'teams.create'}"
|
:to="{name:'teams.create'}"
|
||||||
class="is-pulled-right"
|
class="is-pulled-right"
|
||||||
|
|
|
@ -379,6 +379,8 @@ export default {
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
copy,
|
||||||
|
|
||||||
updatePassword() {
|
updatePassword() {
|
||||||
if (this.passwordConfirm !== this.passwordUpdate.newPassword) {
|
if (this.passwordConfirm !== this.passwordUpdate.newPassword) {
|
||||||
this.error({message: this.$t('user.settings.passwordsDontMatch')})
|
this.error({message: this.$t('user.settings.passwordsDontMatch')})
|
||||||
|
@ -462,9 +464,6 @@ export default {
|
||||||
})
|
})
|
||||||
.catch(e => this.error(e))
|
.catch(e => this.error(e))
|
||||||
},
|
},
|
||||||
copy(text) {
|
|
||||||
copy(text)
|
|
||||||
},
|
|
||||||
anchorHashCheck() {
|
anchorHashCheck() {
|
||||||
if (window.location.hash === this.$route.hash) {
|
if (window.location.hash === this.$route.hash) {
|
||||||
const el = document.getElementById(this.$route.hash.slice(1))
|
const el = document.getElementById(this.$route.hash.slice(1))
|
||||||
|
|
Loading…
Reference in a new issue