mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-21 08:41:57 +00:00
Update Popup Screen Localization Patch
This commit is contained in:
parent
8677939111
commit
70be0cf8f2
3 changed files with 389 additions and 350 deletions
|
|
@ -13,6 +13,7 @@ import { useTheme } from '../contexts/ThemeContext';
|
|||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import * as Haptics from 'expo-haptics';
|
||||
import AndroidUpdatePopup from './AndroidUpdatePopup';
|
||||
import { t } from 'i18next';
|
||||
|
||||
const { width, height } = Dimensions.get('window');
|
||||
|
||||
|
|
@ -87,41 +88,46 @@ const UpdatePopup: React.FC<UpdatePopupProps> = ({
|
|||
animationType="fade"
|
||||
statusBarTranslucent={true}
|
||||
presentationStyle="overFullScreen"
|
||||
supportedOrientations={['portrait', 'landscape', 'landscape-left', 'landscape-right']}
|
||||
supportedOrientations={[
|
||||
'portrait',
|
||||
'landscape',
|
||||
'landscape-left',
|
||||
'landscape-right',
|
||||
]}
|
||||
>
|
||||
<View style={styles.overlay}>
|
||||
<View style={[
|
||||
<View
|
||||
style={[
|
||||
styles.popup,
|
||||
{
|
||||
backgroundColor: currentTheme.colors.darkBackground || '#1a1a1a',
|
||||
borderColor: currentTheme.colors.elevation2 || '#333333',
|
||||
marginTop: insets.top + 20,
|
||||
marginBottom: insets.bottom + 20,
|
||||
}
|
||||
]}>
|
||||
},
|
||||
]}
|
||||
>
|
||||
{/* Header */}
|
||||
<View style={styles.header}>
|
||||
<View style={[
|
||||
<View
|
||||
style={[
|
||||
styles.iconContainer,
|
||||
{ backgroundColor: `${currentTheme.colors.primary}20` }
|
||||
]}>
|
||||
{ backgroundColor: `${currentTheme.colors.primary}20` },
|
||||
]}
|
||||
>
|
||||
<MaterialIcons
|
||||
name="system-update"
|
||||
size={32}
|
||||
color={currentTheme.colors.primary}
|
||||
/>
|
||||
</View>
|
||||
<Text style={[
|
||||
styles.title,
|
||||
{ color: currentTheme.colors.highEmphasis }
|
||||
]}>
|
||||
Update Available
|
||||
<Text style={[styles.title, { color: currentTheme.colors.highEmphasis }]}>
|
||||
{t('update_popup.update_available')}
|
||||
</Text>
|
||||
<Text style={[
|
||||
styles.subtitle,
|
||||
{ color: currentTheme.colors.mediumEmphasis }
|
||||
]}>
|
||||
A new version of Nuvio is ready to install
|
||||
<Text
|
||||
style={[styles.subtitle, { color: currentTheme.colors.mediumEmphasis }]}
|
||||
>
|
||||
{t('update_popup.new_version')}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
|
|
@ -133,17 +139,16 @@ const UpdatePopup: React.FC<UpdatePopupProps> = ({
|
|||
size={16}
|
||||
color={currentTheme.colors.primary}
|
||||
/>
|
||||
<Text style={[
|
||||
styles.infoLabel,
|
||||
{ color: currentTheme.colors.mediumEmphasis }
|
||||
]}>
|
||||
Version:
|
||||
</Text>
|
||||
<Text
|
||||
style={[
|
||||
styles.infoValue,
|
||||
{ color: currentTheme.colors.highEmphasis }
|
||||
styles.infoLabel,
|
||||
{ color: currentTheme.colors.mediumEmphasis },
|
||||
]}
|
||||
>
|
||||
{t('update_popup.version')}
|
||||
</Text>
|
||||
<Text
|
||||
style={[styles.infoValue, { color: currentTheme.colors.highEmphasis }]}
|
||||
numberOfLines={3}
|
||||
ellipsizeMode="tail"
|
||||
selectable
|
||||
|
|
@ -154,10 +159,12 @@ const UpdatePopup: React.FC<UpdatePopupProps> = ({
|
|||
|
||||
{!!getReleaseNotes() && (
|
||||
<View style={styles.descriptionContainer}>
|
||||
<Text style={[
|
||||
<Text
|
||||
style={[
|
||||
styles.description,
|
||||
{ color: currentTheme.colors.mediumEmphasis }
|
||||
]}>
|
||||
{ color: currentTheme.colors.mediumEmphasis },
|
||||
]}
|
||||
>
|
||||
{getReleaseNotes()}
|
||||
</Text>
|
||||
</View>
|
||||
|
|
@ -171,7 +178,7 @@ const UpdatePopup: React.FC<UpdatePopupProps> = ({
|
|||
styles.button,
|
||||
styles.primaryButton,
|
||||
{ backgroundColor: currentTheme.colors.primary },
|
||||
isInstalling && styles.disabledButton
|
||||
isInstalling && styles.disabledButton,
|
||||
]}
|
||||
onPress={handleUpdateNow}
|
||||
disabled={isInstalling}
|
||||
|
|
@ -180,12 +187,12 @@ const UpdatePopup: React.FC<UpdatePopupProps> = ({
|
|||
{isInstalling ? (
|
||||
<>
|
||||
<MaterialIcons name="install-mobile" size={18} color="white" />
|
||||
<Text style={styles.buttonText}>Installing...</Text>
|
||||
<Text style={styles.buttonText}>{t('update_popup.installing')}</Text>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<MaterialIcons name="download" size={18} color="white" />
|
||||
<Text style={styles.buttonText}>Update Now</Text>
|
||||
<Text style={styles.buttonText}>{t('update_popup.update_now')}</Text>
|
||||
</>
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
|
|
@ -198,17 +205,19 @@ const UpdatePopup: React.FC<UpdatePopupProps> = ({
|
|||
{
|
||||
backgroundColor: currentTheme.colors.darkBackground || '#2a2a2a',
|
||||
borderColor: currentTheme.colors.elevation3 || '#444444',
|
||||
}
|
||||
},
|
||||
]}
|
||||
onPress={handleUpdateLater}
|
||||
disabled={isInstalling}
|
||||
activeOpacity={0.7}
|
||||
>
|
||||
<Text style={[
|
||||
<Text
|
||||
style={[
|
||||
styles.secondaryButtonText,
|
||||
{ color: currentTheme.colors.mediumEmphasis }
|
||||
]}>
|
||||
Later
|
||||
{ color: currentTheme.colors.mediumEmphasis },
|
||||
]}
|
||||
>
|
||||
{t('update_popup.later')}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
|
|
@ -219,17 +228,19 @@ const UpdatePopup: React.FC<UpdatePopupProps> = ({
|
|||
{
|
||||
backgroundColor: currentTheme.colors.darkBackground || '#2a2a2a',
|
||||
borderColor: currentTheme.colors.elevation3 || '#444444',
|
||||
}
|
||||
},
|
||||
]}
|
||||
onPress={handleDismiss}
|
||||
disabled={isInstalling}
|
||||
activeOpacity={0.7}
|
||||
>
|
||||
<Text style={[
|
||||
<Text
|
||||
style={[
|
||||
styles.secondaryButtonText,
|
||||
{ color: currentTheme.colors.mediumEmphasis }
|
||||
]}>
|
||||
Dismiss
|
||||
{ color: currentTheme.colors.mediumEmphasis },
|
||||
]}
|
||||
>
|
||||
{t('update_popup.dismiss')}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
|
@ -253,12 +264,14 @@ const styles = StyleSheet.create({
|
|||
borderRadius: 20,
|
||||
borderWidth: 1,
|
||||
backgroundColor: '#1a1a1a', // Solid background - not transparent
|
||||
...(Platform.OS === 'ios' ? {
|
||||
...(Platform.OS === 'ios'
|
||||
? {
|
||||
shadowColor: '#000',
|
||||
shadowOffset: { width: 0, height: 10 },
|
||||
shadowOpacity: 0.5,
|
||||
shadowRadius: 20,
|
||||
} : {
|
||||
}
|
||||
: {
|
||||
elevation: 15,
|
||||
}),
|
||||
overflow: 'hidden',
|
||||
|
|
@ -337,12 +350,14 @@ const styles = StyleSheet.create({
|
|||
marginBottom: 12,
|
||||
},
|
||||
primaryButton: {
|
||||
...(Platform.OS === 'ios' ? {
|
||||
...(Platform.OS === 'ios'
|
||||
? {
|
||||
shadowColor: '#000',
|
||||
shadowOffset: { width: 0, height: 4 },
|
||||
shadowOpacity: 0.2,
|
||||
shadowRadius: 8,
|
||||
} : {
|
||||
}
|
||||
: {
|
||||
elevation: 4,
|
||||
}),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1549,5 +1549,20 @@
|
|||
"moderate": "moderate",
|
||||
"mild": "mild",
|
||||
"none": "none"
|
||||
},
|
||||
"skip_intro_button": {
|
||||
"skip": "Skip",
|
||||
"skip_intro": "Skip Intro",
|
||||
"skip_ending": "Skip Ending",
|
||||
"skip_recap": "Skip Recap"
|
||||
},
|
||||
"update_popup": {
|
||||
"update_available": "Update Available",
|
||||
"new_version": "A new version of Nuvio is ready to install",
|
||||
"version": "Version:",
|
||||
"update_now": "Update Now",
|
||||
"installing": "Installing...",
|
||||
"later": "Later",
|
||||
"dismiss": "Dismiss"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1555,5 +1555,14 @@
|
|||
"skip_intro": "Salta Inizio",
|
||||
"skip_ending": "Salta Fine",
|
||||
"skip_recap": "Salta Riassunto"
|
||||
},
|
||||
"update_popup": {
|
||||
"update_available": "Aggiornamento Disponibile",
|
||||
"new_version": "Una nuova versione di Nuvio è pronta per esser installata",
|
||||
"version": "Versione:",
|
||||
"update_now": "Aggiorna Ora",
|
||||
"installing": "Installazione...",
|
||||
"later": "Dopo",
|
||||
"dismiss": "Ignora"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue