mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-21 21:33:02 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd604f5867 | ||
|
|
b6b939db40 | ||
|
|
d3f56b1b95 | ||
|
|
a258e1d2bc | ||
|
|
5ca671a4ab | ||
|
|
ccdab8bac1 |
@@ -31,9 +31,6 @@ builds:
|
||||
{{- else if eq .Arch "arm" }}nodynamic
|
||||
{{- else if eq .Arch "386" }}nodynamic
|
||||
{{ end }}
|
||||
sboms:
|
||||
- disable: false
|
||||
artifacts: any
|
||||
|
||||
signs:
|
||||
- cmd: cosign
|
||||
|
||||
@@ -257,15 +257,31 @@ func (r *AttachmentRepo) Create(ctx context.Context, itemID uuid.UUID, doc ItemC
|
||||
}
|
||||
|
||||
func (r *AttachmentRepo) Get(ctx context.Context, gid uuid.UUID, id uuid.UUID) (*ent.Attachment, error) {
|
||||
return r.db.Attachment.
|
||||
Query().
|
||||
Where(
|
||||
attachment.ID(id),
|
||||
attachment.HasItemWith(item.HasGroupWith(group.ID(gid))),
|
||||
).
|
||||
WithItem().
|
||||
WithThumbnail().
|
||||
Only(ctx)
|
||||
first, err := r.db.Attachment.Query().Where(attachment.ID(id)).Only(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if first.Type == attachment.TypeThumbnail {
|
||||
// If the attachment is a thumbnail, get the parent attachment and check if it belongs to the specified group
|
||||
return r.db.Attachment.
|
||||
Query().
|
||||
Where(attachment.ID(id),
|
||||
attachment.HasThumbnailWith(attachment.HasItemWith(item.HasGroupWith(group.ID(gid)))),
|
||||
).
|
||||
WithItem().
|
||||
WithThumbnail().
|
||||
Only(ctx)
|
||||
} else {
|
||||
// For regular attachments, check if the attachment's item belongs to the specified group
|
||||
return r.db.Attachment.
|
||||
Query().
|
||||
Where(attachment.ID(id),
|
||||
attachment.HasItemWith(item.HasGroupWith(group.ID(gid))),
|
||||
).
|
||||
WithItem().
|
||||
WithThumbnail().
|
||||
Only(ctx)
|
||||
}
|
||||
}
|
||||
|
||||
func (r *AttachmentRepo) Update(ctx context.Context, gid uuid.UUID, id uuid.UUID, data *ItemAttachmentUpdate) (*ent.Attachment, error) {
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
"follow_dev": "Sledovat vývojáře",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/v'{ version }\" target=\"_blank\"> Verze: { version } Sestavení: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Verze: { version } Sestavení: { build } '</a>'"
|
||||
},
|
||||
"github": "GitHub projekt",
|
||||
"insured": "Pojištěné",
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
"follow_dev": "Dem Entwickler folgen",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"> Version: { version } Erstellt: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Version: { version } Erstellt: { build } '</a>'"
|
||||
},
|
||||
"github": "GitHub-Projekt",
|
||||
"insured": "Versichert",
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
"follow_dev": "Follow the Developer",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\">' Version: { version } Build: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Version: { version } Build: { build } '</a>'"
|
||||
},
|
||||
"github": "GitHub Project",
|
||||
"insured": "Insured",
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"follow_dev": "Seguir al Desarrollador",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"> Versión: { version } Compilación: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Versión: { version } Compilación: { build } '</a>'"
|
||||
},
|
||||
"github": "Proyecto GitHub",
|
||||
"insured": "Asegurado",
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"follow_dev": "Seuraa kehittäjää",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"> Versio: { version } Rakenna: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Versio: { version } Rakenna: { build } '</a>'"
|
||||
},
|
||||
"github": "GitHub Projekti",
|
||||
"insured": "Vakuuttaa",
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"follow_dev": "Suivre le développeur",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"> Version : { version } Commit : { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Version : { version } Commit : { build } '</a>'"
|
||||
},
|
||||
"github": "Projet GitHub",
|
||||
"insured": "Assuré",
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"follow_dev": "Kövesd a fejlesztőt",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"> Verzió: { version } Build: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Verzió: { version } Build: { build } '</a>'"
|
||||
},
|
||||
"github": "Github projekt",
|
||||
"insured": "Biztosítva",
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"follow_dev": "Segui lo Sviluppatore",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"> Versione: { version } Build: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Versione: { version } Build: { build } '</a>'"
|
||||
},
|
||||
"github": "Progetto GitHub",
|
||||
"insured": "Assicurato",
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
"follow_dev": "Følg utvikleren",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"> Versjon: { version } Bygg: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Versjon: { version } Bygg: { build } '</a>'"
|
||||
},
|
||||
"github": "GitHub-prosjekt",
|
||||
"insured": "Forsikret",
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
"follow_dev": "Volg de ontwikkelaar",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/v'{ version }\" target=\"_blank\"> Version: { version } Build: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Version: { version } Build: { build } '</a>'"
|
||||
},
|
||||
"github": "GitHub Project",
|
||||
"insured": "Verzekerd",
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"follow_dev": "Śledź dewelopera",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"> Wersja: { version } Build: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"'>' Wersja: { version } Build: { build } '</a>'"
|
||||
},
|
||||
"github": "Projekt na GitHubie",
|
||||
"insured": "Ubezpieczony",
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"follow_dev": "Seguir o desenvolvedor",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"> Versão: { version } Compilação: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Versão: { version } Compilação: { build } '</a>'"
|
||||
},
|
||||
"github": "Projeto GitHub",
|
||||
"insured": "Segurado",
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"follow_dev": "Siga o Desenvolvedor",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\">' Versão: { version } Compilação: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Versão: { version } Compilação: { build } '</a>'"
|
||||
},
|
||||
"github": "Projeto GitHub",
|
||||
"insured": "Com seguro",
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
"follow_dev": "Sledujte vývojára",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/v'{ version }\" target=\"_blank\"> Verzia: { version } Zostavenie: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Verzia: { version } Zostavenie: { build } '</a>'"
|
||||
},
|
||||
"github": "Projekt GitHub",
|
||||
"insured": "Poistené",
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
"follow_dev": "Sledi razvijjalcu",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"> Verzija: { version } Gradnja: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Verzija: { version } Gradnja: { build } '</a>'"
|
||||
},
|
||||
"github": "GitHub projekt",
|
||||
"insured": "Zavarovano",
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"follow_dev": "Följ utvecklaren",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"> Version: { version } Build: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Version: { version } Build: { build } '</a>'"
|
||||
},
|
||||
"github": "GitHub-projekt",
|
||||
"insured": "Försäkrad",
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"follow_dev": "ติดตามผู้พัฒนา",
|
||||
"footer": {
|
||||
"api_link": "'<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"> Version: { version } Build: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Version: { version } Build: { build } '</a>'"
|
||||
},
|
||||
"github": "GitHub Project",
|
||||
"insured": "ประกัน",
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"follow_dev": "Geliştiriciyi takip edin",
|
||||
"footer": {
|
||||
"api_link": "<a href=\"https://homebox.software/en/api/\" target=\"_blank\">''API''</a>",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"> Sürüm: { version } Yapı: { build }'</a>"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Sürüm: { version } Yapı: { build }'</a>"
|
||||
},
|
||||
"github": "GitHub projesi",
|
||||
"insured": "Sigortalı",
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"follow_dev": "Підписатись на розробника",
|
||||
"footer": {
|
||||
"api_link": "<a href=\"https://homebox.software/en/api/\" target=\"_blank\">'API'</a>'",
|
||||
"version_link": "'<a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/'{ version }\" target=\"_blank\"> Версія: { version } Build: { build } '</a>'"
|
||||
"version_link": "'<'a href=\"https://github.com/sysadminsmedia/homebox/releases/tag/{ version }\" target=\"_blank\"'>' Версія: { version } Build: { build } '</a>'"
|
||||
},
|
||||
"github": "GitHub проекту",
|
||||
"insured": "Застрахований",
|
||||
|
||||
Reference in New Issue
Block a user