Compare commits

..
8 Commits
Author SHA1 Message Date
Ibrahem Khalil 2931eb46aa Merge branch 'develop' into 17315 2023-09-21 10:34:10 +03:00
ibrkhalil 3fd26a0c07 Hardcode blue 2023-09-20 19:56:44 +03:00
Ibrahem Khalil 9f5feca2eb Merge branch 'develop' into 17315 2023-09-20 19:54:22 +03:00
Ibrahem Khalil d6d1313f86 Merge branch 'develop' into 17315 2023-09-20 16:26:15 +03:00
Ibrahem Khalil c1350f45f5 Merge branch 'develop' into 17315 2023-09-19 17:29:53 +03:00
Ibrkhalil bcd756f2cc Better approach 2023-09-19 16:03:33 +03:00
Ibrahem Khalil ec08fb2b1c Merge branch 'develop' into 17315 2023-09-19 11:13:05 +03:00
Ibrkhalil 32b91ed31e Group chat icon not showing 2023-09-19 11:10:11 +03:00
2 changed files with 37 additions and 35 deletions
@@ -3,12 +3,15 @@
(defn container
[{:keys [container-size customization-color theme]}]
{:width container-size
:height container-size
:align-items :center
:justify-content :center
:border-radius (/ container-size 2)
:overflow :hidden
:background-color (colors/theme-colors (colors/custom-color customization-color 50)
(colors/custom-color customization-color 60)
theme)})
(let [color (if (keyword? customization-color)
customization-color
:blue)]
{:width container-size
:height container-size
:align-items :center
:justify-content :center
:border-radius (/ container-size 2)
:overflow :hidden
:background-color (colors/theme-colors (colors/custom-color color 50)
(colors/custom-color color 60)
theme)}))
+25 -26
View File
@@ -1,18 +1,18 @@
(ns status-im2.contexts.chat.camera.view
(:require [oops.core :as oops]
[quo2.core :as quo]
[quo2.foundations.colors :as colors]
[react-native.camera-kit :as camera-kit]
[react-native.core :as rn]
[react-native.fast-image :as fast-image]
[react-native.orientation :as orientation]
[react-native.platform :as platform]
[react-native.reanimated :as reanimated]
[react-native.safe-area :as safe-area]
[reagent.core :as reagent]
[status-im2.contexts.chat.camera.style :as style]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
(:require
[quo2.core :as quo]
[quo2.foundations.colors :as colors]
[react-native.camera-kit :as camera-kit]
[react-native.core :as rn]
[react-native.fast-image :as fast-image]
[react-native.orientation :as orientation]
[react-native.platform :as platform]
[react-native.reanimated :as reanimated]
[react-native.safe-area :as safe-area]
[reagent.core :as reagent]
[utils.i18n :as i18n]
[status-im2.contexts.chat.camera.style :as style]
[utils.re-frame :as rf]))
(defn retake
[flash uri]
@@ -70,12 +70,13 @@
(defn zoom-buttons
[]
(fn [top insets rotate current-zoom]
[rn/view {:style (style/zoom-container top insets)}
[zoom-button {:value 0.5 :current-zoom current-zoom :rotate rotate}]
[zoom-button {:value 1.0 :current-zoom current-zoom :rotate rotate}]
[zoom-button {:value 2.0 :current-zoom current-zoom :rotate rotate}]
[zoom-button {:value 3.0 :current-zoom current-zoom :rotate rotate}]]))
(let [current-zoom (reagent/atom 1)]
(fn [top insets rotate]
[rn/view {:style (style/zoom-container top insets)}
[zoom-button {:value 0.5 :current-zoom current-zoom :rotate rotate}]
[zoom-button {:value 1 :current-zoom current-zoom :rotate rotate}]
[zoom-button {:value 2 :current-zoom current-zoom :rotate rotate}]
[zoom-button {:value 3 :current-zoom current-zoom :rotate rotate}]])))
(defn- f-bottom-area
@@ -107,7 +108,7 @@
[:f> f-bottom-area args back flip-camera]))
(defn- f-camera-screen
[{:keys [camera-ref uri camera-type current-orientation flash toggle-flash current-zoom]}]
[{:keys [camera-ref uri camera-type current-orientation flash toggle-flash]}]
(let [window (rn/get-window)
{:keys [width height]} window
camera-window-height (* width 1.33)
@@ -139,10 +140,9 @@
{:ref #(reset! camera-ref %)
:style (style/camera-window width camera-window-height top)
:flash-mode (if @flash :on :off)
:camera-type @camera-type
:zoom @current-zoom}])
:camera-type @camera-type}])
(when-not @uri
[zoom-buttons top insets rotate current-zoom])
[zoom-buttons top insets rotate])
[rn/view {:style (style/confirmation-container insets @uri)}
[quo/text
{:on-press on-press
@@ -171,6 +171,5 @@
:camera-type (reagent/atom camera-kit/camera-type-back)
:current-orientation (atom orientation/portrait)
:flash flash
:toggle-flash #(swap! flash not)
:current-zoom (reagent/atom 1)}]
:toggle-flash #(swap! flash not)}]
[:f> f-camera-screen args]))