2021-01-30 17:17:04 +01:00
|
|
|
<template>
|
|
|
|
<dropdown>
|
|
|
|
<template v-if="namespace.isArchived">
|
|
|
|
<dropdown-item
|
|
|
|
:to="{ name: 'namespace.settings.archive', params: { id: namespace.id } }"
|
|
|
|
icon="archive"
|
|
|
|
>
|
|
|
|
Un-Archive
|
|
|
|
</dropdown-item>
|
|
|
|
</template>
|
|
|
|
<template v-else>
|
|
|
|
<dropdown-item
|
|
|
|
:to="{ name: 'namespace.settings.edit', params: { id: namespace.id } }"
|
|
|
|
icon="pen"
|
|
|
|
>
|
|
|
|
Edit
|
|
|
|
</dropdown-item>
|
|
|
|
<dropdown-item
|
|
|
|
:to="{ name: 'namespace.settings.share', params: { id: namespace.id } }"
|
|
|
|
icon="share-alt"
|
|
|
|
>
|
|
|
|
Share
|
|
|
|
</dropdown-item>
|
|
|
|
<dropdown-item
|
|
|
|
:to="{ name: 'list.create', params: { id: namespace.id } }"
|
|
|
|
icon="plus"
|
|
|
|
>
|
|
|
|
New list
|
|
|
|
</dropdown-item>
|
|
|
|
<dropdown-item
|
|
|
|
:to="{ name: 'namespace.settings.archive', params: { id: namespace.id } }"
|
|
|
|
icon="archive"
|
|
|
|
>
|
|
|
|
Archive
|
|
|
|
</dropdown-item>
|
2021-02-14 20:18:51 +01:00
|
|
|
<task-subscription
|
|
|
|
class="dropdown-item has-no-shadow"
|
|
|
|
:is-button="false"
|
|
|
|
entity="namespace"
|
|
|
|
:entity-id="namespace.id"
|
|
|
|
:subscription="subscription"
|
|
|
|
@change="sub => subscription = sub"
|
|
|
|
/>
|
2021-01-30 17:17:04 +01:00
|
|
|
<dropdown-item
|
|
|
|
:to="{ name: 'namespace.settings.delete', params: { id: namespace.id } }"
|
|
|
|
icon="trash-alt"
|
|
|
|
class="has-text-danger"
|
|
|
|
>
|
|
|
|
Delete
|
|
|
|
</dropdown-item>
|
|
|
|
</template>
|
|
|
|
</dropdown>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Dropdown from '@/components/misc/dropdown'
|
|
|
|
import DropdownItem from '@/components/misc/dropdown-item'
|
2021-02-14 20:18:51 +01:00
|
|
|
import TaskSubscription from '@/components/misc/subscription'
|
2021-01-30 17:17:04 +01:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'namespace-settings-dropdown',
|
2021-02-14 20:18:51 +01:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
subscription: null,
|
|
|
|
}
|
|
|
|
},
|
2021-01-30 17:17:04 +01:00
|
|
|
components: {
|
|
|
|
DropdownItem,
|
|
|
|
Dropdown,
|
2021-02-14 20:18:51 +01:00
|
|
|
TaskSubscription,
|
2021-01-30 17:17:04 +01:00
|
|
|
},
|
|
|
|
props: {
|
|
|
|
namespace: {
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
2021-02-14 20:18:51 +01:00
|
|
|
mounted() {
|
|
|
|
this.subscription = this.namespace.subscription
|
|
|
|
},
|
2021-01-30 17:17:04 +01:00
|
|
|
}
|
|
|
|
</script>
|