-
Notifications
You must be signed in to change notification settings - Fork 985
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
6ef0cfc
commit 8e634ae
Showing
26 changed files
with
298 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,4 +89,3 @@ | |
:i/face-id])] | ||
(when error? | ||
[error-info error-message processing shell?])])) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
(ns status-im.contexts.chat.group-create.events | ||
(:require [legacy.status-im.data-store.chats :as data-store.chats] | ||
[oops.core :as oops] | ||
[re-frame.core :as rf])) | ||
|
||
(rf/reg-event-fx :group-chat/create | ||
(fn [{:keys [db]} [group-name color image]] | ||
(let [selected-contacts (:group/selected-contacts db)] | ||
{:json-rpc/call [{:method "wakuext_createGroupChatWithMembers" | ||
:params [nil group-name (into [] selected-contacts)] | ||
:js-response true | ||
:on-success (fn [response] | ||
(let [chat-id (-> (oops/oget response :chats) | ||
first | ||
(oops/oget :id))] | ||
(rf/dispatch [:chat-updated response]) | ||
(rf/dispatch [:group-chat/edit | ||
{:chat-id chat-id | ||
:group-name group-name | ||
:color color | ||
:image image}])))}]}))) | ||
|
||
(rf/reg-event-fx :group-chat/edit-success | ||
(fn [{:keys [db]} [{:keys [chat-id name color image]}]] | ||
(let [new-chat {:name name :color color :image image}] | ||
{:db (update-in db [:chats chat-id] #(merge % new-chat))}))) | ||
|
||
(rf/reg-event-fx :group-chat/edit | ||
(fn [_ [{:keys [chat-id group-name color image]}]] | ||
{:json-rpc/call [{:method "chat_editChat" | ||
:params ["" chat-id group-name (name color) image] | ||
:js-response true | ||
:on-success #(rf/dispatch [:group-chat/edit-success | ||
(data-store.chats/<-rpc-js %)])}]})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(ns status-im.contexts.chat.group-create.style | ||
(:require [quo.foundations.colors :as colors])) | ||
|
||
(def avatar {:width 88 :margin-top 12 :margin-left 20}) | ||
|
||
(def hole | ||
{:y (- 80 32) | ||
:x (+ (- 80 32) 8) | ||
:width 32 | ||
:height 32 | ||
:borderRadius 10}) | ||
|
||
(def camera {:position :absolute :right 0 :bottom 0}) | ||
|
||
(defn color-label | ||
[theme] | ||
{:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme) | ||
:padding-horizontal 20}) | ||
|
||
(def tags {:flex-direction :row :flex-wrap :wrap :padding-horizontal 20 :padding-top 12}) | ||
|
||
(def tag {:margin-right 8 :margin-bottom 8}) |
Oops, something went wrong.