mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-21 13:23:14 +01:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -3639,7 +3639,7 @@ const docTemplate = `{
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxLength": 255
|
||||
"maxLength": 1000
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
|
||||
@@ -3637,7 +3637,7 @@
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxLength": 255
|
||||
"maxLength": 1000
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
|
||||
@@ -1012,7 +1012,7 @@ definitions:
|
||||
color:
|
||||
type: string
|
||||
description:
|
||||
maxLength: 255
|
||||
maxLength: 1000
|
||||
type: string
|
||||
name:
|
||||
maxLength: 255
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
|
||||
@@ -3637,7 +3637,7 @@
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxLength": 255
|
||||
"maxLength": 1000
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
|
||||
@@ -1012,7 +1012,7 @@ definitions:
|
||||
color:
|
||||
type: string
|
||||
description:
|
||||
maxLength: 255
|
||||
maxLength: 1000
|
||||
type: string
|
||||
name:
|
||||
maxLength: 255
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -648,7 +648,7 @@ export interface ItemUpdate {
|
||||
|
||||
export interface LabelCreate {
|
||||
color: string;
|
||||
/** @maxLength 255 */
|
||||
/** @maxLength 1000 */
|
||||
description: string;
|
||||
/**
|
||||
* @minLength 1
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user