Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix text input color and update app version display #38

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mobile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ clean_install: clean node_modules
.PHONY: clean_install

release.ios: node_modules
npx expo install --chec
npx expo install --check
npm run ts:check
eas build --platform ios --profile production
@echo "iOS build done. Now it's time to run `eas submit --platform ios` or user Transporter https://apps.apple.com/us/app/transporter/id1450874784?mt=12"
Expand Down
23 changes: 12 additions & 11 deletions mobile/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Stack } from "expo-router";
import { DefaultTheme, ThemeProvider } from "@react-navigation/native";
import { ThemeProvider } from "@react-navigation/native";
import { Guard } from "@/components/auth/guard";
import { GnoNativeProvider } from "@gnolang/gnonative";
import { LinkingProvider, ReduxProvider } from "@/providers";
import { DefaultTheme } from "@/assets/styles";

const gnoDefaultConfig = {
// @ts-ignore
Expand All @@ -16,16 +17,16 @@ export default function AppLayout() {
<GnoNativeProvider config={gnoDefaultConfig}>
<ReduxProvider>
<ThemeProvider value={DefaultTheme}>
<LinkingProvider>
<Guard>
<Stack
screenOptions={{
headerShown: false,
headerLargeTitle: true,
headerBackVisible: false,
}}
/>
</Guard>
<LinkingProvider>
<Guard>
<Stack
screenOptions={{
headerShown: false,
headerLargeTitle: true,
headerBackVisible: false,
}}
/>
</Guard>
</LinkingProvider>
</ThemeProvider>
</ReduxProvider>
Expand Down
8 changes: 4 additions & 4 deletions mobile/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function Root() {

const dispatch = useAppDispatch();

const appVersion = Application.nativeApplicationVersion;
const appVersion = Application.nativeBuildVersion;

const appInitialized = useAppSelector(selectInitialized)
const hasMasterPassword = useAppSelector(selectMasterPassword)
Expand Down Expand Up @@ -73,9 +73,9 @@ export default function Root() {
<Layout.Container>
<Layout.BodyAlignedBotton>
<View style={{ alignItems: "center" }}>
<Text.Title>gnoKey Mobile</Text.Title>
<Text.Body>Key Management Tool</Text.Body>
<Text.Caption1>v{appVersion}</Text.Caption1>
<Text.Title>GnoKey Mobile</Text.Title>
<Text.Body>The Gno Key Management Tool</Text.Body>
<Text.Caption1>Build Version: {appVersion}</Text.Caption1>
</View>

<ScrollView contentContainerStyle={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}
Expand Down
3 changes: 3 additions & 0 deletions mobile/assets/styles/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { DefaultTheme } from './themes/default-theme';

export { DefaultTheme };
13 changes: 13 additions & 0 deletions mobile/assets/styles/themes/default-theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { Theme } from '@react-navigation/native';

export const DefaultTheme: Theme = {
dark: false,
colors: {
primary: 'rgb(0, 122, 255)',
background: '#FFFFFF',
card: 'rgb(255, 255, 255)',
text: 'rgb(28, 28, 30)',
border: 'rgb(216, 216, 216)',
notification: 'rgb(255, 59, 48)',
}
}
10 changes: 7 additions & 3 deletions mobile/components/textinput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export const TextInput = React.forwardRef<RNTextInput, Props>((props, ref) => {
return (
<Container style={props.containerStyle}>
{children ? <LeftChildren>{children}</LeftChildren> : null}
<TextInputBase autoCapitalize="none" autoCorrect={false} {...rest} ref={ref} secureTextEntry={isSecureText} />
<TextInputBase autoCapitalize="none"
placeholderTextColor="#727274"
autoCorrect={false} {...rest} ref={ref} secureTextEntry={isSecureText} />

{rest.secureTextEntry ? (
<ToggleIcon>
Expand All @@ -30,7 +32,8 @@ const Container = styled.View<Props>`
flex-direction: row;
align-items: center;
border-width: 1px;
border-color: ${(props) => (props.error ? "red" : "black")};
border-color: ${(props) => (props.error ? "#6b6b6d" : "black")};
background-color: #F2F2F2;
border-radius: 4px;
padding: 2px;
margin: 10px 0;
Expand All @@ -42,7 +45,8 @@ const TextInputBase = styled.TextInput.attrs<Props>({
flex: 1;
padding: 8px;
font-size: 16px;
color: ${(props) => (props.editable === false ? "gray" : "black")};
color: ${(props) => (props.editable === false ? "rgb(85, 85, 85)" : "black")};
background-color: #F2F2F2;
height: 48px;
border-width: 0;
`;
Expand Down
1 change: 1 addition & 0 deletions mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"start": "expo start -d",
"android": "expo run:android",
"ios": "expo run:ios",
"ios:release": "npx expo run:ios --configuration Release",
"web": "expo start --web",
"prebuild": "expo prebuild",
"ts:check": "tsc"
Expand Down
Loading