Browse Source

FIX | fix darkmode fonts UI (BANK-256)

merge-requests/94/head
Yevhen Romanenko 3 years ago
parent
commit
a5954e752f
  1. BIN
      android/app/src/main/assets/fonts/Gilroy-Bold.ttf
  2. BIN
      android/app/src/main/assets/fonts/Gilroy-Medium.ttf
  3. BIN
      android/app/src/main/assets/fonts/Gilroy-Regular.ttf
  4. BIN
      android/app/src/main/assets/fonts/Gilroy-Semibold.ttf
  5. 37
      android/app/src/main/res/font/gilroy.xml
  6. BIN
      android/app/src/main/res/font/gilroy_bold.ttf
  7. BIN
      android/app/src/main/res/font/gilroy_medium.ttf
  8. BIN
      android/app/src/main/res/font/gilroy_regular.ttf
  9. BIN
      android/app/src/main/res/font/gilroy_semibold.ttf
  10. 17
      ios/taskme.xcodeproj/project.pbxproj
  11. 6
      ios/taskme/Info.plist
  12. 3
      react-native.config.js
  13. BIN
      src/assets/fonts/Gilroy-Bold.ttf
  14. BIN
      src/assets/fonts/Gilroy-Medium.ttf
  15. BIN
      src/assets/fonts/Gilroy-Regular.ttf
  16. BIN
      src/assets/fonts/Gilroy-Semibold.ttf
  17. 2
      src/config/fonts.ts
  18. 4
      src/modules/settings/components/setting-item.component.tsx
  19. 10
      src/shared/components/elements/txt.component.tsx
  20. 2
      src/shared/components/headers/primary-header.component.tsx

BIN
android/app/src/main/assets/fonts/Gilroy-Bold.ttf

Binary file not shown.

BIN
android/app/src/main/assets/fonts/Gilroy-Medium.ttf

Binary file not shown.

BIN
android/app/src/main/assets/fonts/Gilroy-Regular.ttf

Binary file not shown.

BIN
android/app/src/main/assets/fonts/Gilroy-Semibold.ttf

Binary file not shown.

37
android/app/src/main/res/font/gilroy.xml

@ -0,0 +1,37 @@ @@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:ignore="UnusedAttribute">
<font
android:fontStyle="normal"
android:fontWeight="400"
android:font="@font/gilroy_regular"
app:fontStyle="normal"
app:fontWeight="400"
app:font="@font/gilroy_regular" />
<font
android:fontStyle="normal"
android:fontWeight="500"
android:font="@font/gilroy_medium"
app:fontStyle="normal"
app:fontWeight="500"
app:font="@font/gilroy_medium" />
<font
android:fontStyle="normal"
android:fontWeight="600"
android:font="@font/gilroy_semibold"
app:fontStyle="normal"
app:fontWeight="600"
app:font="@font/gilroy_semibold" />
<font
android:fontStyle="normal"
android:fontWeight="700"
android:font="@font/gilroy_bold"
app:fontStyle="normal"
app:fontWeight="700"
app:font="@font/gilroy_bold" />
</font-family>

BIN
android/app/src/main/res/font/gilroy_bold.ttf

Binary file not shown.

BIN
android/app/src/main/res/font/gilroy_medium.ttf

Binary file not shown.

BIN
android/app/src/main/res/font/gilroy_regular.ttf

Binary file not shown.

BIN
android/app/src/main/res/font/gilroy_semibold.ttf

Binary file not shown.

17
ios/taskme.xcodeproj/project.pbxproj

@ -12,6 +12,10 @@ @@ -12,6 +12,10 @@
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1CEA5DFB26FCA6F700BCC3E1 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CEA5DFA26FCA6F700BCC3E1 /* File.swift */; };
2987B7362760E7DD00D6426B /* Gilroy-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2987B7322760E7DD00D6426B /* Gilroy-Bold.ttf */; };
2987B7372760E7DD00D6426B /* Gilroy-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2987B7332760E7DD00D6426B /* Gilroy-Regular.ttf */; };
2987B7382760E7DD00D6426B /* Gilroy-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2987B7342760E7DD00D6426B /* Gilroy-Medium.ttf */; };
2987B7392760E7DD00D6426B /* Gilroy-Semibold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2987B7352760E7DD00D6426B /* Gilroy-Semibold.ttf */; };
5244945D26B7EA27006A5FAB /* fontello.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 5244945C26B7EA27006A5FAB /* fontello.ttf */; };
6F69E8F66337833783B2D5E0 /* libPods-taskme.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B6C30F16A8285D307DEBF8A /* libPods-taskme.a */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
@ -41,6 +45,10 @@ @@ -41,6 +45,10 @@
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = taskme/main.m; sourceTree = "<group>"; };
1CEA5DF926FCA6F600BCC3E1 /* taskme-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "taskme-Bridging-Header.h"; sourceTree = "<group>"; };
1CEA5DFA26FCA6F700BCC3E1 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; };
2987B7322760E7DD00D6426B /* Gilroy-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Gilroy-Bold.ttf"; path = "../src/assets/fonts/Gilroy-Bold.ttf"; sourceTree = "<group>"; };
2987B7332760E7DD00D6426B /* Gilroy-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Gilroy-Regular.ttf"; path = "../src/assets/fonts/Gilroy-Regular.ttf"; sourceTree = "<group>"; };
2987B7342760E7DD00D6426B /* Gilroy-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Gilroy-Medium.ttf"; path = "../src/assets/fonts/Gilroy-Medium.ttf"; sourceTree = "<group>"; };
2987B7352760E7DD00D6426B /* Gilroy-Semibold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Gilroy-Semibold.ttf"; path = "../src/assets/fonts/Gilroy-Semibold.ttf"; sourceTree = "<group>"; };
5244945C26B7EA27006A5FAB /* fontello.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = fontello.ttf; path = ../src/assets/fonts/fontello.ttf; sourceTree = "<group>"; };
60559287623ADE493014FD74 /* libPods-taskme-taskmeTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-taskme-taskmeTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = taskme/LaunchScreen.storyboard; sourceTree = "<group>"; };
@ -123,6 +131,10 @@ @@ -123,6 +131,10 @@
83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup;
children = (
2987B7322760E7DD00D6426B /* Gilroy-Bold.ttf */,
2987B7342760E7DD00D6426B /* Gilroy-Medium.ttf */,
2987B7332760E7DD00D6426B /* Gilroy-Regular.ttf */,
2987B7352760E7DD00D6426B /* Gilroy-Semibold.ttf */,
5244945C26B7EA27006A5FAB /* fontello.ttf */,
13B07FAE1A68108700A75B9A /* taskme */,
832341AE1AAA6A7D00B99B32 /* Libraries */,
@ -130,6 +142,7 @@ @@ -130,6 +142,7 @@
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
B362F9321C4BC54C6EBF6F61 /* Pods */,
3410F3470FC048E0A263B862 /* Resources */,
);
indentWidth = 2;
sourceTree = "<group>";
@ -253,6 +266,10 @@ @@ -253,6 +266,10 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2987B7362760E7DD00D6426B /* Gilroy-Bold.ttf in Resources */,
2987B7372760E7DD00D6426B /* Gilroy-Regular.ttf in Resources */,
2987B7382760E7DD00D6426B /* Gilroy-Medium.ttf in Resources */,
2987B7392760E7DD00D6426B /* Gilroy-Semibold.ttf in Resources */,
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
5244945D26B7EA27006A5FAB /* fontello.ttf in Resources */,

