mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-12 17:54:32 +00:00
added Inter UI font and made some cleanup
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
fceaa0981f
commit
e09476f5d3
BIN
android/app/src/main/assets/fonts/Inter-UI-Bold.otf
Normal file
BIN
android/app/src/main/assets/fonts/Inter-UI-Bold.otf
Normal file
Binary file not shown.
BIN
android/app/src/main/assets/fonts/Inter-UI-Medium.otf
Normal file
BIN
android/app/src/main/assets/fonts/Inter-UI-Medium.otf
Normal file
Binary file not shown.
BIN
android/app/src/main/assets/fonts/Inter-UI-Regular.otf
Normal file
BIN
android/app/src/main/assets/fonts/Inter-UI-Regular.otf
Normal file
Binary file not shown.
@ -82,12 +82,13 @@
|
||||
(def slider (get-class "Slider"))
|
||||
;; Accessor methods for React Components
|
||||
|
||||
(defn add-font-style [style-key {:keys [font] :as opts :or {font :default}}]
|
||||
(let [font (get-in platform/platform-specific [:fonts (keyword font)])
|
||||
style (get opts style-key)]
|
||||
(def default-font {:font-family "Inter UI"})
|
||||
|
||||
(defn add-font-style [style-key opts]
|
||||
(let [style (get opts style-key)]
|
||||
(-> opts
|
||||
(dissoc :font)
|
||||
(assoc style-key (merge style font)))))
|
||||
(assoc style-key (merge default-font style)))))
|
||||
|
||||
(defn transform-to-uppercase [{:keys [uppercase? force-uppercase?]} ts]
|
||||
(if (or force-uppercase? (and uppercase? platform/android?))
|
||||
@ -103,17 +104,15 @@
|
||||
(concat [text-class (add-font-style :style opts)])
|
||||
(vec))))
|
||||
|
||||
(defn text-input [{:keys [font style] :as opts
|
||||
:or {font :default}} text]
|
||||
(let [font (get-in platform/platform-specific [:fonts (keyword font)])]
|
||||
[text-input-class (merge
|
||||
{:underline-color-android :transparent
|
||||
:placeholder-text-color colors/text-gray
|
||||
:placeholder (i18n/label :t/type-a-message)
|
||||
:value text}
|
||||
(-> opts
|
||||
(dissoc :font)
|
||||
(assoc :style (merge style font))))]))
|
||||
(defn text-input [{:keys [style] :as opts} text]
|
||||
[text-input-class (merge
|
||||
{:underline-color-android :transparent
|
||||
:placeholder-text-color colors/text-gray
|
||||
:placeholder (i18n/label :t/type-a-message)
|
||||
:value text}
|
||||
(-> opts
|
||||
(dissoc :font)
|
||||
(assoc :style (merge default-font style))))])
|
||||
|
||||
(defn i18n-text
|
||||
[{:keys [style key]}]
|
||||
|
@ -20,9 +20,9 @@
|
||||
"node_modules/google-breakpad"
|
||||
],
|
||||
"desktopFonts": [
|
||||
"../../../../../resources/fonts/SF-Pro-Text-Regular.otf",
|
||||
"../../../../../resources/fonts/SF-Pro-Text-Medium.otf",
|
||||
"../../../../../resources/fonts/SF-Pro-Text-Light.otf"
|
||||
"../../../../../resources/fonts/Inter-UI-Bold.otf",
|
||||
"../../../../../resources/fonts/Inter-UI-Medium.otf",
|
||||
"../../../../../resources/fonts/Inter-UI-Regular.otf"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/core": "7.0.1",
|
||||
|
@ -30,6 +30,9 @@
|
||||
3E15DFEC1F6F4D7CAE088F49 /* libTcpSockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C2A4E93F6B154AEFA3485B45 /* libTcpSockets.a */; };
|
||||
475D202F20B7450D00879A77 /* libRNFirebase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 475D1FC020B7413500879A77 /* libRNFirebase.a */; };
|
||||
4C16DE0C1F89508700AA10DB /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C16DE0B1F89508700AA10DB /* JavaScriptCore.framework */; };
|
||||
55C386232185E83600B7A324 /* Inter-UI-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 55C386202185E83600B7A324 /* Inter-UI-Medium.otf */; };
|
||||
55C386242185E83600B7A324 /* Inter-UI-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 55C386212185E83600B7A324 /* Inter-UI-Regular.otf */; };
|
||||
55C386252185E83600B7A324 /* Inter-UI-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 55C386222185E83600B7A324 /* Inter-UI-Bold.otf */; };
|
||||
74B758FC20D7C00B003343C3 /* launch-image-universal.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 74B758FB20D7C00B003343C3 /* launch-image-universal.storyboard */; };
|
||||
81C6E6AE0AA739BE9D87C1D0 /* libPods-StatusImTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FC1CBCFE6C906043D6CCEEE1 /* libPods-StatusImTests.a */; };
|
||||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
|
||||
@ -519,6 +522,9 @@
|
||||
4E586E1B0E544F64AA9F5BD1 /* libz.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
|
||||
52F6ED6465184513A082652B /* libRNI18n.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNI18n.a; sourceTree = "<group>"; };
|
||||
5535217F57E44D77AA9CF083 /* libRCTOrientation.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTOrientation.a; sourceTree = "<group>"; };
|
||||
55C386202185E83600B7A324 /* Inter-UI-Medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Inter-UI-Medium.otf"; path = "fonts/Inter-UI-Medium.otf"; sourceTree = "<group>"; };
|
||||
55C386212185E83600B7A324 /* Inter-UI-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Inter-UI-Regular.otf"; path = "fonts/Inter-UI-Regular.otf"; sourceTree = "<group>"; };
|
||||
55C386222185E83600B7A324 /* Inter-UI-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Inter-UI-Bold.otf"; path = "fonts/Inter-UI-Bold.otf"; sourceTree = "<group>"; };
|
||||
5E5A7625B76441D984EA8C0D /* RCTImageResizer.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RCTImageResizer.xcodeproj; path = "../node_modules/react-native-image-resizer/ios/RCTImageResizer.xcodeproj"; sourceTree = "<group>"; };
|
||||
674B3D9595A047AB8D518F4E /* libRNFS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNFS.a; sourceTree = "<group>"; };
|
||||
74B758FB20D7C00B003343C3 /* launch-image-universal.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "launch-image-universal.storyboard"; sourceTree = "<group>"; };
|
||||
@ -736,6 +742,9 @@
|
||||
1E7837547A9A40E18AD63CF3 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
55C386222185E83600B7A324 /* Inter-UI-Bold.otf */,
|
||||
55C386202185E83600B7A324 /* Inter-UI-Medium.otf */,
|
||||
55C386212185E83600B7A324 /* Inter-UI-Regular.otf */,
|
||||
983F07442119C9D2004133ED /* message.wav */,
|
||||
2028E0111D4275BD00227DCD /* SF */,
|
||||
B23B48FE1E76917B006D4535 /* RobotoMono-Medium.ttf */,
|
||||
@ -1071,7 +1080,6 @@
|
||||
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
|
||||
20B6B6891D92C42700CC5C6A /* Embed Frameworks */,
|
||||
E3914A731DF919ED00EBB515 /* Run Script */,
|
||||
D286FF71BA61530E740B7C82 /* Strip Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@ -1653,8 +1661,11 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
55C386232185E83600B7A324 /* Inter-UI-Medium.otf in Resources */,
|
||||
983F077E2119C9D2004133ED /* message.wav in Resources */,
|
||||
74B758FC20D7C00B003343C3 /* launch-image-universal.storyboard in Resources */,
|
||||
55C386252185E83600B7A324 /* Inter-UI-Bold.otf in Resources */,
|
||||
55C386242185E83600B7A324 /* Inter-UI-Regular.otf in Resources */,
|
||||
B2F2D1BC1D9D531B00B7B453 /* Images.xcassets in Resources */,
|
||||
92A0DF7D1F4DE3A4002051BC /* GoogleService-Info.plist in Resources */,
|
||||
);
|
||||
@ -1675,7 +1686,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "set -o errexit\nexport NODE_BINARY=\"node --max-old-space-size=8192\"\n../node_modules/react-native/scripts/react-native-xcode.sh";
|
||||
shellScript = "set -o errexit\nexport NODE_BINARY=\"node --max-old-space-size=8192\"\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
|
||||
};
|
||||
2EAC54E16AB243C3EBBFE1BA /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
|
@ -96,6 +96,12 @@
|
||||
<false/>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<true/>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>Inter-UI-Bold.otf</string>
|
||||
<string>Inter-UI-Medium.otf</string>
|
||||
<string>Inter-UI-Regular.otf</string>
|
||||
</array>
|
||||
<key>ITSEncryptionExportComplianceCode</key>
|
||||
<string>1aa92c4d-6194-4d7d-b70a-16b48256b87e</string>
|
||||
</dict>
|
||||
|
BIN
ios/fonts/Inter-UI-Bold.otf
Normal file
BIN
ios/fonts/Inter-UI-Bold.otf
Normal file
Binary file not shown.
BIN
ios/fonts/Inter-UI-Medium.otf
Normal file
BIN
ios/fonts/Inter-UI-Medium.otf
Normal file
Binary file not shown.
BIN
ios/fonts/Inter-UI-Regular.otf
Normal file
BIN
ios/fonts/Inter-UI-Regular.otf
Normal file
Binary file not shown.
BIN
resources/fonts/Inter-UI-Bold.otf
Normal file
BIN
resources/fonts/Inter-UI-Bold.otf
Normal file
Binary file not shown.
BIN
resources/fonts/Inter-UI-Medium.otf
Normal file
BIN
resources/fonts/Inter-UI-Medium.otf
Normal file
Binary file not shown.
BIN
resources/fonts/Inter-UI-Regular.otf
Normal file
BIN
resources/fonts/Inter-UI-Regular.otf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -26,9 +26,9 @@ external_modules_dir=( \
|
||||
)
|
||||
|
||||
external_fonts=( \
|
||||
'../../../../../resources/fonts/SF-Pro-Text-Regular.otf' \
|
||||
'../../../../../resources/fonts/SF-Pro-Text-Medium.otf' \
|
||||
'../../../../../resources/fonts/SF-Pro-Text-Light.otf' \
|
||||
'../../../../../resources/fonts/Inter-UI-Bold.otf' \
|
||||
'../../../../../resources/fonts/Inter-UI-Medium.otf' \
|
||||
'../../../../../resources/fonts/Inter-UI-Regular.otf' \
|
||||
)
|
||||
|
||||
function is_macos() {
|
||||
|
@ -1,24 +1,4 @@
|
||||
(ns status-im.android.platform)
|
||||
|
||||
(def fonts
|
||||
{:default {:font-family "Roboto"}
|
||||
:medium {:font-family "Roboto" :font-weight "500"}
|
||||
:bold {:font-family "Roboto"
|
||||
:font-weight "bold"}
|
||||
:toolbar-title {:font-family "Roboto" :font-weight "500"}
|
||||
:toolbar-subtitle {:font-family "Roboto"}
|
||||
:monospace {:font-family "monospace" :font-weight "bold"}})
|
||||
|
||||
;; Structure to be exported
|
||||
|
||||
(def platform-specific
|
||||
{:fonts fonts
|
||||
:tabs {:tab-shadows? true}
|
||||
:chats {:action-button? true
|
||||
:new-chat-in-toolbar? false
|
||||
:render-separator? false}
|
||||
:contacts {:action-button? true
|
||||
:new-contact-in-toolbar? false}
|
||||
:group-block-shadows? true
|
||||
:discover {:uppercase-subtitles? false}
|
||||
:status-bar-default-height 25})
|
||||
{:status-bar-default-height 25})
|
||||
|
@ -1,29 +1,6 @@
|
||||
(ns status-im.desktop.platform)
|
||||
|
||||
(def fonts-macos
|
||||
{:default {:font-family "SFProText-Regular"}
|
||||
:medium {:font-family "SFProText-Medium"}
|
||||
|
||||
:toolbar-title {:font-family "SFProText-Regular"}
|
||||
:monospace {:font-family "RobotoMono-Medium"}})
|
||||
|
||||
(def fonts-linux
|
||||
{:default {:font-family "Arial" :font-weight "400"}
|
||||
:medium {:font-family "Arial" :font-weight "800"}
|
||||
|
||||
:toolbar-title {:font-family "Arial" :font-weight "400"}
|
||||
:monospace {:font-family "RobotoMono-Medium"}})
|
||||
|
||||
;; Structure to be exported
|
||||
|
||||
(defn platform-specific [macos]
|
||||
{:fonts (if macos fonts-macos fonts-linux)
|
||||
:tabs {:tab-shadows? true}
|
||||
:chats {:action-button? true
|
||||
:new-chat-in-toolbar? false
|
||||
:render-separator? false}
|
||||
:contacts {:action-button? true
|
||||
:new-contact-in-toolbar? false}
|
||||
:group-block-shadows? true
|
||||
:discover {:uppercase-subtitles? false}
|
||||
:status-bar-default-height 25})
|
||||
(def platform-specific
|
||||
{:status-bar-default-height 25})
|
||||
|
@ -1,16 +1,6 @@
|
||||
(ns status-im.ios.platform
|
||||
(:require [status-im.react-native.js-dependencies :as rn-dependencies]))
|
||||
|
||||
(def fonts
|
||||
{:default {:font-weight "normal"}
|
||||
:medium {:font-weight "500"
|
||||
:letter-spacing 1}
|
||||
:bold {:font-weight "bold"}
|
||||
:toolbar-title {:font-weight "bold"}
|
||||
:toolbar-subtitle {:font-weight "normal"}
|
||||
:monospace {:font-family "Menlo"
|
||||
:font-weight "bold"}})
|
||||
|
||||
;; iPhone X dimensions
|
||||
(def x-height 812)
|
||||
(def xs-height 896)
|
||||
@ -22,13 +12,4 @@
|
||||
(or (= height x-height) (= height xs-height))))
|
||||
|
||||
(def platform-specific
|
||||
{:fonts fonts
|
||||
:tabs {:tab-shadows? false}
|
||||
:chats {:action-button? false
|
||||
:new-chat-in-toolbar? true
|
||||
:render-separator? true}
|
||||
:contacts {:action-button? false
|
||||
:new-contact-in-toolbar? true}
|
||||
:group-block-shadows? false
|
||||
:discover {:uppercase-subtitles? true}
|
||||
:status-bar-default-height (if (iphone-x-dimensions?) 0 20)})
|
||||
{:status-bar-default-height (if (iphone-x-dimensions?) 0 20)})
|
||||
|
@ -1,19 +0,0 @@
|
||||
(ns status-im.ui.screens.chat.input.utils
|
||||
(:require [taoensso.timbre :as log]
|
||||
[status-im.ui.components.toolbar.styles :as toolbar-st]
|
||||
[status-im.utils.platform :as p]))
|
||||
|
||||
(def min-height 19)
|
||||
(def default-height 300)
|
||||
|
||||
(defn default-container-area-height [bottom screen-height]
|
||||
(let [status-bar-height (get p/platform-specific :status-bar-default-height)]
|
||||
(if (> (+ bottom default-height status-bar-height) screen-height)
|
||||
(- screen-height bottom status-bar-height)
|
||||
default-height)))
|
||||
|
||||
(defn max-container-area-height [bottom screen-height]
|
||||
(let [status-bar-height (get p/platform-specific :status-bar-default-height)
|
||||
toolbar-height (:height toolbar-st/toolbar)
|
||||
margin-top (+ status-bar-height (/ toolbar-height 2))]
|
||||
(- screen-height bottom margin-top)))
|
@ -17,7 +17,6 @@
|
||||
(defn signing-word [word]
|
||||
[react/view styles/signing-word
|
||||
[react/text {:style styles/signing-word-text
|
||||
:font :monospace
|
||||
:number-of-lines 1}
|
||||
word]])
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
(cond
|
||||
android? android/platform-specific
|
||||
ios? ios/platform-specific
|
||||
:else (desktop/platform-specific (if platform (.-isMacOs platform) true))))
|
||||
:else desktop/platform-specific))
|
||||
|
||||
(defn no-backup-directory []
|
||||
(cond
|
||||
|
Loading…
x
Reference in New Issue
Block a user