203 Commits

Author SHA1 Message Date
Tonya
e4d8bb2ada chore: use example.com for example
better safe than sorry
2025-12-20 21:50:44 +00:00
Katos
a21b3257d4 Update max file upload environment variable 2025-12-20 15:57:14 +00:00
Sarun Nuntaviriyakul
2d1d3d927b Update log level options in configuration documentation (#1127) 2025-12-12 13:33:12 -05:00
Nelson Cabete
14b0d51894 Update docs to reference disable_https instead of disableSsl on Storage Configuration page (#1124)
Co-authored-by: Nelson Cabete <me@ncabete.com>
2025-12-09 20:56:05 -05:00
Robert Eggl
1088972ff0 docs: add missing barcode spider env var (#1114) 2025-12-08 20:17:45 -05:00
Matthew Kilgore
05a2700718 Merge remote-tracking branch 'origin/main' 2025-12-06 18:14:12 -05:00
Matthew Kilgore
06c11cdcd5 Ensure options are up to date in docs 2025-12-06 18:14:06 -05:00
Logan Miller
cc66330a74 feat: Add item templates feature (#435) (#1099)
* feat: Add item templates feature (#435)

   Add ability to create and manage item templates for quick item creation.
   Templates store default values and custom fields that can be applied
   when creating new items.

   Backend changes:
   - New ItemTemplate and TemplateField Ent schemas
   - Template CRUD API endpoints
   - Create item from template endpoint

   Frontend changes:
   - Templates management page with create/edit/delete
   - Template selector in item creation modal
   - 'Use as Template' action on item detail page
   - Templates link in navigation menu

* refactor: Improve template item creation with a single query

- Add `CreateFromTemplate` method to ItemsRepository that creates items with all template data (including custom fields) in a single atomic transaction, replacing the previous two-phase create-then-update pattern
- Fix `GetOne` to require group ID parameter so templates can only be accessed by users in the owning group (security fix)
- Simplify `HandleItemTemplatesCreateItem` handler using the new transactional method

* Refactor item template types and formatting

Updated type annotations in CreateModal.vue to use specific ItemTemplate types instead of 'any'. Improved code formatting for template fields and manufacturer display. Also refactored warranty field logic in item details page for better readability. This resolves the linter issues as well that the bot in github keeps nagging at.

* Add 'id' property to template fields

Introduces an 'id' property to each field object in CreateModal.vue and item details page to support unique identification of fields. This change prepares the codebase for future enhancements that may require field-level identification.

* Removed redundant SQL migrations.

Removed redundant SQL migrations per @tankerkiller125's findings.

* Updates to PR #1099.

Regarding pull #1099. Fixed an issue causing some conflict with GUIDs and old rows in the migration files.

* Add new fields and location edge to ItemTemplate

Addresses recommendations from @tonyaellie.

* Relocated add template button
* Added more default fields to the template
* Added translation of all strings (think so?)
* Make oval buttons round
* Added duplicate button to the template (this required a rewrite of the migration files, I made sure only 1 exists per DB type)
* Added a Save as template button to a item detail view (this creates a template with all the current data of that item)
* Changed all occurrences of space to gap and flex where applicable.
* Made template selection persistent after item created.
* Collapsible template info on creation view.

* Updates to translation and fix for labels/locations

I also added a test in here because I keep missing small function tests. That should prevent that from happening again.

* Linted

* Bring up to date with main, fix some lint/type check issues

* In theory fix playwright tests

* Fix defaults being unable to be nullable/empty (and thus limiting flexibility)

* Last few fixes I think

* Forgot to fix the golang tests

---------

Co-authored-by: Matthew Kilgore <matthew@kilgore.dev>
2025-12-06 16:21:43 -05:00
Jeff Rescignano
f36756d98e Add support for SSO / OpenID Connect (OIDC) (#996)
* ent re-generation

* add oidc integration

* document oidc integration

* go fmt

* address backend linter findings

* run prettier on index.vue

* State cookie domain can mismatch when Hostname override is used (breaks CSRF check). Add SameSite.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Delete state cookie with matching domain and MaxAge; add SameSite.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Fix endpoint path in comments and error to include /api/v1.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Also use request context when verifying the ID token.

* Do not return raw auth errors to clients (user-enumeration risk).

* consistently set cookie the same way across function

* remove baseURL after declaration

* only enable OIDC routes if OIDC is enabled

* swagger doc for failure

* Only block when provider=local; move the check after parsing provider

* fix extended session comment

* reduce pii logging

* futher reduce pii logging

* remove unused DiscoveryDocument

* remove unused offline_access from default oidc scopes

* remove offline access from AuthCodeURL

* support host from X-Forwarded-Host

* set sane default claim names if unset

* error strings should not be capitalized

* Revert "run prettier on index.vue"

This reverts commit aa22330a23.

* Add timeout to provider discovery

* Split scopes robustly

* refactor hostname calculation

* address frontend prettier findings

* add property oidc on type APISummary

* LoginOIDC: Normalize inputs, only create if not found

* add oidc email verification

* oidc handleCallback: clear state cookie before each return

* add support for oidc nonce parameter

* Harden first-login race: handle concurrent creates gracefully and fix log key.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* support email verified claim as bool or string

* fail fast on empty email

* PKCE verifier

* fix: add timing delay to attachment test to resolve CI race condition

The attachment test was failing intermittently in CI due to a race condition
between attachment creation and retrieval. Adding a small 100ms delay after
attachment creation ensures the file system and database operations complete
before the test attempts to verify the attachment exists.

* Revert "fix: add timing delay to attachment test to resolve CI race condition"

This reverts commit 4aa8b2a0d829753e8d2dd1ba76f4b1e04e28c45e.

* oidc error state, use ref

* rename oidc.force to oidc.authRedirect

* remove hardcoded oidc error timeout

* feat: sub/iss based identity matching and userinfo endpoint collection

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Matthew Kilgore <matthew@kilgore.dev>
2025-12-06 10:16:05 -05:00
rienkim
ef52009f57 Feat/Added label maker custom font (#1038)
* Add label maker font config

* Add document for label maker font config

* Add test for custom font

* Fix custom font setup documentation

- Fallback font is gofont which don't support CJK characters

* Fix golangci-lint error

* Update custom-font-setup.md

* Fix typo
2025-10-08 14:49:22 -04:00
Matthew Kilgore
bf845ae0f7 Update bounty page 2025-09-29 19:21:05 -04:00
Matthew Kilgore
1f746efe27 Hide try it again (other issues) 2025-09-26 21:58:17 -04:00
Matthew Kilgore
d57bf8834b Fix CSP header 2025-09-26 21:45:57 -04:00
Matthew Kilgore
cb2c58c3f4 Merge remote-tracking branch 'origin/main' 2025-09-26 21:34:45 -04:00
Matthew Kilgore
7b3cf0453e Support TryIt Function in API Docs 2025-09-26 21:34:34 -04:00
Guy Taggar
33ec0c4aff Fix typo (#1019)
* Fix typo

* Change to plural
2025-09-24 09:48:44 -04:00
Tonya
6cd9e2779f Use Tanstack table for Selectable Table, quick actions (#998)
* feat: implement example of data table

* feat: load item data into table

* chore: begin switching dialogs

* feat: implement old dialog for controlling headers and page size

* feat: get table into relatively usable state

* feat: enhance dropdown actions for multi-selection and CSV download

* feat: enhance table cell and dropdown button styles for better usability

* feat: json download for table

* feat: add expanded row component for item details in data table

* chore: add translation support

* feat: restore table on home page

* fix: oops need ids

* feat: move card view to use tanstack to allow for pagination

* feat: switch the items search to use ItemViewSelectable

* fix: update pagination handling and improve button click logic

* feat: improve selectable table

* feat: add indeterminate to checkbox

* feat: overhaul maintenance dialog to use new system and add maintenance options to table

* feat: add label ids and location id to item patch api

* feat: change location and labels in table view

* feat: add quick actions preference and enable toggle in table settings

* fix: lint

* fix: remove sized 1 pages

* fix: attempt to fix type error

* fix: various issues

* fix: remove

* fix: refactor item fetching logic to use useAsyncData for improved reactivity and improve use confirm

* fix: sort backend issues

* fix: enhance CSV export functionality by escaping fields to prevent formula injection

* fix: put aria sort on th not button

* chore: update api types
2025-09-24 02:37:38 +01:00
Matt
609b7a606b Generate OpenAPI 3 schemas from the swagger 2.0 generation (#1017)
* Generate OpenAPI 3 schemas from the swagger 2.0 generation

* Update API description URL in index.md
2025-09-23 12:14:37 -04:00
rapidcow
b8f7ce7eb2 doc fix: match configure option names with help message (#959)
* doc fix: match configure option names with help message (1/2)

This is a first commit in an attempt to reconcile the differences
between the /en/configure/index doc page and the automatically
generated help message.  This addresses typos including, though not
limited to, Discussion #954, titled "[doc] apparent typo in the
documentation of GitHub release check option".

This commit fixes the CLI help command, preserving the original
order, while manually matching the option names with the help
message generated by the backend api executable.

Options are only checked for spelling correctness and existence.
In particular, the following are removed because i could not
find them in the help message.

   * --swagger-host/$HBOX_SWAGGER_HOST <string> (default: localhost:7745)
   * --swagger-scheme/$HBOX_SWAGGER_SCHEME <string> (default: http)

The following default values have also been updated:

   * --storage-conn-string/$HBOX_STORAGE_CONN_STRING
      (a slash is added to the URI path)
   * --database-sqlite-path/$HBOX_DATABASE_SQLITE_PATH
      (a query param '&_time_format=sqlite' is added)
   * --database-ssl-mode/$HBOX_DATABASE_SSL_MODE
      (default 'prefer' added)

* doc fix: match configure option names with help message (2/2)

This is a second commit in an attempt to reconcile the differences
between the /en/configure/index doc page and the automatically
generated help message.  See the previous commit for details.

This commit fixes the Markdown table.

Options are only checked for spelling correctness and existence.
The following rows are deleted in particular:

   * HBOX_SWAGGER_HOST
   * HBOX_SWAGGER_SCHEME

The following default values are updated:

   * HBOX_STORAGE_CONN_STRING
      (a slash is added to the URI path)
   * HBOX_DATABASE_SQLITE_PATH
      (a query param '&_time_format=sqlite' is added)
   * HBOX_DATABASE_SSL_MODE
      (default 'prefer' added)
2025-08-23 21:17:26 -04:00
Tonya
788d0b1c7e feat: improved duplicate (#927)
* feat: improved duplicate

* feat: enhance item duplication process with transaction handling and error logging for attachments and fields

* feat: add error logging during transaction rollback in item duplication process for better debugging

* feat: don't try and rollback is the commit succeeded

* feat: add customizable duplication options for items, including prefix and field copying settings in API and UI

* fix: simplify duplication checks for custom fields, attachments, and maintenance entries in ItemsRepository duplication method

* refactor: import DuplicateSettings type from composables and sort import issues
2025-08-23 16:17:15 +01:00
Michael Manganiello
8af1e8fcba fix: Allow up to 1000 characters for label description (#948)
The database schema already supports 1,000 characters for label
description, so this seems just like an oversight.
2025-08-20 15:29:49 -04:00
Balki
e82f5084d4 Fix Windows build and re-apply unix socket support (#906)
* Reapply "Support listening on unix sockets and systemd sockets (#878)"

This reverts commit 2f51ba419b.

* Fix windows build

Upgrade anyhttp to v0.5.2
2025-07-20 09:51:31 -04:00
Crumb Owl
4a4bf9a175 ProductBarcode: rename API call from getproductfromean to products/search-from-barcode 2025-07-19 23:06:43 +02:00
Crumb Owl
a3c13a8a74 ProductBarcode: return an array of BarcodeProduct instead of one 2025-07-19 23:06:38 +02:00
Crumb Owl
6dbb243ba5 ProductBarcode: return more fields from DB (brand, model...)
- backend: change data structure returned to frontend
2025-07-19 22:51:48 +02:00
Crumb Owl
0ed69b75a1 ProductBarcode: add first backend API implementation 2025-07-19 22:51:48 +02:00
Matthew Kilgore
2f51ba419b Revert "Support listening on unix sockets and systemd sockets (#878)"
This reverts commit 850ed476
2025-07-12 16:33:29 -04:00
Matt
23cecfb2a5 Refactor main file, add support for postgres certificate authentication (#897)
* Refactor main file, add support for postgres certificate authentication

* Fix potential issues.

* Remove legacy linting ignore comment

* Minor cleanup, documentation update
2025-07-12 16:11:50 -04:00
Matthew Kilgore
f4c8dd5450 Prep docs for Cloudflare worker migration (Pages is apparently deprecated/no longer recommended) 2025-07-12 14:56:05 -04:00
Balki
850ed476d4 Support listening on unix sockets and systemd sockets (#878) 2025-07-12 09:58:16 -04:00
Matt
4861a8537f More image type support for thumbnails (#814) 2025-06-26 10:19:34 -04:00
Tonya
ef39549c37 Custom Colored Labels (#801)
* feat: custom coloured labels

* chore: lint

* feat: add ColorSelector component for improved color selection in labels and integrate it into CreateModal and Selector components

* style: lint

* fix: update ColorSelector and Selector components to use empty string instead of null for default color values for types
2025-06-23 15:52:32 +01:00
Matt
989100d299 Thumbnails (#797)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: tonya <tonya@tokia.dev>
2025-06-22 21:32:48 -04:00
Matt
e1b232e0d1 Abstract Attachment Storage (#777)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-19 10:26:12 -04:00
Tonya
16bcffac45 Remove shamefully hoist (#660)
* feat: remove shamefully hoist

* chore: remove .npmrc
2025-05-04 13:11:00 -04:00
Matt Kilgore
606a92b5d5 Remove documents table (#618)
* Remove documents table (WIP)

* Further cleanup of documents table

* This should clean up the errors, but actual attachment handling still needs added.

* Full generation to update the JS side of things too

* Further fixes

* Fix cyclic dependency issue

* In theory the API side works now

* Fix go linting issues

* Fix frontend issues

* Way closer, but has a foreign key constrant issue

* UI actually works now

* Fix deduplication feature not working right

* Upgrade to `golangci-lint` v2 file

* Add ability to set primary during attachment creation

* Update swagger with new primary attachment during creation stuff

* Files are actually saved now, but there's still a bug

* Fix critical issue whith how deletions were working

* Fix the byte copy issue

* Hopefully everything is fixed now

* Fix golangci-lint config and lint files

* Fix lint issue

* Fix a few more tests

* Fix lint issues again

* More minor test fixes

* Update backend/internal/core/services/service_items_attachments.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix migration (I think)

* Fixed postgres migration

* Change some migration options to work better

* Some more little things that I tried

* Fix merge go.mod

* Fix migrations

* Little lint thing

* Fix AttachmentsList.vue with updated API

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-03 10:15:54 -04:00
EdWorth120
60b2ffd023 Add a quantity field to the item create modal form. (#615)
* Add a quantity field to the item create modal form.

* Fix prettier code format complaint.

* Update en.json allowing the label of the field to be translated.

* Including changes generated by swag and typescript-types tasks.

* Fixed tests, item duplication and lint errors.

* Fix linter issues again and an error introduced in 912e5b2

* Fixed a test that creates an item through the go:coverage task
2025-04-30 19:42:24 -04:00
Matt Kilgore
92bb564dfa Update config.mts 2025-04-28 08:50:20 -04:00
Matt Kilgore
5943e2c7e3 Add Lemmy 2025-04-28 08:48:39 -04:00
Tonya
9afd20c513 Sort themes and remove daisyui (#643)
* feat: sort themes and remove daisyui

* docs: update docs to reflect daisyui being removed

* feat: remove specific colours for better theme compatibility
2025-04-27 09:01:27 +00:00
Matt Kilgore
17a4be85d8 Fix required go version for dev 2025-04-24 21:47:25 -04:00
Tonya
9ff4b32db0 Switch layouts to use shadcn (#507)
* feat: begin switching sonner, currently this breaks all alerts

* feat: switch to using new sonner and fix class names

* feat: add Shortcut component for improved keyboard shortcuts display in default layout

* feat: rewrite quick menu modal in shadcn

* feat: update QuickMenu modal placeholders and localize no results message in default layout

* feat: begin switching modals in layout to use shadcn dialog, needs bug fixing

* feat: implement DialogProvider for consistent dialog management across components

* fix: types

* feat: begin adding shadcn label selector (wip)

* feat: shadcnify textarea

* feat: begin adding location selector

* feat: add hotkey support for opening create modals in dialog provider components

* fix: update click event on NuxtLink and reorder sidebar menu item IDs for consistency

* feat: unify shortcut text across create modals and sort issue with text centring

* feat: prevent dialog from opening when a dialog alert is open

* fix: prevent potential out of bounds error

* feat: enhance button group UI in create modals for better layout and introduce new item photo label in the form

* fix: search on label selector

* chore: lint

* fix: oops

* feat: make selector usable

* feat: add actual data to label selector

* feat: label selector kinda works

* fix: add legacy selector for edit page

* fix: enable camera capture in image upload for CreateModal component

* fix: z levels for sidebar mobile

* fix: gap between inputs

* feat: update radix-vue, custom search function for location selector

* feat: add fuzzysort (can always remove it and go to lunr if we want to)

* feat: limit label name to 50 characters in create modal and selector, helps with issues with ui not working with larger labels, as it is only enforced on the frontend could be easily bypassed but thats a them problem

* feat: add colours to toast

* chore: lint

* feat: abstract the dialog for creation modals

* feat: add drawer component and responsive dialog for create modals

* feat: enhance photo preview in CreateModal

* fix: remember state of sidebar

* feat: add ui functionality for changing primary image

* feat: use button for file upload

* style: lint

* fix: dont clone asset id

* fix: using create and add label breaks selector

* chore: oops remove logging

* chore: lint

* fix: cut length of label dramatically to ensure maximal compatibility, not sure if too much

* fix: more limiting of label length

* feat: update reka-ui (prev radix-vue)

* chore: cleanup dialog provider and siebar provider a bit

* fix: improve accessibility

* fix: docs for shadcn error

* fix: hack to prevent issues with lots of toasts in quick succession

* feat: cleanup toast file and lint

* feat: improvements to dialog scroll and disable the ability to set default photo for now

* feat: add tooltips for photo buttons

* chore: substring to length check

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-11 11:02:49 +01:00
tonyaellie
964d3264cc docs: add missing env var change 2025-04-10 13:51:59 +00:00
Tonya
4c0af18dcb feat: migration guide for hay-kot version (#620)
* feat: migration guide for hay-kot version

* Update docs/en/quick-start.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docs: enhance migration guide with clearer steps and emphasize backup importance before migration process

* docs: add 'Migration Guide' link to menu and change from upgrade to migration guide in quick start

* docs: better text

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Matt Kilgore <tankerkiller125@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-09 10:13:23 +00:00
Matthew Kilgore
e716fe54e1 Merge remote-tracking branch 'origin/main' 2025-03-22 21:45:08 -04:00
Matthew Kilgore
64b4173d1d fix: borked doc param 2025-03-22 21:45:01 -04:00
Matt Kilgore
dcf16ba4c9 Update index.md 2025-03-22 14:09:50 -04:00
Matthew Kilgore
c00edce158 chore: Use our own site instead of jsDelivr 2025-03-22 14:04:08 -04:00
Matt Kilgore
71d9b6605b Update api.md 2025-03-22 13:47:56 -04:00
Matt Kilgore
8e9571c96a Update api.md 2025-03-22 13:31:09 -04:00