Skip to content

Commit

Permalink
feature(qchat): re-arrange websocket message to allow image communic…
Browse files Browse the repository at this point in the history
…ations (#211)

* feature(qchat): display and send image

* fix(qchat): create an item using bytes

* feature(qchat): send QGIS screenshot to chat

* feature(qchat): open image on single click

* refactor(qchat): use qchat message types and ws wrapper

* feature(qchat): send QGIS screenshot through websocket

* feature(qchat): send iamges through websocket

* fix(qchat): set send author and avatar for image items

* feature(qchat): set image message color if sent by user

* doc(qchat): add docstrings
  • Loading branch information
gounux authored Nov 1, 2024
1 parent a7f7c43 commit 634cc28
Show file tree
Hide file tree
Showing 7 changed files with 406 additions and 110 deletions.
3 changes: 0 additions & 3 deletions qtribu/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ def local_path(self, base_path: Path = Path().home() / ".geotribu/cdn/") -> Path
ADMIN_MESSAGES_NICKNAME: str = "admin"
ADMIN_MESSAGES_AVATAR: str = "mIconWarning.svg"
ERROR_MESSAGES_COLOR: str = "#ff0000"
INTERNAL_MESSAGE_AUTHOR: str = "internal"
QCHAT_USER_AVATARS: dict[str, str] = {
"Arrow Up": "mActionArrowUp.svg",
"Calculate": "mActionCalculateField.svg",
Expand All @@ -221,14 +220,12 @@ def local_path(self, base_path: Path = Path().home() / ".geotribu/cdn/") -> Path

# QChat cheatcodes
CHEATCODE_DIZZY: str = "givemesomecheese"
CHEATCODE_DONTCRYBABY: str = "dontcrybaby"
CHEATCODE_IAMAROBOT: str = "iamarobot"
CHEATCODE_10OCLOCK: str = "its10oclock"
CHEATCODE_QGIS_PRO_LICENSE: str = "qgisprolicense"

CHEATCODES = [
CHEATCODE_DIZZY,
CHEATCODE_DONTCRYBABY,
CHEATCODE_IAMAROBOT,
CHEATCODE_10OCLOCK,
CHEATCODE_QGIS_PRO_LICENSE,
Expand Down
Loading

0 comments on commit 634cc28

Please sign in to comment.