Merge remote-tracking branch 'origin/main'

This commit is contained in:
Matthew Kilgore
2025-08-21 19:22:49 -04:00
12 changed files with 23 additions and 30 deletions

View File

@@ -205,7 +205,7 @@ func (ctrl *V1Controller) handleItemAttachmentsHandler(w http.ResponseWriter, r
}(bucket)
// Set the Content-Disposition header for RFC6266 compliance
disposition := "attachment; filename*=UTF-8''" + url.QueryEscape(doc.Title)
disposition := "inline; filename*=UTF-8''" + url.QueryEscape(doc.Title)
w.Header().Set("Content-Disposition", disposition)
http.ServeContent(w, r, doc.Title, doc.CreatedAt, file)
return nil

View File

@@ -3639,7 +3639,7 @@ const docTemplate = `{
},
"description": {
"type": "string",
"maxLength": 255
"maxLength": 1000
},
"name": {
"type": "string",

View File

@@ -3637,7 +3637,7 @@
},
"description": {
"type": "string",
"maxLength": 255
"maxLength": 1000
},
"name": {
"type": "string",

View File

@@ -1012,7 +1012,7 @@ definitions:
color:
type: string
description:
maxLength: 255
maxLength: 1000
type: string
name:
maxLength: 255

View File

@@ -20,14 +20,14 @@ type LabelRepository struct {
type (
LabelCreate struct {
Name string `json:"name" validate:"required,min=1,max=255"`
Description string `json:"description" validate:"max=255"`
Description string `json:"description" validate:"max=1000"`
Color string `json:"color"`
}
LabelUpdate struct {
ID uuid.UUID `json:"id"`
Name string `json:"name" validate:"required,min=1,max=255"`
Description string `json:"description" validate:"max=255"`
Description string `json:"description" validate:"max=1000"`
Color string `json:"color"`
}

View File

@@ -3637,7 +3637,7 @@
},
"description": {
"type": "string",
"maxLength": 255
"maxLength": 1000
},
"name": {
"type": "string",

View File

@@ -1012,7 +1012,7 @@ definitions:
color:
type: string
description:
maxLength: 255
maxLength: 1000
type: string
name:
maxLength: 255

View File

@@ -42,6 +42,6 @@
<MdiArrowUp class="hidden group-hover/label-chip:block" />
</div>
</div>
{{ label.name.length > 20 ? `${label.name.substring(0, 20)}...` : label.name }}
{{ label.name }}
</NuxtLink>
</template>

View File

@@ -12,7 +12,7 @@
<FormTextArea
v-model="form.description"
:label="$t('components.label.create_modal.label_description')"
:max-length="255"
:max-length="1000"
/>
<ColorSelector v-model="form.color" :label="$t('components.label.create_modal.label_color')" :show-hex="true" />
<div class="mt-4 flex flex-row-reverse">

View File

@@ -7,16 +7,16 @@
<TagsInput
v-model="modelValue"
class="w-full gap-0 px-0"
:display-value="v => shortenedLabels.find(l => l.id === v)?.name ?? 'Loading...'"
:display-value="v => props.labels.find(l => l.id === v)?.name ?? 'Loading...'"
>
<div class="flex flex-wrap items-center gap-2 px-3">
<TagsInputItem v-for="item in modelValue" :key="item" :value="item">
<div class="flex flex-wrap items-center gap-2 overflow-hidden px-3">
<TagsInputItem v-for="item in modelValue" :key="item" :value="item" class="h-auto overflow-hidden text-wrap">
<span
v-if="shortenedLabels.find(l => l.id === item)?.color"
class="ml-2 inline-block size-4 rounded-full"
:style="{ backgroundColor: shortenedLabels.find(l => l.id === item)?.color }"
v-if="props.labels.find(l => l.id === item)?.color"
class="ml-2 size-4 shrink-0 rounded-full"
:style="{ backgroundColor: props.labels.find(l => l.id === item)?.color }"
/>
<TagsInputItemText />
<TagsInputItemText class="py-0.5" />
<TagsInputItemDelete />
</TagsInputItem>
</div>
@@ -61,9 +61,9 @@
"
>
<span
class="mr-2 inline-block size-4 rounded-full align-middle"
:class="{ border: shortenedLabels.find(l => l.id === label.value)?.color }"
:style="{ backgroundColor: shortenedLabels.find(l => l.id === label.value)?.color }"
class="mr-2 size-4 shrink-0 rounded-full align-middle"
:class="{ border: props.labels.find(l => l.id === label.value)?.color }"
:style="{ backgroundColor: props.labels.find(l => l.id === label.value)?.color }"
/>
{{ label.label }}
</CommandItem>
@@ -114,16 +114,9 @@
const open = ref(false);
const searchTerm = ref("");
const shortenedLabels = computed(() => {
return props.labels.map(l => ({
...l,
name: l.name.length > 20 ? `${l.name.substring(0, 20)}...` : l.name,
}));
});
const filteredLabels = computed(() => {
const filtered = fuzzysort
.go(searchTerm.value, shortenedLabels.value, { key: "name", all: true })
.go(searchTerm.value, props.labels, { key: "name", all: true })
.map(l => ({
value: l.obj.id,
label: l.obj.name,

View File

@@ -648,7 +648,7 @@ export interface ItemUpdate {
export interface LabelCreate {
color: string;
/** @maxLength 255 */
/** @maxLength 1000 */
description: string;
/**
* @minLength 1

View File

@@ -129,7 +129,7 @@
<FormTextArea
v-model="updateData.description"
:label="$t('components.label.create_modal.label_description')"
:max-length="255"
:max-length="1000"
/>
<ColorSelector
v-model="updateData.color"