mirror of
https://github.com/hay-kot/homebox.git
synced 2025-06-04 11:32:28 +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
|
@ -15,11 +15,10 @@ type AttachmentFunc func(context.Context, *ent.AttachmentMutation) (ent.Value, e
|
|||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f AttachmentFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
mv, ok := m.(*ent.AttachmentMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.AttachmentMutation", m)
|
||||
if mv, ok := m.(*ent.AttachmentMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return f(ctx, mv)
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.AttachmentMutation", m)
|
||||
}
|
||||
|
||||
// The AuthRolesFunc type is an adapter to allow the use of ordinary
|
||||
|
@ -28,11 +27,10 @@ type AuthRolesFunc func(context.Context, *ent.AuthRolesMutation) (ent.Value, err
|
|||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f AuthRolesFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
mv, ok := m.(*ent.AuthRolesMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.AuthRolesMutation", m)
|
||||
if mv, ok := m.(*ent.AuthRolesMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return f(ctx, mv)
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.AuthRolesMutation", m)
|
||||
}
|
||||
|
||||
// The AuthTokensFunc type is an adapter to allow the use of ordinary
|
||||
|
@ -41,11 +39,10 @@ type AuthTokensFunc func(context.Context, *ent.AuthTokensMutation) (ent.Value, e
|
|||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f AuthTokensFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
mv, ok := m.(*ent.AuthTokensMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.AuthTokensMutation", m)
|
||||
if mv, ok := m.(*ent.AuthTokensMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return f(ctx, mv)
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.AuthTokensMutation", m)
|
||||
}
|
||||
|
||||
// The DocumentFunc type is an adapter to allow the use of ordinary
|
||||
|
@ -54,11 +51,10 @@ type DocumentFunc func(context.Context, *ent.DocumentMutation) (ent.Value, error
|
|||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f DocumentFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
mv, ok := m.(*ent.DocumentMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.DocumentMutation", m)
|
||||
if mv, ok := m.(*ent.DocumentMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return f(ctx, mv)
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.DocumentMutation", m)
|
||||
}
|
||||
|
||||
// The GroupFunc type is an adapter to allow the use of ordinary
|
||||
|
@ -67,11 +63,10 @@ type GroupFunc func(context.Context, *ent.GroupMutation) (ent.Value, error)
|
|||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f GroupFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
mv, ok := m.(*ent.GroupMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.GroupMutation", m)
|
||||
if mv, ok := m.(*ent.GroupMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return f(ctx, mv)
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.GroupMutation", m)
|
||||
}
|
||||
|
||||
// The GroupInvitationTokenFunc type is an adapter to allow the use of ordinary
|
||||
|
@ -80,11 +75,10 @@ type GroupInvitationTokenFunc func(context.Context, *ent.GroupInvitationTokenMut
|
|||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f GroupInvitationTokenFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
mv, ok := m.(*ent.GroupInvitationTokenMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.GroupInvitationTokenMutation", m)
|
||||
if mv, ok := m.(*ent.GroupInvitationTokenMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return f(ctx, mv)
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.GroupInvitationTokenMutation", m)
|
||||
}
|
||||
|
||||
// The ItemFunc type is an adapter to allow the use of ordinary
|
||||
|
@ -93,11 +87,10 @@ type ItemFunc func(context.Context, *ent.ItemMutation) (ent.Value, error)
|
|||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f ItemFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
mv, ok := m.(*ent.ItemMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ItemMutation", m)
|
||||
if mv, ok := m.(*ent.ItemMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return f(ctx, mv)
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ItemMutation", m)
|
||||
}
|
||||
|
||||
// The ItemFieldFunc type is an adapter to allow the use of ordinary
|
||||
|
@ -106,11 +99,10 @@ type ItemFieldFunc func(context.Context, *ent.ItemFieldMutation) (ent.Value, err
|
|||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f ItemFieldFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
mv, ok := m.(*ent.ItemFieldMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ItemFieldMutation", m)
|
||||
if mv, ok := m.(*ent.ItemFieldMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return f(ctx, mv)
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ItemFieldMutation", m)
|
||||
}
|
||||
|
||||
// The LabelFunc type is an adapter to allow the use of ordinary
|
||||
|
@ -119,11 +111,10 @@ type LabelFunc func(context.Context, *ent.LabelMutation) (ent.Value, error)
|
|||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f LabelFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
mv, ok := m.(*ent.LabelMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.LabelMutation", m)
|
||||
if mv, ok := m.(*ent.LabelMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return f(ctx, mv)
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.LabelMutation", m)
|
||||
}
|
||||
|
||||
// The LocationFunc type is an adapter to allow the use of ordinary
|
||||
|
@ -132,11 +123,10 @@ type LocationFunc func(context.Context, *ent.LocationMutation) (ent.Value, error
|
|||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f LocationFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
mv, ok := m.(*ent.LocationMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.LocationMutation", m)
|
||||
if mv, ok := m.(*ent.LocationMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return f(ctx, mv)
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.LocationMutation", m)
|
||||
}
|
||||
|
||||
// The MaintenanceEntryFunc type is an adapter to allow the use of ordinary
|
||||
|
@ -145,11 +135,10 @@ type MaintenanceEntryFunc func(context.Context, *ent.MaintenanceEntryMutation) (
|
|||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f MaintenanceEntryFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
mv, ok := m.(*ent.MaintenanceEntryMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.MaintenanceEntryMutation", m)
|
||||
if mv, ok := m.(*ent.MaintenanceEntryMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return f(ctx, mv)
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.MaintenanceEntryMutation", m)
|
||||
}
|
||||
|
||||
// The UserFunc type is an adapter to allow the use of ordinary
|
||||
|
@ -158,11 +147,10 @@ type UserFunc func(context.Context, *ent.UserMutation) (ent.Value, error)
|
|||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f UserFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
mv, ok := m.(*ent.UserMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.UserMutation", m)
|
||||
if mv, ok := m.(*ent.UserMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return f(ctx, mv)
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.UserMutation", m)
|
||||
}
|
||||
|
||||
// Condition is a hook condition function.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue