mirror of
https://github.com/hay-kot/homebox.git
synced 2025-06-02 18:42:29 +00:00
feat: QR Codes (#226)
* code gen updates * qrcode support * remove opacity on toast * update item view to use tab-like pages * adjust view for cards * fix old API calls for ioutils * move embed * extract QR code * add docs for QR codes * add QR code
This commit is contained in:
parent
f532b39c46
commit
c19fe94c08
88 changed files with 3151 additions and 6454 deletions
|
@ -25,6 +25,7 @@ import (
|
|||
"github.com/hay-kot/homebox/backend/internal/data/ent/user"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -364,11 +365,26 @@ func (m *AttachmentMutation) Where(ps ...predicate.Attachment) {
|
|||
m.predicates = append(m.predicates, ps...)
|
||||
}
|
||||
|
||||
// WhereP appends storage-level predicates to the AttachmentMutation builder. Using this method,
|
||||
// users can use type-assertion to append predicates that do not depend on any generated package.
|
||||
func (m *AttachmentMutation) WhereP(ps ...func(*sql.Selector)) {
|
||||
p := make([]predicate.Attachment, len(ps))
|
||||
for i := range ps {
|
||||
p[i] = ps[i]
|
||||
}
|
||||
m.Where(p...)
|
||||
}
|
||||
|
||||
// Op returns the operation name.
|
||||
func (m *AttachmentMutation) Op() Op {
|
||||
return m.op
|
||||
}
|
||||
|
||||
// SetOp allows setting the mutation operation.
|
||||
func (m *AttachmentMutation) SetOp(op Op) {
|
||||
m.op = op
|
||||
}
|
||||
|
||||
// Type returns the node type of this mutation (Attachment).
|
||||
func (m *AttachmentMutation) Type() string {
|
||||
return m.typ
|
||||
|
@ -794,11 +810,26 @@ func (m *AuthRolesMutation) Where(ps ...predicate.AuthRoles) {
|
|||
m.predicates = append(m.predicates, ps...)
|
||||
}
|
||||
|
||||
// WhereP appends storage-level predicates to the AuthRolesMutation builder. Using this method,
|
||||
// users can use type-assertion to append predicates that do not depend on any generated package.
|
||||
func (m *AuthRolesMutation) WhereP(ps ...func(*sql.Selector)) {
|
||||
p := make([]predicate.AuthRoles, len(ps))
|
||||
for i := range ps {
|
||||
p[i] = ps[i]
|
||||
}
|
||||
m.Where(p...)
|
||||
}
|
||||
|
||||
// Op returns the operation name.
|
||||
func (m *AuthRolesMutation) Op() Op {
|
||||
return m.op
|
||||
}
|
||||
|
||||
// SetOp allows setting the mutation operation.
|
||||
func (m *AuthRolesMutation) SetOp(op Op) {
|
||||
m.op = op
|
||||
}
|
||||
|
||||
// Type returns the node type of this mutation (AuthRoles).
|
||||
func (m *AuthRolesMutation) Type() string {
|
||||
return m.typ
|
||||
|
@ -1330,11 +1361,26 @@ func (m *AuthTokensMutation) Where(ps ...predicate.AuthTokens) {
|
|||
m.predicates = append(m.predicates, ps...)
|
||||
}
|
||||
|
||||
// WhereP appends storage-level predicates to the AuthTokensMutation builder. Using this method,
|
||||
// users can use type-assertion to append predicates that do not depend on any generated package.
|
||||
func (m *AuthTokensMutation) WhereP(ps ...func(*sql.Selector)) {
|
||||
p := make([]predicate.AuthTokens, len(ps))
|
||||
for i := range ps {
|
||||
p[i] = ps[i]
|
||||
}
|
||||
m.Where(p...)
|
||||
}
|
||||
|
||||
// Op returns the operation name.
|
||||
func (m *AuthTokensMutation) Op() Op {
|
||||
return m.op
|
||||
}
|
||||
|
||||
// SetOp allows setting the mutation operation.
|
||||
func (m *AuthTokensMutation) SetOp(op Op) {
|
||||
m.op = op
|
||||
}
|
||||
|
||||
// Type returns the node type of this mutation (AuthTokens).
|
||||
func (m *AuthTokensMutation) Type() string {
|
||||
return m.typ
|
||||
|
@ -1951,11 +1997,26 @@ func (m *DocumentMutation) Where(ps ...predicate.Document) {
|
|||
m.predicates = append(m.predicates, ps...)
|
||||
}
|
||||
|
||||
// WhereP appends storage-level predicates to the DocumentMutation builder. Using this method,
|
||||
// users can use type-assertion to append predicates that do not depend on any generated package.
|
||||
func (m *DocumentMutation) WhereP(ps ...func(*sql.Selector)) {
|
||||
p := make([]predicate.Document, len(ps))
|
||||
for i := range ps {
|
||||
p[i] = ps[i]
|
||||
}
|
||||
m.Where(p...)
|
||||
}
|
||||
|
||||
// Op returns the operation name.
|
||||
func (m *DocumentMutation) Op() Op {
|
||||
return m.op
|
||||
}
|
||||
|
||||
// SetOp allows setting the mutation operation.
|
||||
func (m *DocumentMutation) SetOp(op Op) {
|
||||
m.op = op
|
||||
}
|
||||
|
||||
// Type returns the node type of this mutation (Document).
|
||||
func (m *DocumentMutation) Type() string {
|
||||
return m.typ
|
||||
|
@ -2826,11 +2887,26 @@ func (m *GroupMutation) Where(ps ...predicate.Group) {
|
|||
m.predicates = append(m.predicates, ps...)
|
||||
}
|
||||
|
||||
// WhereP appends storage-level predicates to the GroupMutation builder. Using this method,
|
||||
// users can use type-assertion to append predicates that do not depend on any generated package.
|
||||
func (m *GroupMutation) WhereP(ps ...func(*sql.Selector)) {
|
||||
p := make([]predicate.Group, len(ps))
|
||||
for i := range ps {
|
||||
p[i] = ps[i]
|
||||
}
|
||||
m.Where(p...)
|
||||
}
|
||||
|
||||
// Op returns the operation name.
|
||||
func (m *GroupMutation) Op() Op {
|
||||
return m.op
|
||||
}
|
||||
|
||||
// SetOp allows setting the mutation operation.
|
||||
func (m *GroupMutation) SetOp(op Op) {
|
||||
m.op = op
|
||||
}
|
||||
|
||||
// Type returns the node type of this mutation (Group).
|
||||
func (m *GroupMutation) Type() string {
|
||||
return m.typ
|
||||
|
@ -3570,11 +3646,26 @@ func (m *GroupInvitationTokenMutation) Where(ps ...predicate.GroupInvitationToke
|
|||
m.predicates = append(m.predicates, ps...)
|
||||
}
|
||||
|
||||
// WhereP appends storage-level predicates to the GroupInvitationTokenMutation builder. Using this method,
|
||||
// users can use type-assertion to append predicates that do not depend on any generated package.
|
||||
func (m *GroupInvitationTokenMutation) WhereP(ps ...func(*sql.Selector)) {
|
||||
p := make([]predicate.GroupInvitationToken, len(ps))
|
||||
for i := range ps {
|
||||
p[i] = ps[i]
|
||||
}
|
||||
m.Where(p...)
|
||||
}
|
||||
|
||||
// Op returns the operation name.
|
||||
func (m *GroupInvitationTokenMutation) Op() Op {
|
||||
return m.op
|
||||
}
|
||||
|
||||
// SetOp allows setting the mutation operation.
|
||||
func (m *GroupInvitationTokenMutation) SetOp(op Op) {
|
||||
m.op = op
|
||||
}
|
||||
|
||||
// Type returns the node type of this mutation (GroupInvitationToken).
|
||||
func (m *GroupInvitationTokenMutation) Type() string {
|
||||
return m.typ
|
||||
|
@ -5471,11 +5562,26 @@ func (m *ItemMutation) Where(ps ...predicate.Item) {
|
|||
m.predicates = append(m.predicates, ps...)
|
||||
}
|
||||
|
||||
// WhereP appends storage-level predicates to the ItemMutation builder. Using this method,
|
||||
// users can use type-assertion to append predicates that do not depend on any generated package.
|
||||
func (m *ItemMutation) WhereP(ps ...func(*sql.Selector)) {
|
||||
p := make([]predicate.Item, len(ps))
|
||||
for i := range ps {
|
||||
p[i] = ps[i]
|
||||
}
|
||||
m.Where(p...)
|
||||
}
|
||||
|
||||
// Op returns the operation name.
|
||||
func (m *ItemMutation) Op() Op {
|
||||
return m.op
|
||||
}
|
||||
|
||||
// SetOp allows setting the mutation operation.
|
||||
func (m *ItemMutation) SetOp(op Op) {
|
||||
m.op = op
|
||||
}
|
||||
|
||||
// Type returns the node type of this mutation (Item).
|
||||
func (m *ItemMutation) Type() string {
|
||||
return m.typ
|
||||
|
@ -6886,11 +6992,26 @@ func (m *ItemFieldMutation) Where(ps ...predicate.ItemField) {
|
|||
m.predicates = append(m.predicates, ps...)
|
||||
}
|
||||
|
||||
// WhereP appends storage-level predicates to the ItemFieldMutation builder. Using this method,
|
||||
// users can use type-assertion to append predicates that do not depend on any generated package.
|
||||
func (m *ItemFieldMutation) WhereP(ps ...func(*sql.Selector)) {
|
||||
p := make([]predicate.ItemField, len(ps))
|
||||
for i := range ps {
|
||||
p[i] = ps[i]
|
||||
}
|
||||
m.Where(p...)
|
||||
}
|
||||
|
||||
// Op returns the operation name.
|
||||
func (m *ItemFieldMutation) Op() Op {
|
||||
return m.op
|
||||
}
|
||||
|
||||
// SetOp allows setting the mutation operation.
|
||||
func (m *ItemFieldMutation) SetOp(op Op) {
|
||||
m.op = op
|
||||
}
|
||||
|
||||
// Type returns the node type of this mutation (ItemField).
|
||||
func (m *ItemFieldMutation) Type() string {
|
||||
return m.typ
|
||||
|
@ -7673,11 +7794,26 @@ func (m *LabelMutation) Where(ps ...predicate.Label) {
|
|||
m.predicates = append(m.predicates, ps...)
|
||||
}
|
||||
|
||||
// WhereP appends storage-level predicates to the LabelMutation builder. Using this method,
|
||||
// users can use type-assertion to append predicates that do not depend on any generated package.
|
||||
func (m *LabelMutation) WhereP(ps ...func(*sql.Selector)) {
|
||||
p := make([]predicate.Label, len(ps))
|
||||
for i := range ps {
|
||||
p[i] = ps[i]
|
||||
}
|
||||
m.Where(p...)
|
||||
}
|
||||
|
||||
// Op returns the operation name.
|
||||
func (m *LabelMutation) Op() Op {
|
||||
return m.op
|
||||
}
|
||||
|
||||
// SetOp allows setting the mutation operation.
|
||||
func (m *LabelMutation) SetOp(op Op) {
|
||||
m.op = op
|
||||
}
|
||||
|
||||
// Type returns the node type of this mutation (Label).
|
||||
func (m *LabelMutation) Type() string {
|
||||
return m.typ
|
||||
|
@ -8447,11 +8583,26 @@ func (m *LocationMutation) Where(ps ...predicate.Location) {
|
|||
m.predicates = append(m.predicates, ps...)
|
||||
}
|
||||
|
||||
// WhereP appends storage-level predicates to the LocationMutation builder. Using this method,
|
||||
// users can use type-assertion to append predicates that do not depend on any generated package.
|
||||
func (m *LocationMutation) WhereP(ps ...func(*sql.Selector)) {
|
||||
p := make([]predicate.Location, len(ps))
|
||||
for i := range ps {
|
||||
p[i] = ps[i]
|
||||
}
|
||||
m.Where(p...)
|
||||
}
|
||||
|
||||
// Op returns the operation name.
|
||||
func (m *LocationMutation) Op() Op {
|
||||
return m.op
|
||||
}
|
||||
|
||||
// SetOp allows setting the mutation operation.
|
||||
func (m *LocationMutation) SetOp(op Op) {
|
||||
m.op = op
|
||||
}
|
||||
|
||||
// Type returns the node type of this mutation (Location).
|
||||
func (m *LocationMutation) Type() string {
|
||||
return m.typ
|
||||
|
@ -9205,11 +9356,26 @@ func (m *MaintenanceEntryMutation) Where(ps ...predicate.MaintenanceEntry) {
|
|||
m.predicates = append(m.predicates, ps...)
|
||||
}
|
||||
|
||||
// WhereP appends storage-level predicates to the MaintenanceEntryMutation builder. Using this method,
|
||||
// users can use type-assertion to append predicates that do not depend on any generated package.
|
||||
func (m *MaintenanceEntryMutation) WhereP(ps ...func(*sql.Selector)) {
|
||||
p := make([]predicate.MaintenanceEntry, len(ps))
|
||||
for i := range ps {
|
||||
p[i] = ps[i]
|
||||
}
|
||||
m.Where(p...)
|
||||
}
|
||||
|
||||
// Op returns the operation name.
|
||||
func (m *MaintenanceEntryMutation) Op() Op {
|
||||
return m.op
|
||||
}
|
||||
|
||||
// SetOp allows setting the mutation operation.
|
||||
func (m *MaintenanceEntryMutation) SetOp(op Op) {
|
||||
m.op = op
|
||||
}
|
||||
|
||||
// Type returns the node type of this mutation (MaintenanceEntry).
|
||||
func (m *MaintenanceEntryMutation) Type() string {
|
||||
return m.typ
|
||||
|
@ -10081,11 +10247,26 @@ func (m *UserMutation) Where(ps ...predicate.User) {
|
|||
m.predicates = append(m.predicates, ps...)
|
||||
}
|
||||
|
||||
// WhereP appends storage-level predicates to the UserMutation builder. Using this method,
|
||||
// users can use type-assertion to append predicates that do not depend on any generated package.
|
||||
func (m *UserMutation) WhereP(ps ...func(*sql.Selector)) {
|
||||
p := make([]predicate.User, len(ps))
|
||||
for i := range ps {
|
||||
p[i] = ps[i]
|
||||
}
|
||||
m.Where(p...)
|
||||
}
|
||||
|
||||
// Op returns the operation name.
|
||||
func (m *UserMutation) Op() Op {
|
||||
return m.op
|
||||
}
|
||||
|
||||
// SetOp allows setting the mutation operation.
|
||||
func (m *UserMutation) SetOp(op Op) {
|
||||
m.op = op
|
||||
}
|
||||
|
||||
// Type returns the node type of this mutation (User).
|
||||
func (m *UserMutation) Type() string {
|
||||
return m.typ
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue