Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Add AppIcons generated files (#2159)

Leendert de Borste6b9a2e3ffec
diff --git a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/models/AppIcons.kt b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/models/AppIcons.kt
new file mode 100644
index 000000000..d74feee10
--- /dev/null
+++ b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/models/AppIcons.kt
@@ -0,0 +1,140 @@
+// <auto-generated />
+// This file is auto-generated from core/models/src/icons/AppIcons.ts
+// Do not edit this file directly. Run 'npm run generate:models' to regenerate.
+@file:Suppress("MaxLineLength")
+
+package net.aliasvault.app.vaultstore.models
+
+/**
+ * The catalog of built-in icons a user can pick for an item, keyed by the Source a builtin logo row stores.
+ * Single source of truth for all built-in icons across platforms.
+ */
+object AppIcons {
+ /**
+ * Shopping icon SVG.
+ */
+ val SHOPPING = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path d="M4 5H7L9.5 19H24L27 9H10" stroke="#f49541" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
+ <circle cx="11" cy="25" r="2.5" fill="#d68338"/>
+ <circle cx="22" cy="25" r="2.5" fill="#d68338"/>
+</svg>
+ """.trimIndent()
+
+ /**
+ * Bank icon SVG.
+ */
+ val BANK = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path d="M16 4L29 11H3L16 4Z" fill="#f49541"/>
+ <rect x="6" y="13" width="3" height="11" fill="#f49541"/>
+ <rect x="14.5" y="13" width="3" height="11" fill="#f49541"/>
+ <rect x="23" y="13" width="3" height="11" fill="#f49541"/>
+ <rect x="3" y="25" width="26" height="3" rx="1" fill="#d68338"/>
+</svg>
+ """.trimIndent()
+
+ /**
+ * Mail icon SVG.
+ */
+ val MAIL = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <rect x="3" y="7" width="26" height="18" rx="3" fill="#f49541"/>
+ <path d="M4 10L16 18L28 10" stroke="#ffe096" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
+</svg>
+ """.trimIndent()
+
+ /**
+ * Social icon SVG.
+ */
+ val SOCIAL = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <circle cx="12" cy="11" r="5" fill="#f49541"/>
+ <path d="M3 27C3 21.5 7 18 12 18C17 18 21 21.5 21 27H3Z" fill="#f49541"/>
+ <circle cx="23" cy="12" r="4" fill="#d68338"/>
+ <path d="M20 27C20 22 23 19.5 26 19.5C28.5 19.5 30 22 30 27H20Z" fill="#d68338"/>
+</svg>
+ """.trimIndent()
+
+ /**
+ * Work icon SVG.
+ */
+ val WORK = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path d="M12 8V6C12 5 12.9 4 14 4H18C19.1 4 20 5 20 6V8" stroke="#d68338" stroke-width="2.5" stroke-linecap="round"/>
+ <rect x="3" y="8" width="26" height="18" rx="3" fill="#f49541"/>
+ <rect x="3" y="15" width="26" height="2.5" fill="#d68338"/>
+ <rect x="13.5" y="14" width="5" height="5" rx="1" fill="#ffe096"/>
+</svg>
+ """.trimIndent()
+
+ /**
+ * Game icon SVG.
+ */
+ val GAME = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <rect x="2" y="9" width="28" height="15" rx="7.5" fill="#f49541"/>
+ <rect x="7" y="14" width="6" height="2" rx="1" fill="#ffe096"/>
+ <rect x="9" y="12" width="2" height="6" rx="1" fill="#ffe096"/>
+ <circle cx="21" cy="14.5" r="1.8" fill="#d68338"/>
+ <circle cx="24.5" cy="18" r="1.8" fill="#d68338"/>
+</svg>
+ """.trimIndent()
+
+ /**
+ * Media icon SVG.
+ */
+ val MEDIA = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <rect x="3" y="5" width="26" height="22" rx="4" fill="#f49541"/>
+ <path d="M13 11.5L21 16L13 20.5V11.5Z" fill="#ffe096"/>
+</svg>
+ """.trimIndent()
+
+ /**
+ * Travel icon SVG.
+ */
+ val TRAVEL = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path d="M15 3C16.1 3 17 3.9 17 5V12.5L29 19V22L17 18.5V24L20 26.5V29L15 27.5L10 29V26.5L13 24V18.5L1 22V19L13 12.5V5C13 3.9 13.9 3 15 3Z" fill="#f49541"/>
+</svg>
+ """.trimIndent()
+
+ /**
+ * Health icon SVG.
+ */
+ val HEALTH = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path d="M16 27C16 27 3 19.5 3 11.5C3 7.4 6.1 4.5 9.8 4.5C12.2 4.5 14.5 5.9 16 8C17.5 5.9 19.8 4.5 22.2 4.5C25.9 4.5 29 7.4 29 11.5C29 19.5 16 27 16 27Z" fill="#f49541"/>
+ <path d="M14.5 11H17.5V14H20.5V17H17.5V20H14.5V17H11.5V14H14.5V11Z" fill="#ffe096"/>
+</svg>
+ """.trimIndent()
+
+ /**
+ * Dev icon SVG.
+ */
+ val DEV = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <rect x="2" y="5" width="28" height="22" rx="4" fill="#f49541"/>
+ <path d="M12 12L8 16.5L12 21" stroke="#ffe096" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
+ <path d="M20 12L24 16.5L20 21" stroke="#ffe096" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
+</svg>
+ """.trimIndent()
+
+ /**
+ * The SVG for an icon key, or null when the key is unknown to this client.
+ */
+ fun svgFor(key: String): String? = when (key) {
+ "Shopping" -> SHOPPING
+ "Bank" -> BANK
+ "Mail" -> MAIL
+ "Social" -> SOCIAL
+ "Work" -> WORK
+ "Game" -> GAME
+ "Media" -> MEDIA
+ "Travel" -> TRAVEL
+ "Health" -> HEALTH
+ "Dev" -> DEV
+ else -> null
+ }
+}
diff --git a/apps/mobile-app/ios/VaultModels/AppIcons.swift b/apps/mobile-app/ios/VaultModels/AppIcons.swift
new file mode 100644
index 000000000..d8c913e9b
--- /dev/null
+++ b/apps/mobile-app/ios/VaultModels/AppIcons.swift
@@ -0,0 +1,118 @@
+// <auto-generated />
+// This file is auto-generated from core/models/src/icons/AppIcons.ts
+// Do not edit this file directly. Run 'npm run generate:models' to regenerate.
+// swiftlint:disable line_length
+
+import Foundation
+
+/// The catalog of built-in icons a user can pick for an item, keyed by the Source a builtin logo row stores.
+/// Single source of truth for all built-in icons across platforms.
+public struct AppIcons {
+ /// Shopping icon SVG.
+ public static let shopping = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path d="M4 5H7L9.5 19H24L27 9H10" stroke="#f49541" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
+ <circle cx="11" cy="25" r="2.5" fill="#d68338"/>
+ <circle cx="22" cy="25" r="2.5" fill="#d68338"/>
+</svg>
+"""
+
+ /// Bank icon SVG.
+ public static let bank = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path d="M16 4L29 11H3L16 4Z" fill="#f49541"/>
+ <rect x="6" y="13" width="3" height="11" fill="#f49541"/>
+ <rect x="14.5" y="13" width="3" height="11" fill="#f49541"/>
+ <rect x="23" y="13" width="3" height="11" fill="#f49541"/>
+ <rect x="3" y="25" width="26" height="3" rx="1" fill="#d68338"/>
+</svg>
+"""
+
+ /// Mail icon SVG.
+ public static let mail = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <rect x="3" y="7" width="26" height="18" rx="3" fill="#f49541"/>
+ <path d="M4 10L16 18L28 10" stroke="#ffe096" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
+</svg>
+"""
+
+ /// Social icon SVG.
+ public static let social = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <circle cx="12" cy="11" r="5" fill="#f49541"/>
+ <path d="M3 27C3 21.5 7 18 12 18C17 18 21 21.5 21 27H3Z" fill="#f49541"/>
+ <circle cx="23" cy="12" r="4" fill="#d68338"/>
+ <path d="M20 27C20 22 23 19.5 26 19.5C28.5 19.5 30 22 30 27H20Z" fill="#d68338"/>
+</svg>
+"""
+
+ /// Work icon SVG.
+ public static let work = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path d="M12 8V6C12 5 12.9 4 14 4H18C19.1 4 20 5 20 6V8" stroke="#d68338" stroke-width="2.5" stroke-linecap="round"/>
+ <rect x="3" y="8" width="26" height="18" rx="3" fill="#f49541"/>
+ <rect x="3" y="15" width="26" height="2.5" fill="#d68338"/>
+ <rect x="13.5" y="14" width="5" height="5" rx="1" fill="#ffe096"/>
+</svg>
+"""
+
+ /// Game icon SVG.
+ public static let game = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <rect x="2" y="9" width="28" height="15" rx="7.5" fill="#f49541"/>
+ <rect x="7" y="14" width="6" height="2" rx="1" fill="#ffe096"/>
+ <rect x="9" y="12" width="2" height="6" rx="1" fill="#ffe096"/>
+ <circle cx="21" cy="14.5" r="1.8" fill="#d68338"/>
+ <circle cx="24.5" cy="18" r="1.8" fill="#d68338"/>
+</svg>
+"""
+
+ /// Media icon SVG.
+ public static let media = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <rect x="3" y="5" width="26" height="22" rx="4" fill="#f49541"/>
+ <path d="M13 11.5L21 16L13 20.5V11.5Z" fill="#ffe096"/>
+</svg>
+"""
+
+ /// Travel icon SVG.
+ public static let travel = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path d="M15 3C16.1 3 17 3.9 17 5V12.5L29 19V22L17 18.5V24L20 26.5V29L15 27.5L10 29V26.5L13 24V18.5L1 22V19L13 12.5V5C13 3.9 13.9 3 15 3Z" fill="#f49541"/>
+</svg>
+"""
+
+ /// Health icon SVG.
+ public static let health = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path d="M16 27C16 27 3 19.5 3 11.5C3 7.4 6.1 4.5 9.8 4.5C12.2 4.5 14.5 5.9 16 8C17.5 5.9 19.8 4.5 22.2 4.5C25.9 4.5 29 7.4 29 11.5C29 19.5 16 27 16 27Z" fill="#f49541"/>
+ <path d="M14.5 11H17.5V14H20.5V17H17.5V20H14.5V17H11.5V14H14.5V11Z" fill="#ffe096"/>
+</svg>
+"""
+
+ /// Dev icon SVG.
+ public static let dev = """
+<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <rect x="2" y="5" width="28" height="22" rx="4" fill="#f49541"/>
+ <path d="M12 12L8 16.5L12 21" stroke="#ffe096" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
+ <path d="M20 12L24 16.5L20 21" stroke="#ffe096" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
+</svg>
+"""
+
+ /// The SVG for an icon key, or nil when the key is unknown to this client.
+ public static func svg(for key: String) -> String? {
+ switch key {
+ case "Shopping": return shopping
+ case "Bank": return bank
+ case "Mail": return mail
+ case "Social": return social
+ case "Work": return work
+ case "Game": return game
+ case "Media": return media
+ case "Travel": return travel
+ case "Health": return health
+ case "Dev": return dev
+ default: return nil
+ }
+ }
+}
diff --git a/apps/server/Databases/AliasClientDb/Models/AppIcons.cs b/apps/server/Databases/AliasClientDb/Models/AppIcons.cs
new file mode 100644
index 000000000..6b99841f6
--- /dev/null
+++ b/apps/server/Databases/AliasClientDb/Models/AppIcons.cs
@@ -0,0 +1,67 @@
+// <auto-generated />
+// This file is auto-generated from core/models/src/icons/AppIcons.ts
+// Do not edit this file directly. Run 'npm run generate:models' to regenerate.
+
+#nullable enable
+
+namespace AliasClientDb.Models;
+
+/// <summary>
+/// The catalog of built-in icons a user can pick for an item, keyed by the Source a builtin logo row stores.
+/// Single source of truth for all built-in icons across platforms.
+/// </summary>
+public static class AppIcons
+{
+ /// <summary>Shopping icon SVG.</summary>
+ public const string Shopping = "<svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M4 5H7L9.5 19H24L27 9H10\" stroke=\"#f49541\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <circle cx=\"11\" cy=\"25\" r=\"2.5\" fill=\"#d68338\"/>\n <circle cx=\"22\" cy=\"25\" r=\"2.5\" fill=\"#d68338\"/>\n</svg>";
+
+ /// <summary>Bank icon SVG.</summary>
+ public const string Bank = "<svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M16 4L29 11H3L16 4Z\" fill=\"#f49541\"/>\n <rect x=\"6\" y=\"13\" width=\"3\" height=\"11\" fill=\"#f49541\"/>\n <rect x=\"14.5\" y=\"13\" width=\"3\" height=\"11\" fill=\"#f49541\"/>\n <rect x=\"23\" y=\"13\" width=\"3\" height=\"11\" fill=\"#f49541\"/>\n <rect x=\"3\" y=\"25\" width=\"26\" height=\"3\" rx=\"1\" fill=\"#d68338\"/>\n</svg>";
+
+ /// <summary>Mail icon SVG.</summary>
+ public const string Mail = "<svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"3\" y=\"7\" width=\"26\" height=\"18\" rx=\"3\" fill=\"#f49541\"/>\n <path d=\"M4 10L16 18L28 10\" stroke=\"#ffe096\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>";
+
+ /// <summary>Social icon SVG.</summary>
+ public const string Social = "<svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"11\" r=\"5\" fill=\"#f49541\"/>\n <path d=\"M3 27C3 21.5 7 18 12 18C17 18 21 21.5 21 27H3Z\" fill=\"#f49541\"/>\n <circle cx=\"23\" cy=\"12\" r=\"4\" fill=\"#d68338\"/>\n <path d=\"M20 27C20 22 23 19.5 26 19.5C28.5 19.5 30 22 30 27H20Z\" fill=\"#d68338\"/>\n</svg>";
+
+ /// <summary>Work icon SVG.</summary>
+ public const string Work = "<svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 8V6C12 5 12.9 4 14 4H18C19.1 4 20 5 20 6V8\" stroke=\"#d68338\" stroke-width=\"2.5\" stroke-linecap=\"round\"/>\n <rect x=\"3\" y=\"8\" width=\"26\" height=\"18\" rx=\"3\" fill=\"#f49541\"/>\n <rect x=\"3\" y=\"15\" width=\"26\" height=\"2.5\" fill=\"#d68338\"/>\n <rect x=\"13.5\" y=\"14\" width=\"5\" height=\"5\" rx=\"1\" fill=\"#ffe096\"/>\n</svg>";
+
+ /// <summary>Game icon SVG.</summary>
+ public const string Game = "<svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"2\" y=\"9\" width=\"28\" height=\"15\" rx=\"7.5\" fill=\"#f49541\"/>\n <rect x=\"7\" y=\"14\" width=\"6\" height=\"2\" rx=\"1\" fill=\"#ffe096\"/>\n <rect x=\"9\" y=\"12\" width=\"2\" height=\"6\" rx=\"1\" fill=\"#ffe096\"/>\n <circle cx=\"21\" cy=\"14.5\" r=\"1.8\" fill=\"#d68338\"/>\n <circle cx=\"24.5\" cy=\"18\" r=\"1.8\" fill=\"#d68338\"/>\n</svg>";
+
+ /// <summary>Media icon SVG.</summary>
+ public const string Media = "<svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"3\" y=\"5\" width=\"26\" height=\"22\" rx=\"4\" fill=\"#f49541\"/>\n <path d=\"M13 11.5L21 16L13 20.5V11.5Z\" fill=\"#ffe096\"/>\n</svg>";
+
+ /// <summary>Travel icon SVG.</summary>
+ public const string Travel = "<svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M15 3C16.1 3 17 3.9 17 5V12.5L29 19V22L17 18.5V24L20 26.5V29L15 27.5L10 29V26.5L13 24V18.5L1 22V19L13 12.5V5C13 3.9 13.9 3 15 3Z\" fill=\"#f49541\"/>\n</svg>";
+
+ /// <summary>Health icon SVG.</summary>
+ public const string Health = "<svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M16 27C16 27 3 19.5 3 11.5C3 7.4 6.1 4.5 9.8 4.5C12.2 4.5 14.5 5.9 16 8C17.5 5.9 19.8 4.5 22.2 4.5C25.9 4.5 29 7.4 29 11.5C29 19.5 16 27 16 27Z\" fill=\"#f49541\"/>\n <path d=\"M14.5 11H17.5V14H20.5V17H17.5V20H14.5V17H11.5V14H14.5V11Z\" fill=\"#ffe096\"/>\n</svg>";
+
+ /// <summary>Dev icon SVG.</summary>
+ public const string Dev = "<svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"2\" y=\"5\" width=\"28\" height=\"22\" rx=\"4\" fill=\"#f49541\"/>\n <path d=\"M12 12L8 16.5L12 21\" stroke=\"#ffe096\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M20 12L24 16.5L20 21\" stroke=\"#ffe096\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>";
+
+ /// <summary>
+ /// Gets the SVG for an icon key, or null when the key is unknown to this client.
+ /// </summary>
+ /// <param name="key">The icon key.</param>
+ /// <returns>The SVG markup, or null.</returns>
+ public static string? GetSvg(string key)
+ {
+ return key switch
+ {
+ "Shopping" => Shopping,
+ "Bank" => Bank,
+ "Mail" => Mail,
+ "Social" => Social,
+ "Work" => Work,
+ "Game" => Game,
+ "Media" => Media,
+ "Travel" => Travel,
+ "Health" => Health,
+ "Dev" => Dev,
+ _ => null,
+ };
+ }
+}