mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 20:49:16 +00:00
render app version in admin screen
This commit is contained in:
parent
fc5415eb3f
commit
1d33e39a78
@ -669,7 +669,7 @@ SPEC CHECKSUMS:
|
|||||||
FirebaseInstallations: 99d24bac0243cf8b0e96cf5426340d211f0bcc80
|
FirebaseInstallations: 99d24bac0243cf8b0e96cf5426340d211f0bcc80
|
||||||
FirebaseMessaging: 4487bbff9b9b927ba1dd3ea40d1ceb58e4ee3cb5
|
FirebaseMessaging: 4487bbff9b9b927ba1dd3ea40d1ceb58e4ee3cb5
|
||||||
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
|
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
|
||||||
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
|
glog: 3d02b25ca00c2d456734d0bcff864cbc62f6ae1a
|
||||||
GoogleDataTransport: 1c8145da7117bd68bbbed00cf304edb6a24de00f
|
GoogleDataTransport: 1c8145da7117bd68bbbed00cf304edb6a24de00f
|
||||||
GoogleUtilities: 1d20a6ad97ef46f67bbdec158ce00563a671ebb7
|
GoogleUtilities: 1d20a6ad97ef46f67bbdec158ce00563a671ebb7
|
||||||
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
|
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
|
||||||
|
@ -69,6 +69,9 @@ export function Admin() {
|
|||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
<View style={styles.version}>
|
||||||
|
<Text style={styles.versiontext}>v{ state.version }</Text>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</KeyboardAvoidingView>
|
</KeyboardAvoidingView>
|
||||||
);
|
);
|
||||||
|
@ -108,6 +108,13 @@ export const styles = StyleSheet.create({
|
|||||||
nologintext: {
|
nologintext: {
|
||||||
color: Colors.disabled,
|
color: Colors.disabled,
|
||||||
},
|
},
|
||||||
|
version: {
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'flex-end',
|
||||||
|
},
|
||||||
|
versiontext: {
|
||||||
|
color: Colors.grey,
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -17,12 +17,17 @@ export function useAdmin() {
|
|||||||
server: null,
|
server: null,
|
||||||
token: null,
|
token: null,
|
||||||
plainText: false,
|
plainText: false,
|
||||||
|
version: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
const updateState = (value) => {
|
const updateState = (value) => {
|
||||||
setState((s) => ({ ...s, ...value }));
|
setState((s) => ({ ...s, ...value }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
updateState({ version: app.state.version });
|
||||||
|
}, [app]);
|
||||||
|
|
||||||
const checkStatus = async () => {
|
const checkStatus = async () => {
|
||||||
try {
|
try {
|
||||||
updateState({ unclaimed: status });
|
updateState({ unclaimed: status });
|
||||||
|
@ -21,6 +21,7 @@ export function useAppContext() {
|
|||||||
disconnected: null,
|
disconnected: null,
|
||||||
deviceToken: null,
|
deviceToken: null,
|
||||||
loggingOut: false,
|
loggingOut: false,
|
||||||
|
version: getVersion(),
|
||||||
});
|
});
|
||||||
const store = useContext(StoreContext);
|
const store = useContext(StoreContext);
|
||||||
const account = useContext(AccountContext);
|
const account = useContext(AccountContext);
|
||||||
|
Loading…
Reference in New Issue
Block a user