From bc7f2d9d3a2501e1a70fb0cc9d19ad7382dcd4c4 Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Mon, 12 May 2025 21:12:03 +0200 Subject: [PATCH] Add mobile app download link constants (#827) --- .../wwwroot/img/mobile-icons/android.svg | 23 ++++++++++++ .../wwwroot/img/mobile-icons/ios.svg | 17 +++++++++ .../MobileApps/Constants.cs | 36 +++++++++++++++++++ .../MobileApps/MobileAppInfo.cs | 32 +++++++++++++++++ 4 files changed, 108 insertions(+) create mode 100644 apps/server/AliasVault.Client/wwwroot/img/mobile-icons/android.svg create mode 100644 apps/server/AliasVault.Client/wwwroot/img/mobile-icons/ios.svg create mode 100644 apps/server/Shared/AliasVault.Shared.Core/MobileApps/Constants.cs create mode 100644 apps/server/Shared/AliasVault.Shared.Core/MobileApps/MobileAppInfo.cs diff --git a/apps/server/AliasVault.Client/wwwroot/img/mobile-icons/android.svg b/apps/server/AliasVault.Client/wwwroot/img/mobile-icons/android.svg new file mode 100644 index 000000000..071b9cc93 --- /dev/null +++ b/apps/server/AliasVault.Client/wwwroot/img/mobile-icons/android.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/server/AliasVault.Client/wwwroot/img/mobile-icons/ios.svg b/apps/server/AliasVault.Client/wwwroot/img/mobile-icons/ios.svg new file mode 100644 index 000000000..8e3f54ccf --- /dev/null +++ b/apps/server/AliasVault.Client/wwwroot/img/mobile-icons/ios.svg @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/apps/server/Shared/AliasVault.Shared.Core/MobileApps/Constants.cs b/apps/server/Shared/AliasVault.Shared.Core/MobileApps/Constants.cs new file mode 100644 index 000000000..592c989a0 --- /dev/null +++ b/apps/server/Shared/AliasVault.Shared.Core/MobileApps/Constants.cs @@ -0,0 +1,36 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) lanedirt. All rights reserved. +// Licensed under the MIT license. See LICENSE.md file in the project root for full license information. +// +//----------------------------------------------------------------------- +#pragma warning disable S1075 // URIs should not be hardcoded + +namespace AliasVault.Shared.Core.MobileApps; + +/// +/// Provides constants for mobile app information. +/// +public static class Constants +{ + /// + /// Gets the mobile apps available for AliasVault. This is used to render download links in the client. + /// + public static IReadOnlyList MobileApps { get; } = new List + { + new MobileAppInfo + { + Name = "iOS", + IconPath = "/img/mobile-icons/ios.svg", + DownloadUrl = "https://apps.apple.com/app/id6745490915", + IsAvailable = true, + }, + new MobileAppInfo + { + Name = "Android", + IconPath = "/img/mobile-icons/android.svg", + DownloadUrl = "https://play.google.com/store/apps/details?id=com.aliasvault.app", + IsAvailable = false, + }, + }; +} diff --git a/apps/server/Shared/AliasVault.Shared.Core/MobileApps/MobileAppInfo.cs b/apps/server/Shared/AliasVault.Shared.Core/MobileApps/MobileAppInfo.cs new file mode 100644 index 000000000..8c5458980 --- /dev/null +++ b/apps/server/Shared/AliasVault.Shared.Core/MobileApps/MobileAppInfo.cs @@ -0,0 +1,32 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) lanedirt. All rights reserved. +// Licensed under the MIT license. See LICENSE.md file in the project root for full license information. +// +//----------------------------------------------------------------------- + +/// +/// Represents information about a mobile app. +/// +public class MobileAppInfo +{ + /// + /// Gets or sets the name of the mobile app. + /// + public string Name { get; set; } = string.Empty; + + /// + /// Gets or sets the path to the icon of the mobile app. + /// + public string IconPath { get; set; } = string.Empty; + + /// + /// Gets or sets the download URL for the mobile app. + /// + public string DownloadUrl { get; set; } = string.Empty; + + /// + /// Gets or sets a value indicating whether the mobile app is available. + /// + public bool IsAvailable { get; set; } +}