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"
|
|
|
|
>
|
2021-06-24 01:24:57 +02:00
|
|
|
{{ $t('menu.unarchive') }}
|
2021-01-30 17:17:04 +01:00
|
|
|
</dropdown-item>
|
|
|
|
</template>
|
|
|
|
<template v-else>
|
|
|
|
<dropdown-item
|
|
|
|
:to="{ name: 'namespace.settings.edit', params: { id: namespace.id } }"
|
|
|
|
icon="pen"
|
|
|
|
>
|
2021-06-24 01:24:57 +02:00
|
|
|
{{ $t('menu.edit') }}
|
2021-01-30 17:17:04 +01:00
|
|
|
</dropdown-item>
|
|
|
|
<dropdown-item
|
|
|
|
:to="{ name: 'namespace.settings.share', params: { id: namespace.id } }"
|
|
|
|
icon="share-alt"
|
|
|
|
>
|
2021-06-24 01:24:57 +02:00
|
|
|
{{ $t('menu.share') }}
|
2021-01-30 17:17:04 +01:00
|
|
|
</dropdown-item>
|
|
|
|
<dropdown-item
|
2021-11-17 18:04:53 +01:00
|
|
|
:to="{ name: 'list.create', params: { namespaceId: namespace.id } }"
|
2021-01-30 17:17:04 +01:00
|
|
|
icon="plus"
|
|
|
|
>
|
2021-06-24 01:24:57 +02:00
|
|
|
{{ $t('menu.newList') }}
|
2021-01-30 17:17:04 +01:00
|
|
|
</dropdown-item>
|
|
|
|
<dropdown-item
|
|
|
|
:to="{ name: 'namespace.settings.archive', params: { id: namespace.id } }"
|
|
|
|
icon="archive"
|
|
|
|
>
|
2021-06-24 01:24:57 +02:00
|
|
|
{{ $t('menu.archive') }}
|
2021-01-30 17:17:04 +01:00
|
|
|
</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"
|
|
|
|
>
|
2021-06-24 01:24:57 +02:00
|
|
|
{{ $t('menu.delete') }}
|
2021-01-30 17:17:04 +01:00
|
|
|
</dropdown-item>
|
|
|
|
</template>
|
|
|
|
</dropdown>
|
|
|
|
</template>
|
|
|
|
|
2021-12-04 15:47:32 +01:00
|
|
|
<script setup lang="ts">
|
|
|
|
import {ref, onMounted} from 'vue'
|
|
|
|
|
2021-07-25 15:27:15 +02:00
|
|
|
import Dropdown from '@/components/misc/dropdown.vue'
|
|
|
|
import DropdownItem from '@/components/misc/dropdown-item.vue'
|
|
|
|
import TaskSubscription from '@/components/misc/subscription.vue'
|
2021-01-30 17:17:04 +01:00
|
|
|
|
2021-12-04 15:47:32 +01:00
|
|
|
const props = defineProps({
|
|
|
|
namespace: {
|
|
|
|
type: Object, // NamespaceModel
|
|
|
|
required: true,
|
2021-01-30 17:17:04 +01:00
|
|
|
},
|
2021-12-04 15:47:32 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
const subscription = ref(null)
|
|
|
|
onMounted(() => {
|
|
|
|
subscription.value = props.namespace.subscription
|
|
|
|
})
|
2021-01-30 17:17:04 +01:00
|
|
|
</script>
|