-
Notifications
You must be signed in to change notification settings - Fork 984
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efc4f6c
commit 23fdf91
Showing
27 changed files
with
566 additions
and
220 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,13 @@ | ||
(ns quo.previews.icons | ||
(:require [quo.design-system.colors :as colors] | ||
[quo.react-native :as rn] | ||
[status-im.ui.components.icons.icons :as icons] | ||
[status-im.ui.components.icons.vector-icons :as vector-icons])) | ||
|
||
(defn preview [] | ||
[rn/scroll-view {:background-color (:ui-background @colors/theme) | ||
:flex 1} | ||
(for [i (keys icons/icons)] | ||
[rn/view {:flex-direction :row} | ||
[vector-icons/icon (keyword i)] | ||
[rn/text i]])]) |
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
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,49 @@ | ||
(ns status-im.ui.screens.browser.bookmarks.views | ||
(:require [status-im.ui.components.keyboard-avoid-presentation :as kb-presentation] | ||
[status-im.ui.components.react :as react] | ||
[status-im.ui.components.topbar :as topbar] | ||
[status-im.i18n :as i18n] | ||
[status-im.ui.components.toolbar :as toolbar] | ||
[quo.core :as quo] | ||
[status-im.ui.components.colors :as colors] | ||
[reagent.core :as reagent] | ||
[clojure.string :as string] | ||
[re-frame.core :as re-frame])) | ||
|
||
(defn screen [{:keys [url name new]}] | ||
(let [input-name (reagent/atom name)] | ||
(fn [] | ||
(let [edit? (not new)] | ||
[kb-presentation/keyboard-avoiding-view {:style {:flex 1}} | ||
[react/view {:flex 1} | ||
[topbar/topbar | ||
{:modal? true | ||
:border-bottom true | ||
:title (if edit? (i18n/label :t/edit-favourite) (i18n/label :t/new-favourite))}] | ||
[react/view {:style {:flex 1}} | ||
[quo/text-input | ||
{:container-style {:margin 16 :margin-top 10} | ||
:accessibility-label :bookmark-input | ||
:max-length 100 | ||
:auto-focus true | ||
:show-cancel false | ||
:label (i18n/label :t/name) | ||
:default-value name | ||
:on-change-text #(reset! input-name %)}] | ||
[react/text {:style {:margin 16 :color colors/gray}} | ||
url]] | ||
[toolbar/toolbar | ||
{:show-border? true | ||
:center | ||
[quo/button | ||
{:accessibility-label :save-bookmark | ||
:type :secondary | ||
:disabled (string/blank? @input-name) | ||
:on-press #(do (if edit? | ||
(re-frame/dispatch [:browser/update-bookmark {:url url :name @input-name}]) | ||
(re-frame/dispatch [:browser/store-bookmark {:url url :name @input-name}])) | ||
(re-frame/dispatch [:navigate-back]))} | ||
(if edit? (i18n/label :t/save) (i18n/label :t/add-favourite))]}]]])))) | ||
|
||
(defn new-bookmark [] | ||
[screen @(re-frame/subscribe [:get-screen-params])]) |
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
Oops, something went wrong.