Skip to content

Commit

Permalink
Merge branch 'main' of github.com:daya0576/beaver_habits
Browse files Browse the repository at this point in the history
  • Loading branch information
daya0576 committed Feb 5, 2025
2 parents e4e759d + d9eebd6 commit 84cc8c5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM python:3.12-slim AS python-base
COPY --from=ghcr.io/astral-sh/uv:0.5.26 /uv /uvx /bin/
ENV UV_COMPILE_BYTECODE=1 \
\
PYSETUP_PATH="/opt/pysetup" \
Expand All @@ -19,7 +18,7 @@ RUN sh /uv-installer.sh && rm /uv-installer.sh
ENV PATH="/root/.local/bin/:$PATH"

COPY uv.lock pyproject.toml ./
RUN uv sync --frozen --no-install-project --no-dev
RUN uv sync --frozen --no-install-project --no-dev -v

# [Experimental] Remove unused nicegui libs
ENV NICEGUI_LIB_PATH="$VENV_PATH/lib/python3.12/site-packages/nicegui/elements/lib"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.nobuildkit.arm32
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN sh /uv-installer.sh && rm /uv-installer.sh
ENV PATH="/root/.local/bin/:$PATH"

COPY uv.lock pyproject.toml ./
RUN uv sync --frozen --no-install-project --no-dev
RUN uv sync --frozen --no-install-project --no-dev -v

# [Experimental] Remove unused nicegui libs
ENV NICEGUI_LIB_PATH="$VENV_PATH/lib/python3.12/site-packages/nicegui/elements/lib"
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ services:
environment:
# See the note below to find all the environment variables
- HABITS_STORAGE=USER_DISK # DATABASE stores in a single SQLite database named habits.db. USER_DISK option saves in a local json file.
# Skip authentication
- TRUSTED_LOCAL_EMAIL=<[email protected]>
volumes:
- /path/to/beaver/habits:/app/.user/ # Change directory to match your docker file scheme.
ports:
Expand Down
2 changes: 1 addition & 1 deletion beaverhabits/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def is_dev(self):
return self.ENV == "dev"

def is_trusted_env(self):
return self.TRUSTED_EMAIL_HEADER or self.TRUSTED_LOCAL_EMAIL
return self.TRUSTED_LOCAL_EMAIL


settings = Settings()
2 changes: 1 addition & 1 deletion beaverhabits/frontend/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def confirm_dialog(self):


def habit_notes(records: List[CheckedRecord], limit: int = 10):
with ui.timeline(side="right").classes("w-full pt-5 px-3"):
with ui.timeline(side="right").classes("w-full pt-5 px-3 whitespace-pre-line"):
for record in records[:limit]:
color = "primary" if record.done else "grey-8"
ui.timeline_entry(
Expand Down
21 changes: 11 additions & 10 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 84cc8c5

Please sign in to comment.