[iOS] Add Panoramax link on the place page

Signed-off-by: Jean-Baptiste Charron <jeanbaptiste.charron@outlook.fr>
Co-authored by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
Jean-Baptiste
2025-06-22 21:46:28 +02:00
committed by Konstantin Pastbin
parent 25e49b0fe1
commit df89761eba
56 changed files with 189 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic, readonly, nullable) NSString *vk;
@property(nonatomic, readonly, nullable) NSString *line;
@property(nonatomic, readonly, nullable) NSString *bluesky;
@property(nonatomic, readonly, nullable) NSString *panoramax;
@property(nonatomic, readonly, nullable) NSString *email;
@property(nonatomic, readonly, nullable) NSURL *emailUrl;
@property(nonatomic, readonly, nullable) NSString *cuisine;

View File

@@ -75,6 +75,7 @@ NSString * GetLocalizedMetadataValueString(MapObject::MetadataID metaID, std::st
case MetadataID::FMD_CONTACT_VK: _vk = ToNSString(value); break;
case MetadataID::FMD_CONTACT_LINE: _line = ToNSString(value); break;
case MetadataID::FMD_CONTACT_BLUESKY: _bluesky = ToNSString(value); break;
case MetadataID::FMD_PANORAMAX: _panoramax = ToNSString(value); break;
case MetadataID::FMD_OPERATOR: _ppOperator = [NSString stringWithFormat:NSLocalizedString(@"operator", nil), ToNSString(value)]; break;
case MetadataID::FMD_INTERNET:
_wifiAvailable = (rawData.GetInternet() == feature::Internet::No)

View File

@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "ic_panoramax.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Gradeer die toep";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "قيّم التطبيق";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Proqramı qiymətləndirin";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Ацаніць праграму";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Оцени приложение";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Puntua l'aplicació";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Ohodnotit aplikaci";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Bedøm appen";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Bewerten Sie die App";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Βαθμολογήστε την εφαρμογή";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Rate the app";

View File

@@ -288,6 +288,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Rate the app";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Valore la aplicación";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Valore la aplicación";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Hinda rakendust";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Baloratu aplikazioa";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "امتیاز به این اپلیکیشن";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Arvioi sovellus";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Évaluer l'appli";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "דרגו את האפליקציה";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "एप्लिकेशन की श्रेणी बताओ";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Értékelje az alkalmazást";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Beri nilai aplikasi";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Vota l'app";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "アプリを評価";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "앱 평가";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Įvertinti šią programėlę";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Novērtējiet lietotni";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "ऍप मानांकित करा";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Għati rata lill-app";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Ranger appen";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Beoordeel de app";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Oceń aplikację";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Avaliar o aplicativo";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Avaliar a aplicação";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Evaluează aplicația";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Оценить приложение";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Ohodnotiť aplikáciu";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Оцена апликације";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Betygsätt appen";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Rate the app";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "ให้คะแนนแอป";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Uygulamayı değerlendir";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Оцінити застосунок";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "Cho điểm ứng dụng";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "为我们评分";

View File

@@ -276,6 +276,9 @@
/* Text in the editor */
"bluesky" = "Bluesky";
/* Text in menu */
"panoramax" = "Panoramax";
/* Text in menu */
"rate_the_app" = "為我們評分";

View File

@@ -86,6 +86,7 @@ protocol PlacePageInfoViewControllerDelegate: AnyObject {
func didPressVk()
func didPressLine()
func didPressBluesky()
func didPressPanoramax()
func didPressEmail()
func didPressOpenInApp(from sourceView: UIView)
func didCopy(_ content: String)
@@ -118,6 +119,7 @@ class PlacePageInfoViewController: UIViewController {
private var vkView: InfoItemViewController?
private var lineView: InfoItemViewController?
private var blueskyView: InfoItemViewController?
private var panoramaxView: InfoItemViewController?
private var cuisineView: InfoItemViewController?
private var operatorView: InfoItemViewController?
private var wifiView: InfoItemViewController?
@@ -362,6 +364,18 @@ class PlacePageInfoViewController: UIViewController {
})
}
if let panoramax = placePageInfoData.panoramax {
panoramaxView = createInfoItem(panoramax,
icon: UIImage(named: "ic_placepage_panoramax"),
style: .link,
tapHandler: { [weak self] in
self?.delegate?.didPressPanoramax()
},
longPressHandler: { [weak self] in
self?.delegate?.didCopy(panoramax)
})
}
if let address = placePageInfoData.address {
addressView = createInfoItem(address,
icon: UIImage(named: "ic_placepage_address"),

View File

@@ -128,6 +128,10 @@ extension PlacePageInteractor: PlacePageInfoViewControllerDelegate {
MWMPlacePageManagerHelper.openBluesky(placePageData)
}
func didPressPanoramax() {
MWMPlacePageManagerHelper.openPanoramax(placePageData)
}
func didPressEmail() {
MWMPlacePageManagerHelper.openEmail(placePageData)
}

View File

@@ -293,6 +293,11 @@ using namespace storage;
[self.ownerViewController openUrl:ToNSString(fullUrl) externally:YES];
}
- (void)openPanoramax:(PlacePageData *)data {
std::string const fullUrl = osm::socialContactToURL(osm::MapObject::MetadataID::FMD_PANORAMAX, [data.infoData.panoramax UTF8String]);
[self.ownerViewController openUrl:ToNSString(fullUrl) externally:YES];
}
- (void)openEmail:(PlacePageData *)data {
[MailComposer sendEmailWithSubject:nil body:nil toRecipients:@[data.infoData.email] attachmentFileURL:nil];
}

View File

@@ -20,6 +20,7 @@
+ (void)openVk:(PlacePageData *)data;
+ (void)openLine:(PlacePageData *)data;
+ (void)openBluesky:(PlacePageData *)data;
+ (void)openPanoramax:(PlacePageData *)data;
+ (void)call:(PlacePagePhone *)phone;
+ (void)showAllFacilities:(PlacePageData *)data;
+ (void)showPlaceDescription:(NSString *)htmlString;

View File

@@ -26,6 +26,7 @@
- (void)openVk:(PlacePageData *)data;
- (void)openLine:(PlacePageData *)data;
- (void)openBluesky:(PlacePageData *)data;
- (void)openPanoramax:(PlacePageData *)data;
- (void)call:(PlacePagePhone *)phone;
- (void)showAllFacilities:(PlacePageData *)data;
- (void)showPlaceDescription:(NSString *)htmlString;
@@ -119,6 +120,10 @@
[[MWMMapViewControlsManager manager].placePageManager openBluesky:data];
}
+ (void)openPanoramax:(PlacePageData *)data {
[[MWMMapViewControlsManager manager].placePageManager openPanoramax:data];
}
+ (void)call:(PlacePagePhone *)phone {
[[MWMMapViewControlsManager manager].placePageManager call:phone];
}