mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 05:27:57 -05:00
refactor(#611): [Vijay] add new input in github action workflow to toggle the themes
This commit is contained in:
2
.env
2
.env
@@ -4,5 +4,7 @@
|
||||
MIMOTO_HOST=https://api.qa-1201-b2.mosip.net
|
||||
#MIMOTO_HOST=http://mock.mimoto.newlogic.dev
|
||||
GOOGLE_NEARBY_MESSAGES_API_KEY=
|
||||
#Application Theme can be ( Default | Purple )
|
||||
APPLICATION_THEME=Purple
|
||||
|
||||
USE_BLE_SHARE=true
|
||||
|
||||
10
.github/workflows/android-custom-build.yml
vendored
10
.github/workflows/android-custom-build.yml
vendored
@@ -11,6 +11,11 @@ on:
|
||||
required: true
|
||||
default: 'https://api.qa-121.mosip.net/residentmobileapp'
|
||||
type: string
|
||||
theme:
|
||||
description: 'Application Theme'
|
||||
required: true
|
||||
default: 'Default'
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-android:
|
||||
@@ -44,13 +49,13 @@ jobs:
|
||||
run: |
|
||||
echo "${{ secrets.ENV_FILE }}" > .env.local > android/local.properties
|
||||
|
||||
- name: Setup branch and env
|
||||
- name: Setup branch and env
|
||||
run: |
|
||||
# Strip git ref prefix from version
|
||||
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
|
||||
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup branch and GPG public key
|
||||
- name: Setup branch and GPG public key
|
||||
run: |
|
||||
# Strip git ref prefix from version
|
||||
|
||||
@@ -69,6 +74,7 @@ jobs:
|
||||
env:
|
||||
MIMOTO_HOST: ${{ github.event.inputs.backendServiceUrl }}
|
||||
FIREBASE_SECRET: ${{ secrets.GPG_SECRET }}
|
||||
APPLICAITON_THEME: ${{ github.event.inputs.theme }}
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
with:
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { DefaultTheme } from './themes/DefaultTheme';
|
||||
import { PurpleTheme } from './themes/PurpleTheme';
|
||||
import { APPLICATION_THEME } from 'react-native-dotenv';
|
||||
|
||||
// To change the theme, CSS theme file has to import and assign it to Theme in line no 6
|
||||
|
||||
export const Theme = PurpleTheme;
|
||||
export const Theme =
|
||||
APPLICATION_THEME == 'Default' ? DefaultTheme : PurpleTheme;
|
||||
|
||||
type SpacingXY = [number, number];
|
||||
type SpacingFull = [number, number, number, number];
|
||||
|
||||
5
types/react-native-dotenv/index.d.ts
vendored
5
types/react-native-dotenv/index.d.ts
vendored
@@ -13,4 +13,9 @@ declare module 'react-native-dotenv' {
|
||||
* Flag for using BLE share library
|
||||
*/
|
||||
export const USE_BLE_SHARE: string;
|
||||
|
||||
/**
|
||||
* Flag for Toggling Purple Theme and Default Theme
|
||||
*/
|
||||
export const APPLICATION_THEME: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user