removed old unused code and resources
|
@ -12,7 +12,6 @@
|
||||||
"react-native-action-button",
|
"react-native-action-button",
|
||||||
"react-native-vector-icons/Ionicons",
|
"react-native-vector-icons/Ionicons",
|
||||||
"react-native-vector-icons/Octicons",
|
"react-native-vector-icons/Octicons",
|
||||||
"react-native-circle-checkbox",
|
|
||||||
"react-native-randombytes",
|
"react-native-randombytes",
|
||||||
"dismissKeyboard",
|
"dismissKeyboard",
|
||||||
"react-native-linear-gradient",
|
"react-native-linear-gradient",
|
||||||
|
|
BIN
images/add.png
Before Width: | Height: | Size: 2.0 KiB |
BIN
images/att.png
Before Width: | Height: | Size: 651 B |
BIN
images/chat.png
Before Width: | Height: | Size: 916 B |
Before Width: | Height: | Size: 316 B |
Before Width: | Height: | Size: 124 B |
Before Width: | Height: | Size: 274 B |
Before Width: | Height: | Size: 170 B |
BIN
images/leave.png
Before Width: | Height: | Size: 1.7 KiB |
BIN
images/logo.png
Before Width: | Height: | Size: 526 B |
BIN
images/mic.png
Before Width: | Height: | Size: 529 B |
Before Width: | Height: | Size: 985 B |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 307 B |
BIN
images/play.png
Before Width: | Height: | Size: 898 B |
BIN
images/seen.png
Before Width: | Height: | Size: 284 B |
BIN
images/smile.png
Before Width: | Height: | Size: 584 B |
BIN
images/trash.png
Before Width: | Height: | Size: 1.9 KiB |
BIN
images/v.png
Before Width: | Height: | Size: 2.0 KiB |
|
@ -49,7 +49,6 @@
|
||||||
"react-native-android-sms-listener": "github:adrian-tiberius/react-native-android-sms-listener#listener-bugfix",
|
"react-native-android-sms-listener": "github:adrian-tiberius/react-native-android-sms-listener#listener-bugfix",
|
||||||
"react-native-autolink": "^0.10.0",
|
"react-native-autolink": "^0.10.0",
|
||||||
"react-native-camera": "^0.9.4",
|
"react-native-camera": "^0.9.4",
|
||||||
"react-native-circle-checkbox": "github:paramoshkinandrew/ReactNativeCircleCheckbox",
|
|
||||||
"react-native-contacts": "^0.2.4",
|
"react-native-contacts": "^0.2.4",
|
||||||
"react-native-crypto": "^2.0.1",
|
"react-native-crypto": "^2.0.1",
|
||||||
"react-native-dialogs": "0.0.16",
|
"react-native-dialogs": "0.0.16",
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
(def android-sms-listener (js/require "react-native-android-sms-listener"))
|
(def android-sms-listener (js/require "react-native-android-sms-listener"))
|
||||||
(def autolink (js/require "react-native-autolink"))
|
(def autolink (js/require "react-native-autolink"))
|
||||||
(def camera (js/require "react-native-camera"))
|
(def camera (js/require "react-native-camera"))
|
||||||
(def circle-checkbox (js/require "react-native-circle-checkbox"))
|
|
||||||
;; TODO see https://github.com/rt2zz/react-native-contacts/issues/45
|
;; TODO see https://github.com/rt2zz/react-native-contacts/issues/45
|
||||||
(def contacts (js/require "react-native-contacts"))
|
(def contacts (js/require "react-native-contacts"))
|
||||||
(def dialogs (js/require "react-native-dialogs"))
|
(def dialogs (js/require "react-native-dialogs"))
|
||||||
|
|
|
@ -1,17 +1,5 @@
|
||||||
(ns status-im.react-native.resources)
|
(ns status-im.react-native.resources)
|
||||||
|
|
||||||
(def add-icon (js/require "./images/add.png"))
|
|
||||||
(def att (js/require "./images/att.png"))
|
|
||||||
(def chat-icon (js/require "./images/chat.png"))
|
|
||||||
(def icon-close-gray (js/require "./images/icon_close_gray.png"))
|
|
||||||
(def logo-icon (js/require "./images/logo.png"))
|
|
||||||
(def nav-back-icon (js/require "./images/nav-back.png"))
|
|
||||||
(def user-no-photo (js/require "./images/no-photo.png"))
|
|
||||||
(def online-icon (js/require "./images/online.png"))
|
|
||||||
(def play (js/require "./images/play.png"))
|
|
||||||
(def trash-icon (js/require "./images/trash.png"))
|
|
||||||
(def v (js/require "./images/v.png"))
|
|
||||||
|
|
||||||
(def contacts
|
(def contacts
|
||||||
{:auction-house (js/require "./images/contacts/auction-house.png")
|
{:auction-house (js/require "./images/contacts/auction-house.png")
|
||||||
:mkr-market (js/require "./images/contacts/mkr-market.png")
|
:mkr-market (js/require "./images/contacts/mkr-market.png")
|
||||||
|
|
|
@ -39,8 +39,6 @@
|
||||||
add-contacts-toggle-list
|
add-contacts-toggle-list
|
||||||
add-participants-toggle-list]]
|
add-participants-toggle-list]]
|
||||||
[status-im.new-group.views.reorder-groups :refer [reorder-groups]]
|
[status-im.new-group.views.reorder-groups :refer [reorder-groups]]
|
||||||
[status-im.participants.views.add :refer [new-participants]]
|
|
||||||
[status-im.participants.views.remove :refer [remove-participants]]
|
|
||||||
[status-im.profile.screen :refer [profile my-profile]]
|
[status-im.profile.screen :refer [profile my-profile]]
|
||||||
[status-im.profile.edit.screen :refer [edit-my-profile]]
|
[status-im.profile.edit.screen :refer [edit-my-profile]]
|
||||||
[status-im.profile.photo-capture.screen :refer [profile-photo-capture]]
|
[status-im.profile.photo-capture.screen :refer [profile-photo-capture]]
|
||||||
|
@ -125,8 +123,6 @@
|
||||||
(let [component (case current-view
|
(let [component (case current-view
|
||||||
:discover main-tabs
|
:discover main-tabs
|
||||||
:discover-search-results discover-search-results
|
:discover-search-results discover-search-results
|
||||||
:add-participants new-participants
|
|
||||||
:remove-participants remove-participants
|
|
||||||
:chat-list main-tabs
|
:chat-list main-tabs
|
||||||
:new-chat new-chat
|
:new-chat new-chat
|
||||||
:new-group new-group
|
:new-group new-group
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
(defn message-content-audio [_]
|
(defn message-content-audio [_]
|
||||||
[view st/audio-container
|
[view st/audio-container
|
||||||
[view st/play-view
|
[view st/play-view
|
||||||
[image {:source res/play
|
[image {;:source res/play
|
||||||
:style st/play-image}]]
|
:style st/play-image}]]
|
||||||
[view st/track-container
|
[view st/track-container
|
||||||
[view st/track]
|
[view st/track]
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
status-im.contacts.handlers
|
status-im.contacts.handlers
|
||||||
status-im.discover.handlers
|
status-im.discover.handlers
|
||||||
status-im.new-group.handlers
|
status-im.new-group.handlers
|
||||||
status-im.participants.handlers
|
|
||||||
status-im.profile.handlers
|
status-im.profile.handlers
|
||||||
status-im.commands.handlers.loading
|
status-im.commands.handlers.loading
|
||||||
status-im.commands.handlers.jail
|
status-im.commands.handlers.jail
|
||||||
|
|
|
@ -36,8 +36,6 @@
|
||||||
add-participants-toggle-list]]
|
add-participants-toggle-list]]
|
||||||
[status-im.new-group.views.reorder-groups :refer [reorder-groups]]
|
[status-im.new-group.views.reorder-groups :refer [reorder-groups]]
|
||||||
[status-im.new-group.screen-public :refer [new-public-group]]
|
[status-im.new-group.screen-public :refer [new-public-group]]
|
||||||
[status-im.participants.views.add :refer [new-participants]]
|
|
||||||
[status-im.participants.views.remove :refer [remove-participants]]
|
|
||||||
[status-im.profile.screen :refer [profile my-profile]]
|
[status-im.profile.screen :refer [profile my-profile]]
|
||||||
[status-im.profile.edit.screen :refer [edit-my-profile]]
|
[status-im.profile.edit.screen :refer [edit-my-profile]]
|
||||||
[status-im.profile.photo-capture.screen :refer [profile-photo-capture]]
|
[status-im.profile.photo-capture.screen :refer [profile-photo-capture]]
|
||||||
|
@ -95,8 +93,6 @@
|
||||||
(let [component (case current-view
|
(let [component (case current-view
|
||||||
:discover main-tabs
|
:discover main-tabs
|
||||||
:discover-search-results discover-search-results
|
:discover-search-results discover-search-results
|
||||||
:add-participants new-participants
|
|
||||||
:remove-participants remove-participants
|
|
||||||
:chat-list main-tabs
|
:chat-list main-tabs
|
||||||
:new-chat new-chat
|
:new-chat new-chat
|
||||||
:new-group new-group
|
:new-group new-group
|
||||||
|
|
|
@ -358,5 +358,17 @@
|
||||||
(after (delete-group!))
|
(after (delete-group!))
|
||||||
(delete-group))
|
(delete-group))
|
||||||
|
|
||||||
|
(defn deselect-participant
|
||||||
|
[db [_ id]]
|
||||||
|
(update db :selected-participants disj id))
|
||||||
|
|
||||||
|
(register-handler :deselect-participant deselect-participant)
|
||||||
|
|
||||||
|
(defn select-participant
|
||||||
|
[db [_ id]]
|
||||||
|
(update db :selected-participants conj id))
|
||||||
|
|
||||||
|
(register-handler :select-participant select-participant)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
list-view
|
list-view
|
||||||
list-item]]
|
list-item]]
|
||||||
[status-im.components.text-field.view :refer [text-field]]
|
[status-im.components.text-field.view :refer [text-field]]
|
||||||
[status-im.components.styles :refer [color-blue
|
[status-im.components.styles :refer [icon-ok
|
||||||
|
color-blue
|
||||||
color-gray4]]
|
color-gray4]]
|
||||||
[status-im.components.status-bar :refer [status-bar]]
|
[status-im.components.status-bar :refer [status-bar]]
|
||||||
[status-im.components.toolbar.view :refer [toolbar]]
|
[status-im.components.toolbar.view :refer [toolbar]]
|
||||||
|
@ -27,8 +28,10 @@
|
||||||
[status-bar]
|
[status-bar]
|
||||||
[toolbar
|
[toolbar
|
||||||
{:title (label :t/new-public-group-chat)
|
{:title (label :t/new-public-group-chat)
|
||||||
:actions [{:image {:source res/v ;; {:uri "icon_search"}
|
:actions [{:image {:source {:uri (if create-btn-enabled?
|
||||||
:style (st/toolbar-icon create-btn-enabled?)}
|
:icon_ok_blue
|
||||||
|
:icon_ok_disabled)}
|
||||||
|
:style icon-ok}
|
||||||
:handler (when create-btn-enabled?
|
:handler (when create-btn-enabled?
|
||||||
#(dispatch [:create-new-public-group topic]))}]}]]))
|
#(dispatch [:create-new-public-group topic]))}]}]]))
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
(reg-sub :is-contact-selected?
|
(reg-sub :is-contact-selected?
|
||||||
(u/contains-sub :selected-contacts))
|
(u/contains-sub :selected-contacts))
|
||||||
|
|
||||||
|
(reg-sub :is-participant-selected?
|
||||||
|
(u/contains-sub :selected-participants))
|
||||||
|
|
||||||
(defn filter-selected-contacts [selected-contacts contacts]
|
(defn filter-selected-contacts [selected-contacts contacts]
|
||||||
(remove #(true? (:pending? (contacts %))) selected-contacts))
|
(remove #(true? (:pending? (contacts %))) selected-contacts))
|
||||||
|
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
(ns status-im.participants.handlers
|
|
||||||
(:require [status-im.navigation.handlers :as nav]
|
|
||||||
[re-frame.core :refer [debug]]
|
|
||||||
[status-im.utils.handlers :refer [register-handler]]))
|
|
||||||
|
|
||||||
(defmethod nav/preload-data! :add-participants
|
|
||||||
[db _]
|
|
||||||
(assoc db :selected-participants #{}))
|
|
||||||
|
|
||||||
(defmethod nav/preload-data! :remove-participants
|
|
||||||
[db _]
|
|
||||||
(assoc db :selected-participants #{}))
|
|
||||||
|
|
||||||
(defn deselect-participant
|
|
||||||
[db [_ id]]
|
|
||||||
(update db :selected-participants disj id))
|
|
||||||
|
|
||||||
(register-handler :deselect-participant deselect-participant)
|
|
||||||
|
|
||||||
(defn select-participant
|
|
||||||
[db [_ id]]
|
|
||||||
(update db :selected-participants conj id))
|
|
||||||
|
|
||||||
(register-handler :select-participant (debug select-participant))
|
|
|
@ -1,24 +0,0 @@
|
||||||
(ns status-im.participants.styles)
|
|
||||||
|
|
||||||
(def participants-container
|
|
||||||
{:flex 1
|
|
||||||
:backgroundColor :white})
|
|
||||||
|
|
||||||
(def participants-list
|
|
||||||
{:backgroundColor :white})
|
|
||||||
|
|
||||||
(def new-participant-image
|
|
||||||
{:width 20
|
|
||||||
:height 18})
|
|
||||||
|
|
||||||
(def remove-participants-image
|
|
||||||
{:width 22
|
|
||||||
:height 30})
|
|
||||||
|
|
||||||
(def participant-container
|
|
||||||
{:flexDirection :row
|
|
||||||
:marginTop 5
|
|
||||||
:marginBottom 5
|
|
||||||
:paddingLeft 15
|
|
||||||
:paddingRight 15
|
|
||||||
:height 75})
|
|
|
@ -1,6 +0,0 @@
|
||||||
(ns status-im.participants.subs
|
|
||||||
(:require [re-frame.core :refer [reg-sub]]
|
|
||||||
[status-im.utils.subs :as u]))
|
|
||||||
|
|
||||||
(reg-sub :is-participant-selected?
|
|
||||||
(u/contains-sub :selected-participants))
|
|
|
@ -1,33 +0,0 @@
|
||||||
(ns status-im.participants.views.add
|
|
||||||
(:require-macros [status-im.utils.views :refer [defview]])
|
|
||||||
(:require [re-frame.core :refer [subscribe dispatch]]
|
|
||||||
[status-im.react-native.resources :as res]
|
|
||||||
[status-im.components.react :refer [view list-view list-item]]
|
|
||||||
[status-im.components.status-bar :refer [status-bar]]
|
|
||||||
[status-im.components.toolbar.view :refer [toolbar]]
|
|
||||||
[status-im.utils.listview :refer [to-datasource]]
|
|
||||||
[status-im.participants.views.contact :refer [participant-contact]]
|
|
||||||
[status-im.participants.styles :as st]
|
|
||||||
[status-im.i18n :refer [label]]))
|
|
||||||
|
|
||||||
(defn new-participants-toolbar []
|
|
||||||
[view
|
|
||||||
[status-bar]
|
|
||||||
[toolbar
|
|
||||||
{:title (label :t/add-participants)
|
|
||||||
:actions [{:image {:source res/v ;; {:uri "icon_search"}
|
|
||||||
:style st/new-participant-image}
|
|
||||||
:handler #(do (dispatch [:add-new-participants])
|
|
||||||
(dispatch [:navigate-back]))}]}]])
|
|
||||||
|
|
||||||
(defn new-participants-row
|
|
||||||
[row _ _]
|
|
||||||
(list-item [participant-contact row]))
|
|
||||||
|
|
||||||
(defview new-participants []
|
|
||||||
[contacts [:all-new-contacts]]
|
|
||||||
[view st/participants-container
|
|
||||||
[new-participants-toolbar]
|
|
||||||
[list-view {:dataSource (to-datasource contacts)
|
|
||||||
:renderRow new-participants-row
|
|
||||||
:style st/participants-list}]])
|
|
|
@ -1,22 +0,0 @@
|
||||||
(ns status-im.participants.views.contact
|
|
||||||
(:require-macros [status-im.utils.views :refer [defview]])
|
|
||||||
(:require [re-frame.core :refer [subscribe dispatch dispatch-sync]]
|
|
||||||
[status-im.components.react :refer [view]]
|
|
||||||
[status-im.components.contact.contact :refer [contact-inner-view]]
|
|
||||||
[status-im.components.item-checkbox :refer [item-checkbox]]
|
|
||||||
[status-im.participants.styles :as st]))
|
|
||||||
|
|
||||||
;; todo duplication
|
|
||||||
(defn on-toggle [whisper-identity]
|
|
||||||
(fn [checked?]
|
|
||||||
(let [action (if checked? :select-participant :deselect-participant)]
|
|
||||||
(dispatch [action whisper-identity]))))
|
|
||||||
|
|
||||||
(defview participant-contact
|
|
||||||
[{:keys [whisper-identity] :as contact}]
|
|
||||||
[checked [:is-participant-selected? whisper-identity]]
|
|
||||||
[view st/participant-container
|
|
||||||
[item-checkbox {:onToggle (on-toggle whisper-identity)
|
|
||||||
:checked checked
|
|
||||||
:size 30}]
|
|
||||||
[contact-inner-view {:contact contact}]])
|
|
|
@ -1,40 +0,0 @@
|
||||||
(ns status-im.participants.views.remove
|
|
||||||
(:require-macros [status-im.utils.views :refer [defview]])
|
|
||||||
(:require [re-frame.core :refer [subscribe dispatch]]
|
|
||||||
[status-im.react-native.resources :as res]
|
|
||||||
[status-im.components.react :refer [view
|
|
||||||
text
|
|
||||||
image
|
|
||||||
touchable-highlight
|
|
||||||
list-view
|
|
||||||
list-item]]
|
|
||||||
[status-im.components.status-bar :refer [status-bar]]
|
|
||||||
[status-im.components.toolbar.view :refer [toolbar]]
|
|
||||||
[status-im.utils.listview :refer [to-datasource]]
|
|
||||||
[status-im.participants.views.contact
|
|
||||||
:refer [participant-contact]]
|
|
||||||
[reagent.core :as r]
|
|
||||||
[status-im.participants.styles :as st]
|
|
||||||
[status-im.i18n :refer [label]]))
|
|
||||||
|
|
||||||
(defn remove-participants-toolbar []
|
|
||||||
[view
|
|
||||||
[status-bar]
|
|
||||||
[toolbar
|
|
||||||
{:title (label :t/remove-participants)
|
|
||||||
:actions [{:handler #(do (dispatch [:remove-participants])
|
|
||||||
(dispatch [:navigate-back]))
|
|
||||||
:image {:source res/trash-icon ;; {:uri "icon_search"}
|
|
||||||
:style st/remove-participants-image}}]}]])
|
|
||||||
|
|
||||||
(defn remove-participants-row
|
|
||||||
[row _ _]
|
|
||||||
(r/as-element [participant-contact row]))
|
|
||||||
|
|
||||||
(defview remove-participants []
|
|
||||||
[contacts [:current-chat-contacts]]
|
|
||||||
[view st/participants-container
|
|
||||||
[remove-participants-toolbar]
|
|
||||||
[list-view {:dataSource (to-datasource contacts)
|
|
||||||
:renderRow remove-participants-row
|
|
||||||
:style st/participants-list}]])
|
|
|
@ -6,7 +6,6 @@
|
||||||
status-im.discover.subs
|
status-im.discover.subs
|
||||||
status-im.contacts.subs
|
status-im.contacts.subs
|
||||||
status-im.new-group.subs
|
status-im.new-group.subs
|
||||||
status-im.participants.subs
|
|
||||||
status-im.transactions.subs
|
status-im.transactions.subs
|
||||||
status-im.bots.subs))
|
status-im.bots.subs))
|
||||||
|
|
||||||
|
|