6
ios/taskme/Info.plist

@ -40,12 +40,16 @@ @@ -40,12 +40,16 @@
<key>NSCameraUsageDescription</key>
<string>Потрібно надати доступ до камери</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<string/>
<key>NSPhotoLibraryUsageDescription</key>
<string>Потрібно надати доступ до галереї</string>
<key>UIAppFonts</key>
<array>
<string>fontello.ttf</string>
<string>Gilroy-Regular.ttf</string>
<string>Gilroy-Medium.ttf</string>
<string>Gilroy-Bold.ttf</string>
<string>Gilroy-Semibold.ttf</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>

3
react-native.config.js

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
module.exports = {
assets: ['./src/assets/fonts'],
}

BIN
src/assets/fonts/Gilroy-Bold.ttf

Binary file not shown.

BIN
src/assets/fonts/Gilroy-Medium.ttf

Binary file not shown.

BIN
src/assets/fonts/Gilroy-Regular.ttf

Binary file not shown.

BIN
src/assets/fonts/Gilroy-Semibold.ttf

Binary file not shown.

2
src/config/fonts.ts

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
export const fonts = {
Gilroy: {
700: 'Gilroy-Bold',
600: 'Gilroy-DemiBold',
600: 'Gilroy-Semibold',
500: 'Gilroy-Medium',
400: 'Gilroy-Regular',
},

4
src/modules/settings/components/setting-item.component.tsx

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
import { $size, IconComponent } from '@/shared'
import { $size, IconComponent, Txt } from '@/shared'
import { useTheme } from '@/shared/hooks/use-theme.hook'
import { PartialTheme } from '@/shared/themes/interfaces'
import React, { FC, useMemo } from 'react'
@ -74,7 +74,7 @@ export const SettingItem: FC<IProps> = props => { @@ -74,7 +74,7 @@ export const SettingItem: FC<IProps> = props => {
size={$size(22)}
style={styles.icon}
/>
<Text style={styles.title}>{props.title}</Text>
<Txt style={styles.title}>{props.title}</Txt>
</View>
{renderAdditionalIcon}
</TouchableOpacity>

10
src/shared/components/elements/txt.component.tsx

@ -3,7 +3,7 @@ import _ from 'lodash' @@ -3,7 +3,7 @@ import _ from 'lodash'
import { Text, TextProps, TextStyle } from 'react-native'
import { config } from '@/config'
// import {getFont} from '@/shared/helpers';
import {getFont} from '@/shared/helpers';
interface TxtProps extends TextProps {
/**
@ -24,10 +24,10 @@ interface TxtProps extends TextProps { @@ -24,10 +24,10 @@ interface TxtProps extends TextProps {
export const Txt = (props: TxtProps) => {
const customStyle: TextStyle = {
// fontFamily: getFont(
// _.defaultTo(props.font, 'Gilroy'),
// _.defaultTo(props.weight, '400'),
// ),
fontFamily: getFont(
_.defaultTo(props.font, 'Gilroy'),
_.defaultTo(props.weight, '400'),
),
}
return <Text {...props} style={[props.style, customStyle]} />

2
src/shared/components/headers/primary-header.component.tsx

@ -68,7 +68,7 @@ const createStyles = (theme: PartialTheme) => @@ -68,7 +68,7 @@ const createStyles = (theme: PartialTheme) =>
},
title: {
fontSize: $size(17, 15),
fontWeight: isAndroid('bold', '600'),
fontWeight: isAndroid('bold', '700'),
color: theme.$textPrimary,
flex: 1,
textAlign: 'center',

Loading…
Cancel
Save