Skip to content

Commit b27aa89

Browse files
authored
Merge pull request #64 from ansari-project/feature/add-version-to-menu
Add application version display to menu
2 parents a7498e6 + 2a28d26 commit b27aa89

File tree

11 files changed

+32
-11
lines changed

11 files changed

+32
-11
lines changed

app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "Ansari Chat",
44
"owner": "ansari-project",
55
"slug": "ansari-chat",
6-
"version": "1.1.0",
6+
"version": "1.2.0",
77
"scheme": "ansarichat",
88
"userInterfaceStyle": "automatic",
99
"orientation": "portrait",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ansari-chat-app",
33
"main": "expo-router/entry",
4-
"version": "1.1.0",
4+
"version": "1.2.0",
55
"private": true,
66
"dependencies": {
77
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",

src/components/menu/NameContainer.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import React, { useState } from 'react'
22
import { Linking, Platform, Pressable, Text, View } from 'react-native'
3+
import * as Application from 'expo-application'
34
import { Avatar } from '@kolking/react-native-avatar'
45
import { AppDispatch, RootState, toggleSideMenu } from '@/store'
56
import { useDispatch, useSelector } from 'react-redux'
67
import { useTranslation } from 'react-i18next'
78
import { useRouter } from 'expo-router'
8-
import { CloseIcon, LikeIcon, LogoutIcon } from '@/components/svg'
9+
import { CloseIcon, InfoIcon, LikeIcon, LogoutIcon } from '@/components/svg'
910
import { useAuth, useLogout } from '@/hooks'
1011
import PopupMenu, { PopupMenuSeparator } from '@/components/PopupMenu'
1112

@@ -93,6 +94,18 @@ const NameContainer: React.FC<NameContainerProps> = ({ name, nameColor, displayN
9394
</>
9495
)}
9596

97+
{Platform.OS !== 'web' && (
98+
<>
99+
<View className='flex-row items-center py-4'>
100+
<InfoIcon width={24} height={24} stroke={theme.textColor} />
101+
<Text className="text-base font-medium px-[10px] font-['Inter']" style={{ color: theme.textColor }}>
102+
{t('version')} {Application.nativeApplicationVersion}
103+
</Text>
104+
</View>
105+
<PopupMenuSeparator />
106+
</>
107+
)}
108+
96109
<Pressable
97110
className='flex-row items-center py-4'
98111
onPress={async () => {

src/i18n/locales/ar/common.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,6 @@
7272
"updateRequiredDescription": "مطلوب إصدار جديد لمواصلة استخدام أنصاري. يرجى التحديث الآن.",
7373
"updateAvailableDescription": "يتوفر إصدار جديد من أنصاري مع ميزات وتحسينات جديدة.",
7474
"updateNow": "التحديث الآن",
75-
"updateLater": "لاحقاً"
75+
"updateLater": "لاحقاً",
76+
"version": "الإصدار"
7677
}

src/i18n/locales/bs/common.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,6 @@
7272
"updateRequiredDescription": "Nova verzija je potrebna za nastavak korištenja Ansari Chata. Molimo vas da ažurirate odmah.",
7373
"updateAvailableDescription": "Nova verzija Ansari Chata je dostupna s novim funkcijama i poboljšanjima.",
7474
"updateNow": "Ažuriraj sada",
75-
"updateLater": "Kasnije"
75+
"updateLater": "Kasnije",
76+
"version": "Verzija"
7677
}

src/i18n/locales/en/common.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,6 @@
7272
"updateRequiredDescription": "A new version is required to continue using Ansari Chat. Please update now.",
7373
"updateAvailableDescription": "A new version of Ansari Chat is available with new features and improvements.",
7474
"updateNow": "Update Now",
75-
"updateLater": "Later"
75+
"updateLater": "Later",
76+
"version": "Version"
7677
}

src/i18n/locales/fr/common.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,6 @@
7272
"updateRequiredDescription": "Une nouvelle version est nécessaire pour continuer à utiliser Ansari Chat. Veuillez mettre à jour maintenant.",
7373
"updateAvailableDescription": "Une nouvelle version d'Ansari Chat est disponible avec de nouvelles fonctionnalités et améliorations.",
7474
"updateNow": "Mettre à jour maintenant",
75-
"updateLater": "Plus tard"
75+
"updateLater": "Plus tard",
76+
"version": "Version"
7677
}

src/i18n/locales/id/common.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,6 @@
7474
"updateRequiredDescription": "Versi baru diperlukan untuk melanjutkan menggunakan Ansari Chat. Silakan perbarui sekarang.",
7575
"updateAvailableDescription": "Versi baru Ansari Chat tersedia dengan fitur dan peningkatan baru.",
7676
"updateNow": "Perbarui Sekarang",
77-
"updateLater": "Nanti"
77+
"updateLater": "Nanti",
78+
"version": "Versi"
7879
}

src/i18n/locales/tml/common.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,6 @@
7272
"updateRequiredDescription": "அன்சாரி சாட்டைத் தொடர்ந்து பயன்படுத்த புதிய பதிப்பு தேவை. இப்போது புதுப்பிக்கவும்.",
7373
"updateAvailableDescription": "புதிய அம்சங்கள் மற்றும் மேம்பாடுகளுடன் அன்சாரி சாட்டின் புதிய பதிப்பு கிடைக்கிறது.",
7474
"updateNow": "இப்போது புதுப்பி",
75-
"updateLater": "பிறகு"
75+
"updateLater": "பிறகு",
76+
"version": "பதிப்பு"
7677
}

src/i18n/locales/tur/common.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,6 @@
7272
"updateRequiredDescription": "Ansari Chat'i kullanmaya devam etmek için yeni bir sürüm gerekiyor. Lütfen şimdi güncelleyin.",
7373
"updateAvailableDescription": "Yeni özellikler ve iyileştirmelerle Ansari Chat'in yeni bir sürümü mevcut.",
7474
"updateNow": "Şimdi Güncelle",
75-
"updateLater": "Daha Sonra"
75+
"updateLater": "Daha Sonra",
76+
"version": "Sürüm"
7677
}

0 commit comments

Comments
 (0)