diff --git a/android/app/src/main/assets/fonts/AntDesign.ttf b/android/app/src/main/assets/fonts/AntDesign.ttf new file mode 100644 index 00000000..2abf0354 Binary files /dev/null and b/android/app/src/main/assets/fonts/AntDesign.ttf differ diff --git a/android/app/src/main/assets/fonts/EvilIcons.ttf b/android/app/src/main/assets/fonts/EvilIcons.ttf index b270f985..6868f7bb 100644 Binary files a/android/app/src/main/assets/fonts/EvilIcons.ttf and b/android/app/src/main/assets/fonts/EvilIcons.ttf differ diff --git a/android/app/src/main/assets/fonts/Feather.ttf b/android/app/src/main/assets/fonts/Feather.ttf index 244854c5..fc963dfe 100755 Binary files a/android/app/src/main/assets/fonts/Feather.ttf and b/android/app/src/main/assets/fonts/Feather.ttf differ diff --git a/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf b/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf new file mode 100644 index 00000000..953d567b Binary files /dev/null and b/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf differ diff --git a/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf b/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf new file mode 100644 index 00000000..235101c2 Binary files /dev/null and b/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf differ diff --git a/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf b/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf new file mode 100644 index 00000000..7c92e986 Binary files /dev/null and b/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf differ diff --git a/android/app/src/main/assets/fonts/Ionicons.ttf b/android/app/src/main/assets/fonts/Ionicons.ttf index 307ad889..67bd8420 100644 Binary files a/android/app/src/main/assets/fonts/Ionicons.ttf and b/android/app/src/main/assets/fonts/Ionicons.ttf differ diff --git a/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf b/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf index 82524a0c..42a11c88 100644 Binary files a/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf and b/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf differ diff --git a/android/app/src/main/assets/fonts/Octicons.ttf b/android/app/src/main/assets/fonts/Octicons.ttf index 09f5a96c..0ffe00b9 100644 Binary files a/android/app/src/main/assets/fonts/Octicons.ttf and b/android/app/src/main/assets/fonts/Octicons.ttf differ diff --git a/ios/StandardNotes.xcodeproj/project.pbxproj b/ios/StandardNotes.xcodeproj/project.pbxproj index 3beabf54..bcb6d4aa 100644 --- a/ios/StandardNotes.xcodeproj/project.pbxproj +++ b/ios/StandardNotes.xcodeproj/project.pbxproj @@ -5,7 +5,6 @@ }; objectVersion = 46; objects = { - /* Begin PBXBuildFile section */ 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; @@ -54,6 +53,10 @@ CDB58A211F6C51A4009EF868 /* libReactNativeFingerprintScanner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CDB58A0F1F6C5174009EF868 /* libReactNativeFingerprintScanner.a */; }; CDB58A221F6C5235009EF868 /* libRCTAes.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CDB58A091F6C516B009EF868 /* libRCTAes.a */; }; F0D84FDB75374348BC0017C2 /* libBugsnagReactNative.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EFD3F9197A5F41C0904D7E60 /* libBugsnagReactNative.a */; }; + 840E2D03A7CE4291AA2D3383 /* AntDesign.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 131C577CAE5F4B7D8CFF1197 /* AntDesign.ttf */; }; + C8B404E3920D47309C9C2715 /* FontAwesome5_Brands.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A496722EFEC343B481330DA7 /* FontAwesome5_Brands.ttf */; }; + 5A8928DC2824482A99763067 /* FontAwesome5_Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EF2E9E34ADA441EDB4CE8370 /* FontAwesome5_Regular.ttf */; }; + 3B66E39D04514331AF08A4D1 /* FontAwesome5_Solid.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 074A7613CE8C41BAB3C4193E /* FontAwesome5_Solid.ttf */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -498,6 +501,10 @@ CEB6B877AE784055A8E294A8 /* libRNFS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNFS.a; sourceTree = ""; }; D38724A93AC141D6B51D1356 /* Foundation.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Foundation.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Foundation.ttf"; sourceTree = ""; }; EFD3F9197A5F41C0904D7E60 /* libBugsnagReactNative.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libBugsnagReactNative.a; sourceTree = ""; }; + 131C577CAE5F4B7D8CFF1197 /* AntDesign.ttf */ = {isa = PBXFileReference; name = "AntDesign.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + A496722EFEC343B481330DA7 /* FontAwesome5_Brands.ttf */ = {isa = PBXFileReference; name = "FontAwesome5_Brands.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + EF2E9E34ADA441EDB4CE8370 /* FontAwesome5_Regular.ttf */ = {isa = PBXFileReference; name = "FontAwesome5_Regular.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + 074A7613CE8C41BAB3C4193E /* FontAwesome5_Solid.ttf */ = {isa = PBXFileReference; name = "FontAwesome5_Solid.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -701,6 +708,10 @@ 0752A2CAF82B4C9198CAC803 /* SimpleLineIcons.ttf */, 00457F9447544666906F6C53 /* Zocial.ttf */, 2416263A135F439AA3C5F9D2 /* Feather.ttf */, + 131C577CAE5F4B7D8CFF1197 /* AntDesign.ttf */, + A496722EFEC343B481330DA7 /* FontAwesome5_Brands.ttf */, + EF2E9E34ADA441EDB4CE8370 /* FontAwesome5_Regular.ttf */, + 074A7613CE8C41BAB3C4193E /* FontAwesome5_Solid.ttf */, ); name = Resources; sourceTree = ""; @@ -1528,6 +1539,10 @@ 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 965031D980094619B7DBA0FD /* Ionicons.ttf in Resources */, CD399CE421E181C7006106AE /* Red@3x.png in Resources */, + 840E2D03A7CE4291AA2D3383 /* AntDesign.ttf in Resources */, + C8B404E3920D47309C9C2715 /* FontAwesome5_Brands.ttf in Resources */, + 5A8928DC2824482A99763067 /* FontAwesome5_Regular.ttf in Resources */, + 3B66E39D04514331AF08A4D1 /* FontAwesome5_Solid.ttf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ios/StandardNotes/Info.plist b/ios/StandardNotes/Info.plist index 91d276c8..549a8c7b 100644 --- a/ios/StandardNotes/Info.plist +++ b/ios/StandardNotes/Info.plist @@ -52,30 +52,30 @@ - CFBundleIcons~ipad - - CFBundlePrimaryIcon - - CFBundleIconFiles - - Blue - - UIPrerenderedIcon - - - CFBundleAlternateIcons - - Red - - CFBundleIconFiles - - Red - - UIPrerenderedIcon - - - - + CFBundleIcons~ipad + + CFBundlePrimaryIcon + + CFBundleIconFiles + + Blue + + UIPrerenderedIcon + + + CFBundleAlternateIcons + + Red + + CFBundleIconFiles + + Red + + UIPrerenderedIcon + + + + NSAppTransportSecurity NSExceptionDomains @@ -90,7 +90,7 @@ NSFaceIDUsageDescription Face ID is required to unlock your notes. NSLocationWhenInUseUsageDescription - + UIAppFonts Entypo.ttf @@ -104,6 +104,10 @@ SimpleLineIcons.ttf Zocial.ttf Feather.ttf + AntDesign.ttf + FontAwesome5_Brands.ttf + FontAwesome5_Regular.ttf + FontAwesome5_Solid.ttf UILaunchStoryboardName LaunchScreen diff --git a/package-lock.json b/package-lock.json index 79c08784..d1166421 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3372,8 +3372,7 @@ "camelcase": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" }, "capture-exit": { "version": "1.2.0", @@ -4013,7 +4012,6 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, "requires": { "cross-spawn": "5.1.0", "get-stream": "3.0.0", @@ -9217,7 +9215,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "dev": true, "requires": { "execa": "0.7.0", "lcid": "1.0.0", @@ -10517,20 +10514,15 @@ } }, "react-native-vector-icons": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-4.6.0.tgz", - "integrity": "sha512-rpfhfPiXCK2PX1nrNhdxSMrEGB/Gw/SvKoPM0G2wAkSoqynnes19K0VYI+Up7DqR1rFIpE4hP2erpT1tNx2tfg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-6.1.0.tgz", + "integrity": "sha512-1GF5I4VWgwnzBtVfAKNgEiR5ziHi5QaKL381wwApMzuiFgIJMNt5XIChuKwKoaiB86s+P5iMcYWxYCyENL96lA==", "requires": { "lodash": "4.17.11", "prop-types": "15.6.2", "yargs": "8.0.2" }, "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" - }, "cliui": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", @@ -10553,20 +10545,6 @@ } } }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - } - }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -10594,16 +10572,6 @@ "strip-bom": "3.0.0" } }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" - } - }, "path-type": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", @@ -10636,11 +10604,6 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, "yargs": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", @@ -12635,8 +12598,7 @@ "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, "wordwrap": { "version": "1.0.0", diff --git a/package.json b/package.json index f099aefe..d8f06d47 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "react-native-gesture-handler": "^1.0.12", "react-native-keychain": "^1.2.1", "react-native-store-review": "^0.1.3", - "react-native-vector-icons": "^4.3.0", + "react-native-vector-icons": "6.1.0", "react-navigation": "^3.0.9", "react-navigation-header-buttons": "^2.1.1", "regenerator": "^0.13.3", diff --git a/src/App.js b/src/App.js index fab4e7a4..79c7e8f9 100644 --- a/src/App.js +++ b/src/App.js @@ -5,7 +5,6 @@ import { createStackNavigator, createAppContainer, createDrawerNavigator, Drawer import KeysManager from './lib/keysManager' import StyleKit from "./style/StyleKit" -import Icons from '@Style/Icons'; import ApplicationState from "@Lib/ApplicationState" import Auth from './lib/sfjs/authManager' import ModelManager from './lib/sfjs/modelManager' @@ -146,10 +145,7 @@ export default class App extends Component { async loadInitialData() { await StyleKit.get().resolveInitialTheme(); - await Promise.all([ - Icons.get().loadIcons(), - KeysManager.get().loadInitialData(), - ]) + await KeysManager.get().loadInitialData(); let ready = () => { ApplicationState.get().receiveApplicationStartEvent(); diff --git a/src/screens/Compose.js b/src/screens/Compose.js index 8cf597f1..1a5c7a8e 100644 --- a/src/screens/Compose.js +++ b/src/screens/Compose.js @@ -9,7 +9,6 @@ import SideMenuManager from "@SideMenu/SideMenuManager" import Abstract from "./Abstract" import Webview from "./Webview" import ComponentManager from '@Lib/componentManager' -import Icons from '@Style/Icons'; import ApplicationState from "@Lib/ApplicationState" import LockedView from "@Containers/LockedView"; import Icon from 'react-native-vector-icons/Ionicons'; @@ -38,7 +37,7 @@ export default class Compose extends Abstract { title: "Compose", rightButton: { title: null, - iconName: "ios-menu-outline", + iconName: StyleKit.nameForIcon("menu"), } } return Abstract.getDefaultNavigationOptions({navigation, navigationOptions, templateOptions}); @@ -122,7 +121,7 @@ export default class Compose extends Abstract { title: 'Compose', rightButton: { title: null, - iconName: "ios-menu-outline", + iconName: StyleKit.nameForIcon("menu"), onPress: () => { this.props.navigation.openRightDrawer(); } @@ -371,7 +370,7 @@ export default class Compose extends Abstract { {this.note.locked && - + Note Locked } diff --git a/src/screens/Notes/Notes.js b/src/screens/Notes/Notes.js index 32d13b63..28b6a724 100644 --- a/src/screens/Notes/Notes.js +++ b/src/screens/Notes/Notes.js @@ -18,7 +18,6 @@ import NoteList from "@Screens/Notes/NoteList" import OptionsState from "@Lib/OptionsState" import LockedView from "@Containers/LockedView" import ApplicationState from "@Lib/ApplicationState" - import Icon from 'react-native-vector-icons/Ionicons'; import FAB from 'react-native-fab'; @@ -34,7 +33,7 @@ export default class Notes extends Abstract { title: "Notes", leftButton: { title: null, - iconName: "ios-menu-outline", + iconName: StyleKit.nameForIcon("menu"), onPress: () => { this.props.navigation.openLeftDrawer(); } @@ -323,7 +322,9 @@ export default class Notes extends Abstract { iconTextColor={StyleKit.variable("stylekitInfoContrastColor")} onClickAction={() => {this.handleSelection()}} visible={true} - iconTextComponent={} + size={30} + paddingTop={1} + iconTextComponent={} /> ); diff --git a/src/screens/SideMenu/MainSideMenu.js b/src/screens/SideMenu/MainSideMenu.js index ae65f97d..18452d5e 100644 --- a/src/screens/SideMenu/MainSideMenu.js +++ b/src/screens/SideMenu/MainSideMenu.js @@ -14,7 +14,6 @@ import SectionHeader from "@Components/SectionHeader"; import TableSection from "@Components/TableSection"; import LockedView from "@Containers/LockedView"; -import Icons from '@Style/Icons'; import StyleKit from "@Style/StyleKit" import SideMenuManager from "@SideMenu/SideMenuManager" @@ -117,8 +116,14 @@ export default class MainSideMenu extends AbstractSideMenu { // Red and Blue default if(themes.length == 2) { options.push(SideMenuSection.BuildOption({ - text: "Get Themes", + text: "Get More Themes", key: "get-theme", + iconDesc: { + type: "icon", + name: StyleKit.nameForIcon("brush"), + side: "right", + size: 17 + }, onSelect: () => { Linking.openURL("https://standardnotes.org/extensions")}, })); } @@ -171,7 +176,9 @@ export default class MainSideMenu extends AbstractSideMenu { iconTextColor={StyleKit.variables.stylekitInfoContrastColor} onClickAction={() => {this.presentSettings()}} visible={true} - iconTextComponent={} + size={29} + paddingTop={2} + iconTextComponent={} /> diff --git a/src/screens/SideMenu/NoteSideMenu.js b/src/screens/SideMenu/NoteSideMenu.js index 06e86896..cb0f6b8d 100644 --- a/src/screens/SideMenu/NoteSideMenu.js +++ b/src/screens/SideMenu/NoteSideMenu.js @@ -13,7 +13,6 @@ import TableSection from "@Components/TableSection"; import LockedView from "@Containers/LockedView"; import ItemActionManager from "@Lib/itemActionManager" -import Icons from '@Style/Icons'; import StyleKit from "@Style/StyleKit" import ActionSheetWrapper from "@Style/ActionSheetWrapper" import ModelManager from '@SFJS/modelManager' @@ -144,7 +143,7 @@ export default class NoteSideMenu extends AbstractSideMenu { let option = SideMenuSection.BuildOption({ text: rawOption.text, key: rawOption.key, - iconDesc: { type: "icon", side: "right", name: Icons.nameForIcon(rawOption.icon) }, + iconDesc: { type: "icon", side: "right", name: StyleKit.nameForIcon(rawOption.icon) }, onSelect: () => { let run = () => { ItemActionManager.handleEvent(rawOption.key, this.note, () => { @@ -195,11 +194,19 @@ export default class NoteSideMenu extends AbstractSideMenu { options.push(option); } + + console.log("Editor options", editors); // Default - if(editors.length == 1) { + if(options.length == 1) { options.push(SideMenuSection.BuildOption({ - text: "Get Editors", + text: "Get More Editors", key: "get-editors", + iconDesc: { + type: "icon", + name: StyleKit.nameForIcon("medical"), + side: "right", + size: 17 + }, onSelect: () => { Linking.openURL("https://standardnotes.org/extensions")}, })); } @@ -232,7 +239,12 @@ export default class NoteSideMenu extends AbstractSideMenu { - + @@ -242,7 +254,9 @@ export default class NoteSideMenu extends AbstractSideMenu { iconTextColor={StyleKit.variables.stylekitInfoContrastColor} onClickAction={() => {this.presentNewTag()}} visible={true} - iconTextComponent={} + size={30} + paddingTop={1} + iconTextComponent={} /> {this.state.actionSheet && this.state.actionSheet} diff --git a/src/screens/SideMenu/SideMenuCell.js b/src/screens/SideMenu/SideMenuCell.js index 401ba543..df79cde5 100644 --- a/src/screens/SideMenu/SideMenuCell.js +++ b/src/screens/SideMenu/SideMenuCell.js @@ -3,7 +3,6 @@ import { ScrollView, View, Text, TouchableOpacity } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; import ThemedComponent from "@Components/ThemedComponent"; -import Icons from '@Style/Icons'; import StyleKit from "@Style/StyleKit" import Circle from "@Components/Circle" @@ -40,7 +39,7 @@ export default class SideMenuCell extends ThemedComponent { if(desc.type == "icon") { return ( - + ) } else if(desc.type == "ascii") { @@ -125,7 +124,7 @@ export default class SideMenuCell extends ThemedComponent { iconContainerRight: { marginLeft: 6, - marginRight: 6, + marginRight: 4, height: "100%", }, @@ -147,11 +146,19 @@ export default class SideMenuCell extends ThemedComponent { }, iconGraphic: { - marginTop: -3 + marginTop: -3, + width: 20, + flex: 1, + justifyContent: "center", + alignItems: "center" }, iconCircle: { - marginTop: -5 + marginTop: -5, + width: 20, + flex: 1, + justifyContent: "center", + alignItems: "center" }, iconAscii: { diff --git a/src/screens/SideMenu/SideMenuHero.js b/src/screens/SideMenu/SideMenuHero.js index 2af8050d..150f458a 100644 --- a/src/screens/SideMenu/SideMenuHero.js +++ b/src/screens/SideMenu/SideMenuHero.js @@ -5,7 +5,6 @@ import Auth from "@SFJS/authManager" import KeysManager from "@Lib/keysManager" import ModelManager from "@SFJS/modelManager" -import Icons from '@Style/Icons'; import StyleKit from "@Style/StyleKit" import ThemedComponent from "@Components/ThemedComponent"; diff --git a/src/screens/SideMenu/SideMenuSection.js b/src/screens/SideMenu/SideMenuSection.js index 57dd8f17..0598e3e9 100644 --- a/src/screens/SideMenu/SideMenuSection.js +++ b/src/screens/SideMenu/SideMenuSection.js @@ -2,7 +2,6 @@ import React, { Component, Fragment } from 'react'; import { ScrollView, View, Text, TouchableOpacity } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; -import Icons from '@Style/Icons'; import StyleKit from "@Style/StyleKit" import SideMenuCell from "@SideMenu/SideMenuCell" import ThemedComponent from "@Components/ThemedComponent"; diff --git a/src/screens/SideMenu/TagSelectionList.js b/src/screens/SideMenu/TagSelectionList.js index 58102ce0..1ccb43a0 100644 --- a/src/screens/SideMenu/TagSelectionList.js +++ b/src/screens/SideMenu/TagSelectionList.js @@ -7,7 +7,6 @@ import ItemActionManager from '@Lib/itemActionManager' import ModelManager from '@SFJS/modelManager' import Auth from "@SFJS/authManager" -import Icons from '@Style/Icons'; import StyleKit from "@Style/StyleKit" import SideMenuCell from "@SideMenu/SideMenuCell" @@ -166,7 +165,7 @@ class TagSelectionList extends ThemedComponent { emptyPlaceholderText: { color: StyleKit.variables.stylekitForegroundColor, opacity: 0.6, - paddingRight: 40, + paddingRight: 30, lineHeight: 18 } } diff --git a/src/style/ActionSheetWrapper.js b/src/style/ActionSheetWrapper.js index 56974d5c..9bb5d798 100644 --- a/src/style/ActionSheetWrapper.js +++ b/src/style/ActionSheetWrapper.js @@ -1,6 +1,5 @@ import React, {Component} from 'react'; import { StyleSheet, StatusBar, Alert, Platform, Dimensions } from 'react-native'; -import Icons from '@Style/Icons'; import StyleKit from "@Style/StyleKit" import ActionSheet from 'react-native-actionsheet' import ApplicationState from "@Lib/ApplicationState" diff --git a/src/style/Icons.js b/src/style/Icons.js deleted file mode 100644 index f2c1ad7a..00000000 --- a/src/style/Icons.js +++ /dev/null @@ -1,67 +0,0 @@ -const Ionicons = require('react-native-vector-icons/Ionicons'); -import { Platform } from 'react-native'; -import StyleKit from "@Style/StyleKit" - -let iconsMap = {}; - -export default class Icons { - - static instance = null; - - static get() { - if (this.instance == null) { - this.instance = new Icons(); - } - - return this.instance; - } - - static getIcon(name) { - return iconsMap[name]; - } - - constructor() { - this.loadIcons(); - } - - static nameForIcon(iconName) { - const iconPrefix = Platform.OS == "android" ? "md" : "ios"; - const suffix = Platform.OS == "android" ? "" : "-outline"; - return iconPrefix + "-" + iconName + suffix; - } - - async loadIcons(callback) { - var color = StyleKit.variables.stylekitBackgroundColor; - - let icons = { - "ios-menu-outline": [Ionicons, 25, color], - "ios-contact-outline": [Ionicons, 25, color], - "ios-flag": [Ionicons, 25, color], - - "md-add" : [Ionicons, 25, color], - "md-bookmark" : [Ionicons, 25, color], - "md-pricetag" : [Ionicons, 25, color], - "md-menu" : [Ionicons, 25, color], - "md-more" : [Ionicons, 25, color], - "md-settings" : [Ionicons, 25, color], - "md-information-circle" : [Ionicons, 25, color], - }; - - return new Promise((resolve, reject) => { - new Promise.all( - Object.keys(icons).map(iconName => - icons[iconName][0].getImageSource( - iconName, - icons[iconName][1], - icons[iconName][2] - )) - ).then(sources => { - Object.keys(icons).forEach((iconName, idx) => { - iconsMap[iconName] = sources[idx] - }) - resolve(true); - }) - }); - } - -} diff --git a/src/style/StyleKit.js b/src/style/StyleKit.js index 01916b8e..dcacd039 100644 --- a/src/style/StyleKit.js +++ b/src/style/StyleKit.js @@ -8,7 +8,6 @@ import Auth from "@Lib/sfjs/authManager" import KeysManager from '@Lib/keysManager' import CSSParser from "@Style/Util/CSSParser"; import ThemeDownloader from "@Style/Util/ThemeDownloader" -import Icons from '@Style/Icons'; import IconChanger from 'react-native-alternate-icons'; import redJSON from './Themes/red.json'; @@ -263,8 +262,6 @@ export default class StyleKit { this.reloadStyles(); - Icons.get().loadIcons(); - this.notifyObserversOfThemeChange(); } @@ -522,6 +519,11 @@ export default class StyleKit { } } + static nameForIcon(iconName) { + const iconPrefix = Platform.OS == "android" ? "md" : "ios"; + return iconPrefix + "-" + iconName; + } + static getColorLuminosity(hexCode) { var c = hexCode; c = c.substring(1); // strip # diff --git a/vendor/react-native-fab b/vendor/react-native-fab index 2eb49427..912fe3d6 160000 --- a/vendor/react-native-fab +++ b/vendor/react-native-fab @@ -1 +1 @@ -Subproject commit 2eb49427bd31e0e111070dc993038e0ba48bcb42 +Subproject commit 912fe3d60ed2b734a52e2180f2fc127c32d91a0f