feat: update to new slot syntax
Prepare for vue 3
This commit is contained in:
parent
77f8b27dc6
commit
4454e6cf22
18 changed files with 104 additions and 106 deletions
|
@ -49,7 +49,7 @@
|
|||
<div class="user">
|
||||
<img :src="userAvatar" alt="" class="avatar" width="40" height="40"/>
|
||||
<dropdown class="is-right" ref="usernameDropdown">
|
||||
<template v-slot:trigger>
|
||||
<template #trigger>
|
||||
<x-button
|
||||
type="secondary"
|
||||
:shadow="false">
|
||||
|
|
|
@ -1,33 +1,24 @@
|
|||
<template>
|
||||
<notifications position="bottom left" :max="2" class="global-notification">
|
||||
<template slot="body" slot-scope="props">
|
||||
<template #body="{ item, close }">
|
||||
<div
|
||||
:class="[
|
||||
'vue-notification-template',
|
||||
'vue-notification',
|
||||
props.item.type,
|
||||
item.type,
|
||||
]"
|
||||
@click="close(props)"
|
||||
@click="close()"
|
||||
>
|
||||
<div
|
||||
class="notification-title"
|
||||
v-if="props.item.title"
|
||||
>
|
||||
{{ props.item.title }}
|
||||
</div>
|
||||
<div
|
||||
class="notification-content"
|
||||
>
|
||||
<template v-for="(t, k) in props.item.text">
|
||||
{{ t }}<br :key="k"/>
|
||||
</template>
|
||||
<div v-if="item.title" class="notification-title">{{ item.title }}</div>
|
||||
<div class="notification-content">
|
||||
<template v-for="(t, k) in item.text">{{ t }}<br :key="k"/></template>
|
||||
</div>
|
||||
<div
|
||||
class="buttons is-right"
|
||||
v-if="
|
||||
props.item.data &&
|
||||
props.item.data.actions &&
|
||||
props.item.data.actions.length > 0
|
||||
item.data &&
|
||||
item.data.actions &&
|
||||
item.data.actions.length > 0
|
||||
"
|
||||
>
|
||||
<x-button
|
||||
|
@ -36,7 +27,7 @@
|
|||
:shadow="false"
|
||||
class="is-small"
|
||||
type="secondary"
|
||||
v-for="(action, i) in props.item.data.actions"
|
||||
v-for="(action, i) in item.data.actions"
|
||||
>
|
||||
{{ action.title }}
|
||||
</x-button>
|
||||
|
@ -49,11 +40,6 @@
|
|||
<script>
|
||||
export default {
|
||||
name: 'notification',
|
||||
methods: {
|
||||
close(props) {
|
||||
props.close()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -163,10 +163,13 @@
|
|||
@submit="remove()"
|
||||
v-if="showDeleteModal"
|
||||
>
|
||||
<span slot="header">{{ $t('list.share.links.remove') }}</span>
|
||||
<p slot="text">
|
||||
{{ $t('list.share.links.removeText') }}
|
||||
</p>
|
||||
<template #header>
|
||||
<span>{{ $t('list.share.links.remove') }}</span>
|
||||
</template>
|
||||
|
||||
<template #text>
|
||||
<p>{{ $t('list.share.links.removeText') }}</p>
|
||||
</template>
|
||||
</modal>
|
||||
</transition>
|
||||
</div>
|
||||
|
|
|
@ -119,12 +119,12 @@
|
|||
@submit="deleteSharable()"
|
||||
v-if="showDeleteModal"
|
||||
>
|
||||
<span slot="header">
|
||||
{{ $t('list.share.userTeam.removeHeader', {type: shareTypeName, sharable: sharableName}) }}
|
||||
</span>
|
||||
<p slot="text">
|
||||
{{ $t('list.share.userTeam.removeText', {type: shareTypeName, sharable: sharableName}) }}
|
||||
</p>
|
||||
<template #header>
|
||||
<span>{{ $t('list.share.userTeam.removeHeader', {type: shareTypeName, sharable: sharableName}) }}</span>
|
||||
</template>
|
||||
<template #text>
|
||||
<p>{{ $t('list.share.userTeam.removeText', {type: shareTypeName, sharable: sharableName}) }}</p>
|
||||
</template>
|
||||
</modal>
|
||||
</transition>
|
||||
</div>
|
||||
|
|
|
@ -110,11 +110,12 @@
|
|||
v-if="showDeleteModal"
|
||||
@submit="deleteAttachment()"
|
||||
>
|
||||
<span slot="header">{{ $t('task.attachment.delete') }}</span>
|
||||
<p slot="text">
|
||||
{{ $t('task.attachment.deleteText1', {filename: attachmentToDelete.file.name}) }}<br/>
|
||||
<strong>{{ $t('task.attachment.deleteText2') }}</strong>
|
||||
</p>
|
||||
<template #header><span>{{ $t('task.attachment.delete') }}</span></template>
|
||||
|
||||
<template #text>
|
||||
<p>{{ $t('task.attachment.deleteText1', {filename: attachmentToDelete.file.name}) }}<br/>
|
||||
<strong>{{ $t('task.attachment.deleteText2') }}</strong></p>
|
||||
</template>
|
||||
</modal>
|
||||
</transition>
|
||||
|
||||
|
|
|
@ -138,11 +138,12 @@
|
|||
@submit="deleteComment()"
|
||||
v-if="showDeleteModal"
|
||||
>
|
||||
<span slot="header">{{ $t('task.comment.delete') }}</span>
|
||||
<p slot="text">
|
||||
{{ $t('task.comment.deleteText1') }}<br/>
|
||||
<strong>{{ $t('task.comment.deleteText2') }}</strong>
|
||||
</p>
|
||||
<template #header><span>{{ $t('task.comment.delete') }}</span></template>
|
||||
|
||||
<template #text>
|
||||
<p>{{ $t('task.comment.deleteText1') }}<br/>
|
||||
<strong>{{ $t('task.comment.deleteText2') }}</strong></p>
|
||||
</template>
|
||||
</modal>
|
||||
</transition>
|
||||
</div>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
v-model="assignees"
|
||||
ref="multiselect"
|
||||
>
|
||||
<template v-slot:tag="props">
|
||||
<template #tag="props">
|
||||
<span class="assignee">
|
||||
<user :avatar-size="32" :show-username="false" :user="props.item"/>
|
||||
<a @click="removeAssignee(props.item)" class="remove-assignee" v-if="!disabled">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
v-model="labels"
|
||||
:search-delay="10"
|
||||
>
|
||||
<template v-slot:tag="props">
|
||||
<template #tag="props">
|
||||
<span
|
||||
:style="{'background': props.item.hexColor, 'color': props.item.textColor}"
|
||||
class="tag">
|
||||
|
@ -21,7 +21,7 @@
|
|||
<a @click="removeLabel(props.item)" class="delete is-small"></a>
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot:searchResult="props">
|
||||
<template #searchResult="props">
|
||||
<span
|
||||
v-if="typeof props.option === 'string'"
|
||||
class="tag">
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
v-model="list"
|
||||
:select-placeholder="$t('list.searchSelect')"
|
||||
>
|
||||
<template v-slot:searchResult="props">
|
||||
<template #searchResult="props">
|
||||
<span class="list-namespace-title search-result">{{ namespace(props.option.namespaceId) }} ></span>
|
||||
{{ props.option.title }}
|
||||
</template>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
:create-placeholder="$t('task.relation.createPlaceholder')"
|
||||
@create="createAndRelateTask"
|
||||
>
|
||||
<template v-slot:searchResult="props">
|
||||
<template #searchResult="props">
|
||||
<span v-if="typeof props.option !== 'string'" class="search-result">
|
||||
<span
|
||||
class="different-list"
|
||||
|
@ -107,12 +107,14 @@
|
|||
<modal
|
||||
@close="showDeleteModal = false"
|
||||
@submit="removeTaskRelation()"
|
||||
v-if="showDeleteModal">
|
||||
<span slot="header">{{ $t('task.relation.delete') }}</span>
|
||||
<p slot="text">
|
||||
{{ $t('task.relation.deleteText1') }}<br/>
|
||||
<strong>{{ $t('task.relation.deleteText2') }}</strong>
|
||||
</p>
|
||||
v-if="showDeleteModal"
|
||||
>
|
||||
<template #header><span>{{ $t('task.relation.delete') }}</span></template>
|
||||
|
||||
<template #text>
|
||||
<p>{{ $t('task.relation.deleteText1') }}<br/>
|
||||
<strong>{{ $t('task.relation.deleteText2') }}</strong></p>
|
||||
</template>
|
||||
</modal>
|
||||
</transition>
|
||||
</div>
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
@close="$router.back()"
|
||||
@submit="deleteSavedFilter()"
|
||||
>
|
||||
<span slot="header">{{ $t('filters.delete.header') }}</span>
|
||||
<p slot="text">
|
||||
{{ $t('filters.delete.text') }}
|
||||
</p>
|
||||
<template #header><span>{{ $t('filters.delete.header') }}</span></template>
|
||||
|
||||
<template #text>
|
||||
<p>{{ $t('filters.delete.text') }}</p>
|
||||
</template>
|
||||
</modal>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -3,13 +3,11 @@
|
|||
@close="$router.back()"
|
||||
@submit="archiveList()"
|
||||
>
|
||||
<span slot="header">{{ list.isArchived ? $t('list.archive.unarchive') : $t('list.archive.archive') }}</span>
|
||||
<p slot="text" v-if="list.isArchived">
|
||||
{{ $t('list.archive.unarchiveText') }}
|
||||
</p>
|
||||
<p slot="text" v-else>
|
||||
{{ $t('list.archive.archiveText') }}
|
||||
</p>
|
||||
<template #header><span>{{ list.isArchived ? $t('list.archive.unarchive') : $t('list.archive.archive') }}</span></template>
|
||||
|
||||
<template #text>
|
||||
<p>{{ list.isArchived ? $t('list.archive.unarchiveText') : $t('list.archive.archiveText') }}</p>
|
||||
</template>
|
||||
</modal>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
@close="$router.back()"
|
||||
@submit="deleteList()"
|
||||
>
|
||||
<span slot="header">{{ $t('list.delete.header') }}</span>
|
||||
<p slot="text">
|
||||
{{ $t('list.delete.text1') }}<br/>
|
||||
{{ $t('list.delete.text2') }}
|
||||
</p>
|
||||
<template #header><span>{{ $t('list.delete.header') }}</span></template>
|
||||
|
||||
<template #text>
|
||||
<p>{{ $t('list.delete.text1') }}<br/>
|
||||
{{ $t('list.delete.text2') }}</p>
|
||||
</template>
|
||||
</modal>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -220,12 +220,14 @@
|
|||
<modal
|
||||
@close="showBucketDeleteModal = false"
|
||||
@submit="deleteBucket()"
|
||||
v-if="showBucketDeleteModal">
|
||||
<span slot="header">{{ $t('list.kanban.deleteHeaderBucket') }}</span>
|
||||
<p slot="text">
|
||||
{{ $t('list.kanban.deleteBucketText1') }}<br/>
|
||||
{{ $t('list.kanban.deleteBucketText2') }}
|
||||
</p>
|
||||
v-if="showBucketDeleteModal"
|
||||
>
|
||||
<template #header><span>{{ $t('list.kanban.deleteHeaderBucket') }}</span></template>
|
||||
|
||||
<template #text>
|
||||
<p>{{ $t('list.kanban.deleteBucketText1') }}<br/>
|
||||
{{ $t('list.kanban.deleteBucketText2') }}</p>
|
||||
</template>
|
||||
</modal>
|
||||
</transition>
|
||||
</div>
|
||||
|
|
|
@ -3,13 +3,11 @@
|
|||
@close="$router.back()"
|
||||
@submit="archiveNamespace()"
|
||||
>
|
||||
<span slot="header">{{ title }}</span>
|
||||
<p slot="text" v-if="namespace.isArchived">
|
||||
{{ $t('namespace.archive.unarchiveText') }}
|
||||
</p>
|
||||
<p slot="text" v-else>
|
||||
{{ $t('namespace.archive.archiveText') }}
|
||||
</p>
|
||||
<template #header><span>{{ title }}</span></template>
|
||||
|
||||
<template #text>
|
||||
<p>{{ list.isArchived ? $t('namespace.archive.unarchiveText') : $t('namespace.archive.archiveText') }}</p>
|
||||
</template>
|
||||
</modal>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
@close="$router.back()"
|
||||
@submit="deleteNamespace()"
|
||||
>
|
||||
<span slot="header">{{ title }}</span>
|
||||
<p slot="text">
|
||||
{{ $t('namespace.delete.text1') }}<br/>
|
||||
{{ $t('namespace.delete.text2') }}
|
||||
</p>
|
||||
<template #header><span>{{ title }}</span></template>
|
||||
|
||||
<template #text>
|
||||
<p>{{ $t('namespace.delete.text1') }}<br/>
|
||||
{{ $t('namespace.delete.text2') }}</p>
|
||||
</template>
|
||||
</modal>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -405,12 +405,14 @@
|
|||
<modal
|
||||
@close="showDeleteModal = false"
|
||||
@submit="deleteTask()"
|
||||
v-if="showDeleteModal">
|
||||
<span slot="header">{{ $t('task.detail.delete.header') }}</span>
|
||||
<p slot="text">
|
||||
{{ $t('task.detail.delete.text1') }}<br/>
|
||||
{{ $t('task.detail.delete.text2') }}
|
||||
</p>
|
||||
v-if="showDeleteModal"
|
||||
>
|
||||
<template #header><span>{{ $t('task.detail.delete.header') }}</span></template>
|
||||
|
||||
<template #text>
|
||||
<p>{{ $t('task.detail.delete.text1') }}<br/>
|
||||
{{ $t('task.detail.delete.text2') }}</p>
|
||||
</template>
|
||||
</modal>
|
||||
</transition>
|
||||
</div>
|
||||
|
|
|
@ -134,11 +134,12 @@
|
|||
@submit="deleteTeam()"
|
||||
v-if="showDeleteModal"
|
||||
>
|
||||
<span slot="header">{{ $t('team.edit.delete.header') }}</span>
|
||||
<p slot="text">
|
||||
{{ $t('team.edit.delete.text1') }}<br/>
|
||||
{{ $t('team.edit.delete.text2') }}
|
||||
</p>
|
||||
<template #header><span>{{ $t('team.edit.delete.header') }}</span></template>
|
||||
|
||||
<template #text>
|
||||
<p>{{ $t('team.edit.delete.text1') }}<br/>
|
||||
{{ $t('team.edit.delete.text2') }}</p>
|
||||
</template>
|
||||
</modal>
|
||||
</transition>
|
||||
<!-- User delete modal -->
|
||||
|
@ -148,11 +149,12 @@
|
|||
@submit="deleteUser()"
|
||||
v-if="showUserDeleteModal"
|
||||
>
|
||||
<span slot="header">{{ $t('team.edit.deleteUser.header') }}</span>
|
||||
<p slot="text">
|
||||
{{ $t('team.edit.deleteUser.text1') }}
|
||||
{{ $t('team.edit.deleteUser.text2') }}
|
||||
</p>
|
||||
<template #header><span>{{ $t('team.edit.deleteUser.header') }}</span></template>
|
||||
|
||||
<template #text>
|
||||
<p>{{ $t('team.edit.deleteUser.text1') }}<br/>
|
||||
{{ $t('team.edit.deleteUser.text2') }}</p>
|
||||
</template>
|
||||
</modal>
|
||||
</transition>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue