Skip to content

Commit

Permalink
update logo (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
ciur authored Nov 17, 2024
1 parent c02c38b commit e1aa6d5
Show file tree
Hide file tree
Showing 12 changed files with 384 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ index_db_test/
custom_logging.yml
simplest.yml
ui/public/runtime/config.js
.ruff_cache/
.pytest_cache/
Binary file modified artwork/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions artwork/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions artwork/logo_transparent_bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Initial migration
Revision ID: 76daa802d8cc
Revision ID: 7bd65feeece1
Revises:
Create Date: 2024-11-14 08:17:32.471311
Create Date: 2024-11-17 13:26:28.809195
"""
from typing import Sequence, Union
Expand All @@ -12,7 +12,7 @@


# revision identifiers, used by Alembic.
revision: str = '76daa802d8cc'
revision: str = '7bd65feeece1'
down_revision: Union[str, None] = None
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
Expand Down Expand Up @@ -92,7 +92,9 @@ def upgrade() -> None:
sa.Column('updated_at', sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(['home_folder_id'], ['folders.node_id'], ondelete='CASCADE', deferrable=True),
sa.ForeignKeyConstraint(['inbox_folder_id'], ['folders.node_id'], ondelete='CASCADE', deferrable=True),
sa.PrimaryKeyConstraint('id')
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('email'),
sa.UniqueConstraint('username')
)
op.create_table('custom_fields',
sa.Column('id', sa.Uuid(), nullable=False),
Expand Down
23 changes: 15 additions & 8 deletions papermerge/core/features/users/cli/cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from typing import Sequence

from prompt_toolkit import prompt
from typing_extensions import Annotated
import typer
from rich.console import Console
from rich.table import Table
Expand Down Expand Up @@ -28,20 +30,25 @@ def list_users(page_size: int = 10, page_number: int = 1):
print_users(users.items)


Username = Annotated[
str, typer.Option(prompt=True, envvar="PAPERMERGE__AUTH__USERNAME")
]
Email = Annotated[str, typer.Option(envvar="PAPERMERGE__AUTH__EMAIL")]
Password = Annotated[
str, typer.Option(prompt=True, envvar="PAPERMERGE__AUTH__PASSWORD")
]


@app.command(name="create")
def create_user_cmd(
username: str,
username: Username,
password: Password,
email: Email = None,
superuser: bool = False,
password: str | None = None,
email: str | None = None,
):
"""Create user"""

if password is None:
password = username

if email is None:
email = f"{username}@papermerge.com"
email = f"{username}@example.com"

with db.Session() as db_session:
user, error = usr_dbapi.create_user(
Expand Down
6 changes: 3 additions & 3 deletions papermerge/core/features/users/db/orm.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class User(Base):
__tablename__ = "users"

id: Mapped[UUID] = mapped_column(primary_key=True, insert_default=uuid.uuid4())
username: Mapped[str]
email: Mapped[str]
password: Mapped[str]
username: Mapped[str] = mapped_column(unique=True)
email: Mapped[str] = mapped_column(unique=True)
password: Mapped[str] = mapped_column(nullable=False)
first_name: Mapped[str] = mapped_column(default=" ")
last_name: Mapped[str] = mapped_column(default=" ")
is_superuser: Mapped[bool] = mapped_column(default=False)
Expand Down
Binary file modified ui2/public/favicon.ico
Binary file not shown.
Binary file added ui2/public/favicon_transparent_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
93 changes: 93 additions & 0 deletions ui2/public/favicon_transparent_bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e1aa6d5

Please sign in to comment.