diff --git a/.env.sample b/.env.sample index fb52132..0bfc3f0 100644 --- a/.env.sample +++ b/.env.sample @@ -110,12 +110,20 @@ # Optional: Hide the 'Problems' entry from the menu. Does not disable the route. # Default: false # Legacy name: BK_HIDE_MISSING_PARTS -# BK_HIDE_PROBLEMS_PARTS=true +# BK_HIDE_ALL_PROBLEMS_PARTS=true # Optional: Hide the 'Instructions' entry in a Set card # Default: false # BK_HIDE_SET_INSTRUCTIONS=true +# Optional: Hide the 'Damaged' column from the parts table. +# Default: false +# BK_HIDE_TABLE_DAMAGED_PARTS=true + +# Optional: Hide the 'Missing' column from the parts table. +# Default: false +# BK_HIDE_TABLE_MISSING_PARTS=true + # Optional: Hide the 'Wishlist' entry from the menu. Does not disable the route. # Default: false # BK_HIDE_WISHES=true diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a7379e..28a7f0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,13 @@ > "Missing" part has been renamed to "Problems" to accomodate for missing and damaged parts. > The associated environment variables have changed named (the old names are still valid) -## Code +### Environment + +- Renamed: `BK_HIDE_MISSING_PARTS` -> `BK_HIDE_ALL_PROBLEMS_PARTS` +- Added: `BK_HIDE_TABLE_MISSING_PARTS`, hide the Missing column in all tables +- Added: `BK_HIDE_TABLE_DAMAGED_PARTS`, hide the Damaged column in all tables + +### Code - Form - Migrate missing input fields to BrickChanger diff --git a/bricktracker/config.py b/bricktracker/config.py index 8ab193a..62e23a1 100644 --- a/bricktracker/config.py +++ b/bricktracker/config.py @@ -29,8 +29,10 @@ CONFIG: Final[list[dict[str, Any]]] = [ {'n': 'HIDE_ALL_MINIFIGURES', 'c': bool}, {'n': 'HIDE_ALL_PARTS', 'c': bool}, {'n': 'HIDE_ALL_SETS', 'c': bool}, - {'n': 'HIDE_PROBLEMS_PARTS', 'e': 'BK_HIDE_MISSING_PARTS', 'c': bool}, + {'n': 'HIDE_ALL_PROBLEMS_PARTS', 'e': 'BK_HIDE_MISSING_PARTS', 'c': bool}, {'n': 'HIDE_SET_INSTRUCTIONS', 'c': bool}, + {'n': 'HIDE_TABLE_DAMAGED_PARTS', 'c': bool}, + {'n': 'HIDE_TABLE_MISSING_PARTS', 'c': bool}, {'n': 'HIDE_WISHES', 'c': bool}, {'n': 'MINIFIGURES_DEFAULT_ORDER', 'd': '"rebrickable_minifigures"."name" ASC'}, # noqa: E501 {'n': 'MINIFIGURES_FOLDER', 'd': 'minifigs', 's': True}, diff --git a/bricktracker/navbar.py b/bricktracker/navbar.py index 04b7053..30007de 100644 --- a/bricktracker/navbar.py +++ b/bricktracker/navbar.py @@ -11,7 +11,7 @@ NAVBAR: Final[list[dict[str, Any]]] = [ {'e': 'set.list', 't': 'Sets', 'i': 'grid-line', 'f': 'HIDE_ALL_SETS'}, # noqa: E501 {'e': 'add.add', 't': 'Add', 'i': 'add-circle-line', 'f': 'HIDE_ADD_SET'}, # noqa: E501 {'e': 'part.list', 't': 'Parts', 'i': 'shapes-line', 'f': 'HIDE_ALL_PARTS'}, # noqa: E501 - {'e': 'part.problem', 't': 'Problems', 'i': 'error-warning-line', 'f': 'HIDE_PROBLEMS_PARTS'}, # noqa: E501 + {'e': 'part.problem', 't': 'Problems', 'i': 'error-warning-line', 'f': 'HIDE_ALL_PROBLEMS_PARTS'}, # noqa: E501 {'e': 'minifigure.list', 't': 'Minifigures', 'i': 'group-line', 'f': 'HIDE_ALL_MINIFIGURES'}, # noqa: E501 {'e': 'instructions.list', 't': 'Instructions', 'i': 'file-line', 'f': 'HIDE_ALL_INSTRUCTIONS'}, # noqa: E501 {'e': 'wish.list', 't': 'Wishlist', 'i': 'gift-line', 'f': 'HIDE_WISHES'}, diff --git a/templates/macro/table.html b/templates/macro/table.html index 8db1dda..d31e1c2 100644 --- a/templates/macro/table.html +++ b/templates/macro/table.html @@ -9,8 +9,12 @@ {% if quantity %}