diff --git a/OneGateApp/Pages/DAppDetailsPage.xaml b/OneGateApp/Pages/DAppDetailsPage.xaml
index d886ae4..f313464 100644
--- a/OneGateApp/Pages/DAppDetailsPage.xaml
+++ b/OneGateApp/Pages/DAppDetailsPage.xaml
@@ -24,27 +24,64 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -63,10 +100,18 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/OneGateApp/Pages/DAppDetailsPage.xaml.cs b/OneGateApp/Pages/DAppDetailsPage.xaml.cs
index c214a79..465f1a4 100644
--- a/OneGateApp/Pages/DAppDetailsPage.xaml.cs
+++ b/OneGateApp/Pages/DAppDetailsPage.xaml.cs
@@ -1,4 +1,5 @@
using NeoOrder.OneGate.Data;
+using NeoOrder.OneGate.Properties;
using NeoOrder.OneGate.Services;
namespace NeoOrder.OneGate.Pages;
@@ -8,6 +9,13 @@ public partial class DAppDetailsPage : ContentPage, IQueryAttributable
readonly ApplicationDbContext dbContext;
public bool IsFavorite { get; set { field = value; OnPropertyChanged(); } }
+ public string SourceHost { get; private set { field = value; OnPropertyChanged(); } } = "";
+ public string SourceStatus { get; private set { field = value; OnPropertyChanged(); } } = "";
+ public string WebsiteHost { get; private set { field = value; OnPropertyChanged(); } } = "";
+ public bool HasWebsite { get; private set { field = value; OnPropertyChanged(); } }
+ public string RecentActivityText { get; private set { field = value; OnPropertyChanged(); } } = "";
+ public string TagsDisplay { get; private set { field = value; OnPropertyChanged(); } } = "";
+ public bool HasTags { get; private set { field = value; OnPropertyChanged(); } }
public DAppDetailsPage(ApplicationDbContext dbContext, IHomeShortcutService homeShortcutService)
{
@@ -25,13 +33,38 @@ public void ApplyQueryAttributes(IDictionary query)
protected override async void OnBindingContextChanged()
{
base.OnBindingContextChanged();
- DApp dapp = (DApp)BindingContext;
+ if (BindingContext is not DApp dapp) return;
+
+ SourceHost = GetHost(dapp.Url) ?? dapp.Url;
+ SourceStatus = dapp.Id > 0 ? Strings.DAppCatalogStatus : Strings.DAppExternalStatus;
+ WebsiteHost = GetHost(dapp.Website) ?? "";
+ HasWebsite = !string.IsNullOrWhiteSpace(dapp.Website);
+ TagsDisplay = string.Join(", ", (dapp.Tags ?? [])
+ .Select(DApp.LocalizeTag)
+ .Append(dapp.GameTypeDisplayName)
+ .OfType()
+ .Where(p => !string.IsNullOrWhiteSpace(p))
+ .Distinct(StringComparer.CurrentCultureIgnoreCase));
+ HasTags = !string.IsNullOrWhiteSpace(TagsDisplay);
+
List? favorites = await dbContext.Settings.GetAsync>("dapps/favorite");
IsFavorite = favorites?.Contains(dapp.Id) ?? false;
+ List? recents = await dbContext.Settings.GetAsync>("dapps/recent");
+ RecentActivityText = recents?.Contains(dapp.Id) == true
+ ? Strings.DAppRecentlyOpened
+ : Strings.DAppNotRecentlyOpened;
}
void OnFavoriteClicked(object sender, EventArgs e)
{
IsFavorite = !IsFavorite;
}
+
+ static string? GetHost(string? url)
+ {
+ if (string.IsNullOrWhiteSpace(url)) return null;
+ if (Uri.TryCreate(url, UriKind.Absolute, out Uri? uri))
+ return uri.Host;
+ return url;
+ }
}
diff --git a/OneGateApp/Properties/Strings.Designer.cs b/OneGateApp/Properties/Strings.Designer.cs
index 9b455dd..9e81e5d 100644
--- a/OneGateApp/Properties/Strings.Designer.cs
+++ b/OneGateApp/Properties/Strings.Designer.cs
@@ -150,6 +150,87 @@ internal static string AppDetails {
}
}
+ ///
+ /// 查找类似 OneGate catalog 的本地化字符串。
+ ///
+ internal static string DAppCatalogStatus {
+ get {
+ return ResourceManager.GetString("DAppCatalogStatus", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 External link 的本地化字符串。
+ ///
+ internal static string DAppExternalStatus {
+ get {
+ return ResourceManager.GetString("DAppExternalStatus", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 No recent opens on this device 的本地化字符串。
+ ///
+ internal static string DAppNotRecentlyOpened {
+ get {
+ return ResourceManager.GetString("DAppNotRecentlyOpened", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Permissions 的本地化字符串。
+ ///
+ internal static string DAppPermissions {
+ get {
+ return ResourceManager.GetString("DAppPermissions", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 This dApp can request wallet connection, message signatures, and transaction signing. OneGate asks for confirmation before sharing wallet data or signing. 的本地化字符串。
+ ///
+ internal static string DAppPermissionsSummary {
+ get {
+ return ResourceManager.GetString("DAppPermissionsSummary", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Recent activity 的本地化字符串。
+ ///
+ internal static string DAppRecentActivity {
+ get {
+ return ResourceManager.GetString("DAppRecentActivity", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Recently opened on this device 的本地化字符串。
+ ///
+ internal static string DAppRecentlyOpened {
+ get {
+ return ResourceManager.GetString("DAppRecentlyOpened", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Source 的本地化字符串。
+ ///
+ internal static string DAppSource {
+ get {
+ return ResourceManager.GetString("DAppSource", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Tags 的本地化字符串。
+ ///
+ internal static string DAppTags {
+ get {
+ return ResourceManager.GetString("DAppTags", resourceCulture);
+ }
+ }
+
///
/// 查找类似 Apps 的本地化字符串。
///
diff --git a/OneGateApp/Properties/Strings.de.resx b/OneGateApp/Properties/Strings.de.resx
index 9501220..d41977c 100644
--- a/OneGateApp/Properties/Strings.de.resx
+++ b/OneGateApp/Properties/Strings.de.resx
@@ -249,6 +249,33 @@
App-Details
+
+ OneGate-Katalog
+
+
+ Externer Link
+
+
+ Keine kürzlichen Öffnungen auf diesem Gerät
+
+
+ Berechtigungen
+
+
+ Diese dApp kann Wallet-Verbindung, Nachrichtensignaturen und Transaktionssignaturen anfordern. OneGate bittet um Bestätigung, bevor Wallet-Daten geteilt oder Signaturen ausgeführt werden.
+
+
+ Aktuelle Aktivität
+
+
+ Kürzlich auf diesem Gerät geöffnet
+
+
+ Quelle
+
+
+ Tags
+
Beschreibung
@@ -989,4 +1016,4 @@ Es wird empfohlen, den NEP-2-Schlüssel und das Passwort getrennt aufzubewahren
Nicht verfügbar
-
\ No newline at end of file
+
diff --git a/OneGateApp/Properties/Strings.es.resx b/OneGateApp/Properties/Strings.es.resx
index 9192f36..24687d9 100644
--- a/OneGateApp/Properties/Strings.es.resx
+++ b/OneGateApp/Properties/Strings.es.resx
@@ -249,6 +249,33 @@
Detalles de la aplicación
+
+ Catálogo de OneGate
+
+
+ Enlace externo
+
+
+ No se abrió recientemente en este dispositivo
+
+
+ Permisos
+
+
+ Esta dApp puede solicitar conexión de billetera, firmas de mensajes y firma de transacciones. OneGate pide confirmación antes de compartir datos de la billetera o firmar.
+
+
+ Actividad reciente
+
+
+ Abierta recientemente en este dispositivo
+
+
+ Origen
+
+
+ Etiquetas
+
Descripción
@@ -989,4 +1016,4 @@ Se recomienda almacenar la clave NEP-2 y la contraseña por separado y realizar
No disponible
-
\ No newline at end of file
+
diff --git a/OneGateApp/Properties/Strings.fr.resx b/OneGateApp/Properties/Strings.fr.resx
index 36505fb..15a44d9 100644
--- a/OneGateApp/Properties/Strings.fr.resx
+++ b/OneGateApp/Properties/Strings.fr.resx
@@ -249,6 +249,33 @@
Détails de l’application
+
+ Catalogue OneGate
+
+
+ Lien externe
+
+
+ Aucune ouverture récente sur cet appareil
+
+
+ Autorisations
+
+
+ Cette dApp peut demander la connexion au portefeuille, des signatures de messages et la signature de transactions. OneGate demande confirmation avant de partager les données du portefeuille ou de signer.
+
+
+ Activité récente
+
+
+ Récemment ouverte sur cet appareil
+
+
+ Source
+
+
+ Étiquettes
+
Description
@@ -989,4 +1016,4 @@ Il est recommandé de conserver séparément la clé NEP-2 et le mot de passe, e
Indisponible
-
\ No newline at end of file
+
diff --git a/OneGateApp/Properties/Strings.id.resx b/OneGateApp/Properties/Strings.id.resx
index 8cf03e3..e8bfdfc 100644
--- a/OneGateApp/Properties/Strings.id.resx
+++ b/OneGateApp/Properties/Strings.id.resx
@@ -249,6 +249,33 @@
Detail aplikasi
+
+ Katalog OneGate
+
+
+ Tautan eksternal
+
+
+ Belum dibuka baru-baru ini di perangkat ini
+
+
+ Izin
+
+
+ dApp ini dapat meminta koneksi dompet, tanda tangan pesan, dan penandatanganan transaksi. OneGate meminta konfirmasi sebelum membagikan data dompet atau menandatangani.
+
+
+ Aktivitas terbaru
+
+
+ Baru dibuka di perangkat ini
+
+
+ Sumber
+
+
+ Tag
+
Deskripsi
@@ -989,4 +1016,4 @@ Disarankan untuk menyimpan kunci NEP-2 dan kata sandinya secara terpisah serta m
Tidak tersedia
-
\ No newline at end of file
+
diff --git a/OneGateApp/Properties/Strings.it.resx b/OneGateApp/Properties/Strings.it.resx
index 90f59ca..471fb6a 100644
--- a/OneGateApp/Properties/Strings.it.resx
+++ b/OneGateApp/Properties/Strings.it.resx
@@ -249,6 +249,33 @@
Dettagli app
+
+ Catalogo OneGate
+
+
+ Link esterno
+
+
+ Nessuna apertura recente su questo dispositivo
+
+
+ Autorizzazioni
+
+
+ Questa dApp può richiedere la connessione del wallet, firme dei messaggi e firma delle transazioni. OneGate chiede conferma prima di condividere dati del wallet o firmare.
+
+
+ Attività recente
+
+
+ Aperta di recente su questo dispositivo
+
+
+ Fonte
+
+
+ Tag
+
Descrizione
@@ -989,4 +1016,4 @@ Si consiglia di conservare separatamente la chiave NEP-2 e la password e di eseg
Non disponibile
-
\ No newline at end of file
+
diff --git a/OneGateApp/Properties/Strings.ja.resx b/OneGateApp/Properties/Strings.ja.resx
index b9eab0d..f0544e1 100644
--- a/OneGateApp/Properties/Strings.ja.resx
+++ b/OneGateApp/Properties/Strings.ja.resx
@@ -249,6 +249,33 @@
アプリの詳細
+
+ OneGate カタログ
+
+
+ 外部リンク
+
+
+ このデバイスで最近開かれていません
+
+
+ 権限
+
+
+ この dApp はウォレット接続、メッセージ署名、トランザクション署名を要求できます。OneGate はウォレットデータの共有や署名前に確認を求めます。
+
+
+ 最近のアクティビティ
+
+
+ このデバイスで最近開きました
+
+
+ ソース
+
+
+ タグ
+
説明
@@ -989,4 +1016,4 @@ NEP-2 とパスワードは別々に保管し、それぞれを安全にバッ
利用不可
-
\ No newline at end of file
+
diff --git a/OneGateApp/Properties/Strings.ko.resx b/OneGateApp/Properties/Strings.ko.resx
index d71a57b..d864ef0 100644
--- a/OneGateApp/Properties/Strings.ko.resx
+++ b/OneGateApp/Properties/Strings.ko.resx
@@ -249,6 +249,33 @@
앱 상세 정보
+
+ OneGate 카탈로그
+
+
+ 외부 링크
+
+
+ 이 기기에서 최근 열림 없음
+
+
+ 권한
+
+
+ 이 dApp은 지갑 연결, 메시지 서명, 트랜잭션 서명을 요청할 수 있습니다. OneGate는 지갑 데이터 공유 또는 서명 전에 확인을 요청합니다.
+
+
+ 최근 활동
+
+
+ 이 기기에서 최근 열림
+
+
+ 출처
+
+
+ 태그
+
설명
@@ -989,4 +1016,4 @@ NEP-2와 비밀번호는 별도로 보관하고 각각 안전하게 백업하는
사용할 수 없음
-
\ No newline at end of file
+
diff --git a/OneGateApp/Properties/Strings.nl.resx b/OneGateApp/Properties/Strings.nl.resx
index 7a9105c..7675f65 100644
--- a/OneGateApp/Properties/Strings.nl.resx
+++ b/OneGateApp/Properties/Strings.nl.resx
@@ -249,6 +249,33 @@
Appdetails
+
+ OneGate-catalogus
+
+
+ Externe link
+
+
+ Geen recente openingen op dit apparaat
+
+
+ Machtigingen
+
+
+ Deze dApp kan om een walletverbinding, berichtondertekeningen en transactiesondertekening vragen. OneGate vraagt om bevestiging voordat walletgegevens worden gedeeld of er wordt ondertekend.
+
+
+ Recente activiteit
+
+
+ Recent geopend op dit apparaat
+
+
+ Bron
+
+
+ Tags
+
Beschrijving
@@ -989,4 +1016,4 @@ Het wordt aanbevolen om de NEP-2-sleutel en het wachtwoord apart op te slaan en
Niet beschikbaar
-
\ No newline at end of file
+
diff --git a/OneGateApp/Properties/Strings.pt-BR.resx b/OneGateApp/Properties/Strings.pt-BR.resx
index 352f2a7..de5eb2d 100644
--- a/OneGateApp/Properties/Strings.pt-BR.resx
+++ b/OneGateApp/Properties/Strings.pt-BR.resx
@@ -249,6 +249,33 @@
Detalhes do app
+
+ Catálogo OneGate
+
+
+ Link externo
+
+
+ Nenhuma abertura recente neste dispositivo
+
+
+ Permissões
+
+
+ Este dApp pode solicitar conexão da carteira, assinaturas de mensagens e assinatura de transações. O OneGate pede confirmação antes de compartilhar dados da carteira ou assinar.
+
+
+ Atividade recente
+
+
+ Aberto recentemente neste dispositivo
+
+
+ Origem
+
+
+ Tags
+
Descrição
@@ -989,4 +1016,4 @@ Recomenda-se armazenar a chave NEP-2 e a senha separadamente e fazer backups seg
Indisponível
-
\ No newline at end of file
+
diff --git a/OneGateApp/Properties/Strings.resx b/OneGateApp/Properties/Strings.resx
index e0fbfd0..1eb8b70 100644
--- a/OneGateApp/Properties/Strings.resx
+++ b/OneGateApp/Properties/Strings.resx
@@ -249,6 +249,33 @@
App Details
+
+ OneGate catalog
+
+
+ External link
+
+
+ No recent opens on this device
+
+
+ Permissions
+
+
+ This dApp can request wallet connection, message signatures, and transaction signing. OneGate asks for confirmation before sharing wallet data or signing.
+
+
+ Recent activity
+
+
+ Recently opened on this device
+
+
+ Source
+
+
+ Tags
+
Description
diff --git a/OneGateApp/Properties/Strings.ru.resx b/OneGateApp/Properties/Strings.ru.resx
index 4149470..1b0fd33 100644
--- a/OneGateApp/Properties/Strings.ru.resx
+++ b/OneGateApp/Properties/Strings.ru.resx
@@ -249,6 +249,33 @@
Сведения о приложении
+
+ Каталог OneGate
+
+
+ Внешняя ссылка
+
+
+ Нет недавних запусков на этом устройстве
+
+
+ Разрешения
+
+
+ Это dApp может запрашивать подключение кошелька, подписи сообщений и подпись транзакций. OneGate запрашивает подтверждение перед передачей данных кошелька или подписанием.
+
+
+ Недавняя активность
+
+
+ Недавно открывалось на этом устройстве
+
+
+ Источник
+
+
+ Теги
+
Описание
@@ -989,4 +1016,4 @@
Недоступно
-
\ No newline at end of file
+
diff --git a/OneGateApp/Properties/Strings.tr.resx b/OneGateApp/Properties/Strings.tr.resx
index 7c3145c..829e39e 100644
--- a/OneGateApp/Properties/Strings.tr.resx
+++ b/OneGateApp/Properties/Strings.tr.resx
@@ -249,6 +249,33 @@
Uygulama ayrıntıları
+
+ OneGate kataloğu
+
+
+ Harici bağlantı
+
+
+ Bu cihazda son açılma yok
+
+
+ İzinler
+
+
+ Bu dApp cüzdan bağlantısı, mesaj imzaları ve işlem imzalama isteyebilir. OneGate, cüzdan verilerini paylaşmadan veya imzalamadan önce onay ister.
+
+
+ Son etkinlik
+
+
+ Bu cihazda yakın zamanda açıldı
+
+
+ Kaynak
+
+
+ Etiketler
+
Açıklama
@@ -989,4 +1016,4 @@ NEP-2 anahtarı ile şifreyi ayrı ayrı saklamanız ve güvenli şekilde yedekl
Kullanılamıyor
-
\ No newline at end of file
+
diff --git a/OneGateApp/Properties/Strings.vi.resx b/OneGateApp/Properties/Strings.vi.resx
index e101e22..133eec9 100644
--- a/OneGateApp/Properties/Strings.vi.resx
+++ b/OneGateApp/Properties/Strings.vi.resx
@@ -249,6 +249,33 @@
Chi tiết ứng dụng
+
+ Danh mục OneGate
+
+
+ Liên kết bên ngoài
+
+
+ Chưa mở gần đây trên thiết bị này
+
+
+ Quyền
+
+
+ dApp này có thể yêu cầu kết nối ví, chữ ký tin nhắn và ký giao dịch. OneGate yêu cầu xác nhận trước khi chia sẻ dữ liệu ví hoặc ký.
+
+
+ Hoạt động gần đây
+
+
+ Đã mở gần đây trên thiết bị này
+
+
+ Nguồn
+
+
+ Thẻ
+
Mô tả
@@ -989,4 +1016,4 @@ Nên lưu trữ riêng khóa NEP-2 và mật khẩu, đồng thời sao lưu ch
Không khả dụng
-
\ No newline at end of file
+
diff --git a/OneGateApp/Properties/Strings.zh-Hans.resx b/OneGateApp/Properties/Strings.zh-Hans.resx
index 068ed29..e4886ed 100644
--- a/OneGateApp/Properties/Strings.zh-Hans.resx
+++ b/OneGateApp/Properties/Strings.zh-Hans.resx
@@ -249,6 +249,33 @@
应用详情
+
+ OneGate 目录
+
+
+ 外部链接
+
+
+ 这台设备上暂无最近打开记录
+
+
+ 权限
+
+
+ 该 dApp 可以请求连接钱包、消息签名和交易签名。OneGate 会在共享钱包数据或签名前要求确认。
+
+
+ 最近活动
+
+
+ 最近在这台设备上打开过
+
+
+ 来源
+
+
+ 标签
+
简介
diff --git a/OneGateApp/Properties/Strings.zh-Hant.resx b/OneGateApp/Properties/Strings.zh-Hant.resx
index e985d08..17443e4 100644
--- a/OneGateApp/Properties/Strings.zh-Hant.resx
+++ b/OneGateApp/Properties/Strings.zh-Hant.resx
@@ -249,6 +249,33 @@
應用詳情
+
+ OneGate 目錄
+
+
+ 外部連結
+
+
+ 這台裝置上沒有最近開啟記錄
+
+
+ 權限
+
+
+ 此 dApp 可以要求連接錢包、訊息簽章和交易簽章。OneGate 會在分享錢包資料或簽章前要求確認。
+
+
+ 最近活動
+
+
+ 最近在這台裝置上開啟過
+
+
+ 來源
+
+
+ 標籤
+
簡介
@@ -989,4 +1016,4 @@
不可用
-
\ No newline at end of file
+