add content in list, add list options
This commit is contained in:
1 parent
b2444a8118
commit
66a6400cda
5 files changed
+67
-8
No files matched your search
@@ -0,0 +1,42 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
const options = [
|
||||||
|
{ id: 1, title: 'Title' },
|
||||||
|
{ id: 2, title: 'Content' },
|
||||||
|
{ id: 3, title: 'Status' },
|
||||||
|
]
|
||||||
|
const select = (value: unknown) => {}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<v-menu width="15rem" :close-on-content-click="false">
|
||||||
|
<template v-slot:activator="{ props }">
|
||||||
|
<v-btn density="compact" icon="mdi-dots-horizontal" v-bind="props" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<v-list border select-strategy="single-leaf" density="compact" @update:selected="select">
|
||||||
|
<v-list-item rounded="0" class="py-0" slim v-for="el in options" :key="el.id">
|
||||||
|
<v-list-item-title>
|
||||||
|
<div class="menu-grid px-1">
|
||||||
|
<div>{{ el.title }}</div>
|
||||||
|
<v-switch
|
||||||
|
inset="material"
|
||||||
|
size="x-small"
|
||||||
|
color="success"
|
||||||
|
true-icon="mdi-check"
|
||||||
|
false-icon="mdi-close"
|
||||||
|
hide-details
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</v-list-item-title>
|
||||||
|
</v-list-item>
|
||||||
|
</v-list>
|
||||||
|
</v-menu>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.menu-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr auto;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -39,15 +39,24 @@ const onAssigneeChanged = async (assignee: string) => {
|
|||||||
<template>
|
<template>
|
||||||
<v-list-item class="bg-on-surface-variant" :value="issue.key">
|
<v-list-item class="bg-on-surface-variant" :value="issue.key">
|
||||||
<template #title>
|
<template #title>
|
||||||
<div class="d-flex ga-4">
|
<div class="d-flex ga-4 min-w-0 mr-4">
|
||||||
<div>{{ issue.key }}</div>
|
<div class="flex-shrink-0">{{ issue.key }}</div>
|
||||||
<div class="d-flex ga-1 align-center">
|
<div class="d-flex ga-4 align-center min-w-0">
|
||||||
<v-icon
|
<v-icon
|
||||||
v-if="[3, 4].includes(issue.priority) && ['OPEN', 'IN_PROGRESS'].includes(issue.status)"
|
v-if="[3, 4].includes(issue.priority) && ['OPEN', 'IN_PROGRESS'].includes(issue.status)"
|
||||||
icon="mdi-alert-box"
|
icon="mdi-alert-box"
|
||||||
color="error"
|
color="error"
|
||||||
/>
|
/>
|
||||||
<div :class="{ 'text-decoration-line-through': issue.status === 'DONE' }">{{ issue.title }}</div>
|
<div class="flex-shrink-0" :class="{ 'text-decoration-line-through': issue.status === 'DONE' }">
|
||||||
|
{{ issue.title }}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
:class="{ 'text-decoration-line-through': issue.status === 'DONE' }"
|
||||||
|
class="text-body-medium text-truncate min-w-0"
|
||||||
|
:title="issue.content"
|
||||||
|
>
|
||||||
|
{{ issue.content }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -73,4 +82,8 @@ const onAssigneeChanged = async (assignee: string) => {
|
|||||||
</v-list-item>
|
</v-list-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss">
|
||||||
|
.min-w-0 {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -28,7 +28,7 @@ const select = (value: unknown) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="">
|
<div>
|
||||||
<v-menu>
|
<v-menu>
|
||||||
<template v-slot:activator="{ props: activatorProps }">
|
<template v-slot:activator="{ props: activatorProps }">
|
||||||
<v-btn
|
<v-btn
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import IssueStats from '@/components/IssueStats.vue'
|
|||||||
import IssueFilter from '@/components/IssueFilter.vue'
|
import IssueFilter from '@/components/IssueFilter.vue'
|
||||||
import SplitHandle from '@/components/SplitHandle.vue'
|
import SplitHandle from '@/components/SplitHandle.vue'
|
||||||
import { useSplitPane } from '@/composables/useSplitPane.ts'
|
import { useSplitPane } from '@/composables/useSplitPane.ts'
|
||||||
|
import IssueListOptions from '@/components/IssueListOptions.vue'
|
||||||
|
|
||||||
const issueStore = useIssueStore()
|
const issueStore = useIssueStore()
|
||||||
const issueDetailsRef = ref<InstanceType<typeof IssueDetails>>()
|
const issueDetailsRef = ref<InstanceType<typeof IssueDetails>>()
|
||||||
@@ -220,7 +221,7 @@ async function onDeleteBatch() {
|
|||||||
<template #append>
|
<template #append>
|
||||||
<div class="d-flex ga-4 align-center">
|
<div class="d-flex ga-4 align-center">
|
||||||
<issue-stats />
|
<issue-stats />
|
||||||
<v-btn density="compact" icon="mdi-dots-horizontal"></v-btn>
|
<issue-list-options />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ interface CalendarRange {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const UNSCHEDULED_LIMIT = 20
|
const UNSCHEDULED_LIMIT = 20
|
||||||
|
/** Closed issues are not worth scheduling, so the side list shows only these */
|
||||||
|
const UNSCHEDULED_STATUSES: Issue['status'][] = ['OPEN', 'IN_PROGRESS']
|
||||||
const DRAG_TYPE = 'application/x-ulitka-issue'
|
const DRAG_TYPE = 'application/x-ulitka-issue'
|
||||||
|
|
||||||
const issueStore = useIssueStore()
|
const issueStore = useIssueStore()
|
||||||
@@ -118,6 +120,7 @@ async function loadUnscheduled(page = 1) {
|
|||||||
limit: UNSCHEDULED_LIMIT,
|
limit: UNSCHEDULED_LIMIT,
|
||||||
text: search.value,
|
text: search.value,
|
||||||
projectId: currentProjectId.value,
|
projectId: currentProjectId.value,
|
||||||
|
status: UNSCHEDULED_STATUSES,
|
||||||
hasDueDate: false,
|
hasDueDate: false,
|
||||||
})
|
})
|
||||||
if (requestId !== unscheduledRequestId) return
|
if (requestId !== unscheduledRequestId) return
|
||||||
@@ -158,7 +161,7 @@ async function setDueDate(issue: Issue, date: string | null) {
|
|||||||
if (updated.dueDate) {
|
if (updated.dueDate) {
|
||||||
scheduled.value.push(updated)
|
scheduled.value.push(updated)
|
||||||
if (wasUnscheduled) unscheduledTotal.value--
|
if (wasUnscheduled) unscheduledTotal.value--
|
||||||
} else {
|
} else if (UNSCHEDULED_STATUSES.includes(updated.status)) {
|
||||||
unscheduled.value.unshift(updated)
|
unscheduled.value.unshift(updated)
|
||||||
unscheduledTotal.value++
|
unscheduledTotal.value++
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user