commit
Make the app and the website look alike
The website takes the app's Material icons, buttons and text fields, its top bar and drawer, its message cards and its composer. The app takes the site's IBM Plex Sans, its list rows (a star on every row, yellow when on) and its card-style settings.
diff --git a/app/app/src/main/java/gay/doughmination/mail/ui/SettingsScreen.kt b/app/app/src/main/java/gay/doughmination/mail/ui/SettingsScreen.kt
index dbc32cd..67fcea6 100644
--- a/app/app/src/main/java/gay/doughmination/mail/ui/SettingsScreen.kt
+++ b/app/app/src/main/java/gay/doughmination/mail/ui/SettingsScreen.kt
@@ -4,30 +4,36 @@ import android.content.Intent
import android.net.Uri
import android.provider.Settings
import androidx.browser.customtabs.CustomTabsIntent
-import androidx.compose.foundation.clickable
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.ColumnScope
+import androidx.compose.foundation.layout.ExperimentalLayoutApi
+import androidx.compose.foundation.layout.FlowRow
+import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
-import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.layout.width
import androidx.compose.foundation.rememberScrollState
+import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.ArrowBack
import androidx.compose.material.icons.automirrored.outlined.Logout
-import androidx.compose.material.icons.outlined.Description
+import androidx.compose.material.icons.outlined.ChevronRight
import androidx.compose.material.icons.outlined.Notifications
-import androidx.compose.material.icons.outlined.NotificationsActive
-import androidx.compose.material.icons.outlined.NotificationsOff
import androidx.compose.material.icons.outlined.PrivacyTip
import androidx.compose.material3.Button
+import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.ExperimentalMaterial3Api
-import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
-import androidx.compose.material3.ListItem
import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Scaffold
import androidx.compose.material3.SnackbarHost
@@ -38,13 +44,17 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.dp
import gay.doughmination.mail.BuildConfig
import gay.doughmination.mail.Push
-@OptIn(ExperimentalMaterial3Api::class)
+/** Laid out like the web's settings page: one card per topic, under a small pink heading. */
+@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class)
@Composable
fun SettingsScreen(vm: MailViewModel) {
val me = vm.me
@@ -65,80 +75,109 @@ fun SettingsScreen(vm: MailViewModel) {
},
snackbarHost = { SnackbarHost(LocalSnackbar.current) },
) { padding ->
- Column(Modifier.padding(padding).fillMaxSize().verticalScroll(rememberScrollState())) {
- Column(Modifier.padding(16.dp)) {
- Text("Your name", style = MaterialTheme.typography.titleMedium)
- Text(
- "Shown on mail you send. Leave it empty to send from the bare address.",
- style = MaterialTheme.typography.bodySmall,
- color = Muted,
- )
- Spacer(Modifier.height(8.dp))
- OutlinedTextField(
- value = name,
- onValueChange = { if (it.length <= 100) name = it },
- singleLine = true,
- modifier = Modifier.fillMaxWidth(),
- )
- Spacer(Modifier.height(8.dp))
- Button(onClick = { vm.saveName(name) }, enabled = name.trim() != me?.name.orEmpty()) { Text("Save") }
+ Column(
+ Modifier.padding(padding).fillMaxSize().verticalScroll(rememberScrollState()).padding(horizontal = 12.dp),
+ verticalArrangement = Arrangement.spacedBy(16.dp),
+ ) {
+ Section("Your name") {
+ Note("People see this as the sender of mail you send. Leave it empty to send from just the address.")
+ Row(verticalAlignment = Alignment.CenterVertically) {
+ OutlinedTextField(
+ value = name,
+ onValueChange = { if (it.length <= 100) name = it },
+ placeholder = { Text("Your name") },
+ singleLine = true,
+ modifier = Modifier.weight(1f),
+ )
+ Spacer(Modifier.width(8.dp))
+ Button(onClick = { vm.saveName(name) }, enabled = name.trim() != me?.name.orEmpty()) { Text("Save") }
+ }
}
- HorizontalDivider()
- Column(Modifier.padding(16.dp)) {
- Text("Your addresses", style = MaterialTheme.typography.titleMedium)
- Spacer(Modifier.height(4.dp))
- for (addr in me?.addresses.orEmpty()) Text(addr, color = Muted)
- if (me?.addresses.isNullOrEmpty()) Text("None yet. Ask an admin to switch on a domain.", color = Muted)
+
+ Section("Your addresses") {
+ Note("You receive and can send from each of these.")
+ for (addr in me?.addresses.orEmpty()) Text("• $addr")
+ if (me?.addresses.isNullOrEmpty()) Text("None yet. Ask an admin to switch on a domain.")
}
- HorizontalDivider()
- if (Push.available(context)) {
- ListItem(
- headlineContent = { Text("Notification settings") },
- supportingContent = { Text("Turn new-mail notifications on or off") },
- leadingContent = { Icon(Icons.Outlined.Notifications, null) },
- modifier = Modifier.clickable {
- context.startActivity(
- Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS)
- .putExtra(Settings.EXTRA_APP_PACKAGE, context.packageName),
- )
- },
- )
- ListItem(
- headlineContent = { Text("Send a test notification") },
- leadingContent = { Icon(Icons.Outlined.NotificationsActive, null) },
- modifier = Modifier.clickable { vm.testPush() },
- )
- } else {
- ListItem(
- headlineContent = { Text("Notifications") },
- supportingContent = { Text("This build has no Firebase setup, so notifications are off.") },
- leadingContent = { Icon(Icons.Outlined.NotificationsOff, null) },
- )
+
+ Section("Notifications", Icons.Outlined.Notifications) {
+ if (Push.available(context)) {
+ Note("Turn new-mail notifications on or off in Android's settings for the app.")
+ FlowRow(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
+ OutlinedButton(onClick = {
+ context.startActivity(
+ Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS)
+ .putExtra(Settings.EXTRA_APP_PACKAGE, context.packageName),
+ )
+ }) { Text("Notification settings") }
+ OutlinedButton(onClick = vm::testPush) { Text("Send a test") }
+ }
+ } else {
+ Note("This build has no Firebase setup, so notifications are off.")
+ }
}
- HorizontalDivider()
- ListItem(
- headlineContent = { Text("Privacy policy") },
- leadingContent = { Icon(Icons.Outlined.PrivacyTip, null) },
- modifier = Modifier.clickable { openWeb("/privacy") },
- )
- ListItem(
- headlineContent = { Text("Terms of service") },
- leadingContent = { Icon(Icons.Outlined.Description, null) },
- modifier = Modifier.clickable { openWeb("/terms") },
- )
- HorizontalDivider()
- ListItem(
- headlineContent = { Text("Sign out", color = Danger) },
- supportingContent = { me?.let { Text("Signed in as ${it.username}") } },
- leadingContent = { Icon(Icons.AutoMirrored.Outlined.Logout, null, tint = Danger) },
- modifier = Modifier.clickable { vm.signOut() },
- )
+
+ Section("Privacy and terms", Icons.Outlined.PrivacyTip) {
+ Note("What's stored about you and your mail, who can see it, and the rules for using the inbox.")
+ FlowRow(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
+ OutlinedButton(onClick = { openWeb("/privacy") }) {
+ Text("Privacy policy")
+ Icon(Icons.Outlined.ChevronRight, null, Modifier.size(ButtonDefaults.IconSize))
+ }
+ OutlinedButton(onClick = { openWeb("/terms") }) {
+ Text("Terms of service")
+ Icon(Icons.Outlined.ChevronRight, null, Modifier.size(ButtonDefaults.IconSize))
+ }
+ }
+ }
+
+ Section("Account") {
+ me?.let { Note("Signed in as ${it.username}.") }
+ OutlinedButton(
+ onClick = { vm.signOut() },
+ colors = ButtonDefaults.outlinedButtonColors(contentColor = Danger),
+ contentPadding = ButtonDefaults.ButtonWithIconContentPadding,
+ ) {
+ Icon(Icons.AutoMirrored.Outlined.Logout, null, Modifier.size(ButtonDefaults.IconSize))
+ Spacer(Modifier.width(ButtonDefaults.IconSpacing))
+ Text("Sign out")
+ }
+ }
+
Text(
"Inbox ${BuildConfig.VERSION_NAME}",
- Modifier.padding(16.dp),
+ Modifier.padding(start = 4.dp, bottom = 24.dp),
style = MaterialTheme.typography.labelSmall,
color = Muted,
)
}
}
}
+
+private val sectionShape = RoundedCornerShape(16.dp)
+
+/** A card like the web's settings sections: dark glass, a hairline border, an eyebrow heading. */
+@Composable
+private fun Section(title: String, icon: ImageVector? = null, content: @Composable ColumnScope.() -> Unit) {
+ Column(
+ Modifier
+ .fillMaxWidth()
+ .clip(sectionShape)
+ .background(Bg.copy(alpha = 0.72f))
+ .border(1.dp, Line, sectionShape)
+ .padding(16.dp),
+ verticalArrangement = Arrangement.spacedBy(10.dp),
+ ) {
+ Row(verticalAlignment = Alignment.CenterVertically) {
+ if (icon != null) {
+ Icon(icon, null, Modifier.size(16.dp), tint = Accent)
+ Spacer(Modifier.width(6.dp))
+ }
+ Text(title.uppercase(), style = Eyebrow)
+ }
+ content()
+ }
+}
+
+@Composable
+private fun Note(text: String) = Text(text, style = MaterialTheme.typography.bodyMedium, color = Muted)
diff --git a/app/app/src/main/java/gay/doughmination/mail/ui/Theme.kt b/app/app/src/main/java/gay/doughmination/mail/ui/Theme.kt
index f701562..b1eefa4 100644
--- a/app/app/src/main/java/gay/doughmination/mail/ui/Theme.kt
+++ b/app/app/src/main/java/gay/doughmination/mail/ui/Theme.kt
@@ -12,9 +12,15 @@ import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import gay.doughmination.mail.R
+import androidx.compose.material3.Typography
import androidx.compose.material3.darkColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.Font
+import androidx.compose.ui.text.font.FontFamily
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.unit.sp
// The site's palette (email/src/web/app.css).
val Accent = Color(0xFFEB459E)
@@ -23,6 +29,49 @@ val Muted = Color(0xFFA49EAB)
val Bg = Color(0xFF0B0A0D)
/** A card on the backdrop, like --raised on the web. */
val Raised = Color.White.copy(alpha = 0.05f)
+/** Hairline borders, like --line on the web. */
+val Line = Color.White.copy(alpha = 0.09f)
+/** A starred thread, like --star on the web. */
+val StarYellow = Color(0xFFF7C948)
+
+/** IBM Plex Sans, as on the web and doughmination.gay (the same files, as TTF). */
+val PlexSans = FontFamily(
+ Font(R.font.ibm_plex_sans_regular, FontWeight.Normal),
+ Font(R.font.ibm_plex_sans_medium, FontWeight.Medium),
+ Font(R.font.ibm_plex_sans_semibold, FontWeight.SemiBold),
+ Font(R.font.ibm_plex_sans_bold, FontWeight.Bold),
+)
+
+private fun TextStyle.plex() = copy(fontFamily = PlexSans)
+
+private val typography = Typography().run {
+ Typography(
+ displayLarge = displayLarge.plex(),
+ displayMedium = displayMedium.plex(),
+ displaySmall = displaySmall.plex(),
+ headlineLarge = headlineLarge.plex(),
+ headlineMedium = headlineMedium.plex(),
+ headlineSmall = headlineSmall.plex(),
+ titleLarge = titleLarge.plex(),
+ titleMedium = titleMedium.plex(),
+ titleSmall = titleSmall.plex(),
+ bodyLarge = bodyLarge.plex(),
+ bodyMedium = bodyMedium.plex(),
+ bodySmall = bodySmall.plex(),
+ labelLarge = labelLarge.plex(),
+ labelMedium = labelMedium.plex(),
+ labelSmall = labelSmall.plex(),
+ )
+}
+
+/** The web's small uppercase accent label (.eyebrow), used for headings. */
+val Eyebrow = TextStyle(
+ fontFamily = PlexSans,
+ fontSize = 11.sp,
+ fontWeight = FontWeight.SemiBold,
+ letterSpacing = 1.5.sp,
+ color = Accent,
+)
private val colors = darkColorScheme(
primary = Accent,
@@ -87,4 +136,5 @@ fun Backdrop(modifier: Modifier = Modifier) {
}
@Composable
-fun InboxTheme(content: @Composable () -> Unit) = MaterialTheme(colorScheme = colors, content = content)
+fun InboxTheme(content: @Composable () -> Unit) =
+ MaterialTheme(colorScheme = colors, typography = typography, content = content)
diff --git a/app/app/src/main/java/gay/doughmination/mail/ui/ThreadListScreen.kt b/app/app/src/main/java/gay/doughmination/mail/ui/ThreadListScreen.kt
index 0a33868..9be58fb 100644
--- a/app/app/src/main/java/gay/doughmination/mail/ui/ThreadListScreen.kt
+++ b/app/app/src/main/java/gay/doughmination/mail/ui/ThreadListScreen.kt
@@ -16,6 +16,7 @@ import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState
@@ -89,6 +90,7 @@ import androidx.compose.ui.platform.LocalView
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
import androidx.browser.customtabs.CustomTabsIntent
import android.net.Uri
import gay.doughmination.mail.data.ListFolder
@@ -308,40 +310,53 @@ private fun SwipeRow(vm: MailViewModel, t: ThreadSummary, onHold: (ThreadSummary
private fun ThreadRow(vm: MailViewModel, t: ThreadSummary, opaque: Boolean, onClick: () -> Unit, onLongClick: () -> Unit) {
val unread = t.unread > 0
// The Bin and Starred mix folders; whoever it's from reads best there.
- val who = when (vm.folder) {
- ListFolder.Sent, ListFolder.Drafts ->
- "To: " + (t.to.joinToString(", ") { displayName(it) }.ifEmpty { "(nobody yet)" })
- else -> displayName(t.from)
- }
+ val fromSide = vm.folder != ListFolder.Sent && vm.folder != ListFolder.Drafts
+ val who = if (fromSide) displayName(t.from)
+ else "To: " + (t.to.joinToString(", ") { displayName(it) }.ifEmpty { "(nobody yet)" })
+ // Laid out like the web's rows on a phone, sizes and all.
Row(
Modifier
.fillMaxWidth()
// Opaque only while it's being swiped, so the wallpaper shows through at rest.
.background(if (opaque) Bg else Color.Transparent)
.combinedClickable(onClick = onClick, onLongClick = onLongClick)
- .padding(horizontal = 16.dp, vertical = 12.dp),
+ .padding(start = 16.dp, end = 8.dp, top = 10.dp, bottom = 10.dp),
verticalAlignment = Alignment.Top,
) {
- Avatar(who.removePrefix("To: "))
- Spacer(Modifier.width(12.dp))
+ Avatar(if (fromSide) displayName(t.from) else displayName(t.to.firstOrNull() ?: "?"))
+ Spacer(Modifier.width(14.dp))
Column(Modifier.weight(1f)) {
- Row(verticalAlignment = Alignment.CenterVertically) {
+ Row(Modifier.padding(end = 8.dp), verticalAlignment = Alignment.CenterVertically) {
Text(
- who + if (t.count > 1) " ${t.count}" else "",
- Modifier.weight(1f),
+ who,
+ Modifier.weight(1f, fill = false),
+ fontSize = 15.sp,
fontWeight = if (unread) FontWeight.Bold else FontWeight.Normal,
+ color = if (unread) MaterialTheme.colorScheme.onSurface else Muted,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
+ if (t.count > 1) {
+ Spacer(Modifier.width(6.dp))
+ Text("${t.count}", fontSize = 12.sp, color = Muted)
+ }
+ if (t.hasAttachments) {
+ Spacer(Modifier.width(6.dp))
+ Icon(Icons.Outlined.AttachFile, "Has attachments", Modifier.size(14.dp), tint = Muted)
+ }
+ Spacer(Modifier.weight(1f).widthIn(min = 8.dp))
Text(
fmtTime(t.lastAt),
- style = MaterialTheme.typography.labelMedium,
- color = if (unread) Accent else Muted,
+ fontSize = 12.sp,
+ fontWeight = if (unread) FontWeight.Bold else FontWeight.Normal,
+ color = if (unread) MaterialTheme.colorScheme.onSurface else Muted,
)
}
Text(
t.subject.ifEmpty { "(no subject)" },
- fontWeight = if (unread) FontWeight.SemiBold else FontWeight.Normal,
+ Modifier.padding(end = 8.dp),
+ fontSize = 14.sp,
+ fontWeight = if (unread) FontWeight.Bold else FontWeight.Normal,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
@@ -349,30 +364,39 @@ private fun ThreadRow(vm: MailViewModel, t: ThreadSummary, opaque: Boolean, onCl
Text(
t.snippet,
Modifier.weight(1f),
- style = MaterialTheme.typography.bodyMedium,
+ fontSize = 13.5.sp,
color = Muted,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
- if (t.hasAttachments) Icon(Icons.Outlined.AttachFile, "Has attachments", Modifier.size(16.dp), tint = Muted)
- if (t.starred) Icon(Icons.Filled.Star, "Starred", Modifier.size(16.dp), tint = Accent)
+ // A star on every row, as on the web; the Bin has none.
+ if (vm.folder != ListFolder.Bin) {
+ IconButton(onClick = { vm.toggleStar(t.id, !t.starred) }, Modifier.size(32.dp)) {
+ if (t.starred) Icon(Icons.Filled.Star, "Unstar", Modifier.size(18.dp), tint = StarYellow)
+ else Icon(Icons.Outlined.StarOutline, "Star", Modifier.size(18.dp), tint = Muted)
+ }
+ }
}
}
}
}
-private val avatarColors = listOf(
- Color(0xFFEB459E), Color(0xFF7C5CFF), Color(0xFF2FA4FF), Color(0xFF1FB58F),
- Color(0xFFF5A524), Color(0xFFFF6B5C), Color(0xFFB45CFF), Color(0xFF4CC3D9),
-)
-
-/** A coloured initial, as Gmail does. */
+/** A coloured initial, as the web draws it: the same hue from the same name. */
@Composable
private fun Avatar(name: String) {
val initial = name.trim().firstOrNull { it.isLetterOrDigit() }?.uppercaseChar() ?: '?'
- val color = avatarColors[Math.floorMod(name.lowercase().hashCode(), avatarColors.size)]
- Box(Modifier.size(40.dp).clip(CircleShape).background(color), contentAlignment = Alignment.Center) {
- Text(initial.toString(), color = Color.White, fontWeight = FontWeight.Bold)
+ // The web's hash runs over code points, taking each one's first UTF-16 unit.
+ var hue = 0
+ var i = 0
+ while (i < name.length) {
+ hue = (hue * 31 + name[i].code) % 360
+ i += Character.charCount(name.codePointAt(i))
+ }
+ Box(
+ Modifier.padding(top = 2.dp).size(40.dp).clip(CircleShape).background(Color.hsl(hue.toFloat(), 0.55f, 0.42f)),
+ contentAlignment = Alignment.Center,
+ ) {
+ Text(initial.toString(), color = Color.White, fontSize = 17.sp, fontWeight = FontWeight.SemiBold)
}
}
diff --git a/app/app/src/main/java/gay/doughmination/mail/ui/ThreadScreen.kt b/app/app/src/main/java/gay/doughmination/mail/ui/ThreadScreen.kt
index 2b22d7b..c18a0d7 100644
--- a/app/app/src/main/java/gay/doughmination/mail/ui/ThreadScreen.kt
+++ b/app/app/src/main/java/gay/doughmination/mail/ui/ThreadScreen.kt
@@ -92,7 +92,7 @@ fun ThreadScreen(vm: MailViewModel, screen: Screen.Thread) {
}
} else {
IconButton(onClick = { vm.toggleStar(thread.id, !thread.starred) }) {
- if (thread.starred) Icon(Icons.Filled.Star, "Unstar", tint = Accent)
+ if (thread.starred) Icon(Icons.Filled.Star, "Unstar", tint = StarYellow)
else Icon(Icons.Outlined.StarOutline, "Star")
}
if (thread.messages.any { it.folder == "inbox" }) {
diff --git a/app/app/src/main/res/font/ibm_plex_sans_bold.ttf b/app/app/src/main/res/font/ibm_plex_sans_bold.ttf
new file mode 100644
index 0000000..c864a80
Binary files /dev/null and b/app/app/src/main/res/font/ibm_plex_sans_bold.ttf differ
diff --git a/app/app/src/main/res/font/ibm_plex_sans_medium.ttf b/app/app/src/main/res/font/ibm_plex_sans_medium.ttf
new file mode 100644
index 0000000..94738b8
Binary files /dev/null and b/app/app/src/main/res/font/ibm_plex_sans_medium.ttf differ
diff --git a/app/app/src/main/res/font/ibm_plex_sans_regular.ttf b/app/app/src/main/res/font/ibm_plex_sans_regular.ttf
new file mode 100644
index 0000000..a4f4148
Binary files /dev/null and b/app/app/src/main/res/font/ibm_plex_sans_regular.ttf differ
diff --git a/app/app/src/main/res/font/ibm_plex_sans_semibold.ttf b/app/app/src/main/res/font/ibm_plex_sans_semibold.ttf
new file mode 100644
index 0000000..454f3d4
Binary files /dev/null and b/app/app/src/main/res/font/ibm_plex_sans_semibold.ttf differ
diff --git a/email/bun.lock b/email/bun.lock
index 44e853c..50dbb61 100644
--- a/email/bun.lock
+++ b/email/bun.lock
@@ -7,7 +7,6 @@
"dependencies": {
"@hono/zod-validator": "0.9.1",
"hono": "4.13.13",
- "iconsax": "0.1.1",
"jose": "6.2.12",
"resend": "6.32.1",
"zod": "4.6.6",
@@ -283,8 +282,6 @@
"hono": ["[email protected]", "", {}, "sha512-CQ46U0ZkAGmbT/4UxdzzGJpacP2IeKgY4a5/tOI9AABbpOMfK739wfDXmv1usCk+3RkKj1hQy4/fjhiwa2xlrA=="],
- "iconsax": ["[email protected]", "", { "bin": { "iconsax": "bin/iconsax.js" } }, "sha512-/HXomG+SuhytKH/Yw4ZdunDGyWP02Osuk/pjony1k9CCMOsg7dUpnomu7HZUOHNu0yK0b3phErjH2IgUTJFjPA=="],
-
"is-reference": ["[email protected]", "", { "dependencies": { "@types/estree": "^1.0.6" } }, "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw=="],
"jose": ["[email protected]", "", {}, "sha512-9NiFmJEex0sy2Dk58j2UGBSHgUs2ypF9eZSu4L6vjOX3Dp96Sw1F3uL+H+D1sx02jZZdzUT0HgvCy59CuvXcWw=="],
diff --git a/email/package.json b/email/package.json
index c68f7c2..8a74444 100644
--- a/email/package.json
+++ b/email/package.json
@@ -16,7 +16,6 @@
"dependencies": {
"@hono/zod-validator": "0.9.1",
"hono": "4.13.13",
- "iconsax": "0.1.1",
"jose": "6.2.12",
"resend": "6.32.1",
"zod": "4.6.6"
diff --git a/email/src/web/App.svelte b/email/src/web/App.svelte
index 43261fe..7a23ff8 100644
--- a/email/src/web/App.svelte
+++ b/email/src/web/App.svelte
@@ -73,14 +73,13 @@
<p class="muted boot">Loading…</p>
{:else}
<div class="shell" class:reading>
- <!-- Phones only: a Gmail-style app bar over the list. -->
+ <!-- Phones only: the app's Material top bar over the list. -->
<header class="appbar">
- <button class="menu-btn" aria-label="Menu" aria-expanded={drawer} onclick={() => (drawer = true)}><Menu size={22} /></button>
+ <button class="menu-btn" aria-label="Folders" aria-expanded={drawer} onclick={() => (drawer = true)}><Menu size={24} /></button>
<div class="appbar-title">
<span>{title}</span>
{#if router.mailbox}<span class="muted mailbox">{router.mailbox}</span>{/if}
</div>
- <span class="avatar" title={session.me.username}>{(session.me.name || session.me.username).charAt(0).toUpperCase()}</span>
</header>
<Sidebar open={drawer} onclose={() => (drawer = false)} />
@@ -103,7 +102,7 @@
</div>
{#if route.name === "folder" && !reading}
- <button class="fab" class:demo-offset={isDemo} onclick={composeNew}><SquarePen size={20} /> Compose</button>
+ <button class="fab" class:demo-offset={isDemo} onclick={composeNew}><SquarePen size={24} /> Compose</button>
{/if}
{#if composer.open}
@@ -186,20 +185,16 @@
.appbar {
display: flex;
align-items: center;
- gap: 0.5rem;
- margin: calc(0.5rem + env(safe-area-inset-top)) 0.75rem 0.5rem;
- padding: 0.3rem 0.5rem 0.3rem 0.3rem;
- border: 1px solid var(--line);
- border-radius: 999px;
- background: var(--panel);
- backdrop-filter: blur(14px);
+ gap: 0.25rem;
+ min-height: 4rem;
+ padding: env(safe-area-inset-top) 0.25rem 0;
}
.menu-btn {
display: grid;
place-items: center;
- width: 2.5rem;
- height: 2.5rem;
+ width: 3rem;
+ height: 3rem;
padding: 0;
border: none;
border-radius: 50%;
@@ -209,16 +204,17 @@
}
.menu-btn:hover {
- background: var(--raised-hover);
+ background: rgb(255 255 255 / 8%);
}
+ /* Material's titleLarge, with the mailbox under it as the app shows it. */
.appbar-title {
display: flex;
flex: 1;
- align-items: baseline;
- gap: 0.5rem;
+ flex-direction: column;
min-width: 0;
- font-weight: 600;
+ font-size: 1.375rem;
+ line-height: 1.3;
}
.appbar-title span {
@@ -228,23 +224,11 @@
}
.mailbox {
- font-size: 0.8rem;
- font-weight: 400;
- }
-
- .avatar {
- display: grid;
- flex-shrink: 0;
- place-items: center;
- width: 2rem;
- height: 2rem;
- border-radius: 50%;
- background: var(--accent);
- color: #fff;
- font-size: 0.9rem;
- font-weight: 700;
+ font-size: 0.75rem;
+ font-weight: 500;
}
+ /* Material's extended floating action button. */
.fab {
position: fixed;
right: 1rem;
@@ -252,14 +236,16 @@
z-index: 5;
display: inline-flex;
align-items: center;
- gap: 0.6rem;
- padding: 1rem 1.25rem;
+ gap: 0.75rem;
+ min-height: 3.5rem;
+ padding: 0 1.25rem 0 1rem;
border: none;
- border-radius: 1.1rem;
- background: var(--accent);
- color: #fff;
- font-weight: 600;
- box-shadow: 0 6px 20px rgb(0 0 0 / 45%);
+ border-radius: 1rem;
+ background: var(--primary-container);
+ color: var(--on-primary-container);
+ font-size: 0.875rem;
+ font-weight: 500;
+ box-shadow: 0 3px 8px rgb(0 0 0 / 40%);
cursor: pointer;
}
diff --git a/email/src/web/app.css b/email/src/web/app.css
index 0998591..078a5d9 100644
--- a/email/src/web/app.css
+++ b/email/src/web/app.css
@@ -5,10 +5,11 @@
*/
/* Global tokens and base only; components carry their own scoped styles.
- The look follows ~/projects/web (theme.css, header.css, contact.css):
- translucent raised surfaces, hairline borders, rounded cards that pick up
- an accent ring on hover, pill buttons. IBM Plex Sans for text and Comic Code
- for monospace, as on doughmination.gay.
+ The colours, wallpaper and type follow ~/projects/web (theme.css,
+ header.css): translucent surfaces, hairline borders, IBM Plex Sans for text
+ and Comic Code for monospace, as on doughmination.gay. The controls follow
+ the Android app instead: Material 3 buttons, text fields and icons, so the
+ two look the same.
Email content never sees any of this: it renders inside EmailFrame's
iframe, which is also what keeps an email's fonts and styles off the app. */
@@ -90,6 +91,15 @@
--accent-line: rgb(235 69 158 / 40%);
--panel: rgb(11 10 13 / 72%);
--danger: #ff5c7a;
+ /* From the Android app's Material colour scheme (ui/Theme.kt). */
+ --outline: #3a3640;
+ --outline-variant: #26222b;
+ --surface-low: #131116;
+ --surface-high: #1e1b22;
+ --primary-container: #3a1a2c;
+ --on-primary-container: #ffd8ea;
+ --secondary-container: #2a1a24;
+ --on-secondary-container: #ffd8ea;
--star: #f7c948;
--radius: 1rem;
--radius-sm: 0.5rem;
@@ -174,60 +184,88 @@ a:hover {
box-shadow: 0 0 0 4px var(--accent-dim);
}
-/* Buttons: pills, as on the site's contact page. */
+/* Buttons: Material 3, as in the Android app. A plain .btn is an outlined
+ button, .accent a filled one, .text a text button and .icon an icon button.
+ Hovering lays a tint over the button, as Material's state layers do. */
.btn {
+ position: relative;
display: inline-flex;
align-items: center;
- gap: 0.4rem;
- padding: 0.45rem 0.95rem;
- border: 1px solid var(--line);
+ justify-content: center;
+ gap: 0.5rem;
+ min-height: 2.5rem;
+ padding: 0 1.5rem;
+ border: 1px solid var(--outline);
border-radius: 999px;
- background: var(--raised);
- color: var(--text);
+ background: transparent;
+ color: var(--accent);
cursor: pointer;
- font-size: 0.85rem;
+ font-size: 0.875rem;
font-weight: 500;
+ letter-spacing: 0.01em;
text-decoration: none;
- transition:
- border-color 0.15s ease,
- box-shadow 0.15s ease,
- filter 0.15s ease;
+ overflow: hidden;
+ transition: box-shadow 0.15s ease;
}
-.btn:hover:not(:disabled) {
- border-color: var(--accent-line);
- box-shadow: 0 0 0 4px var(--accent-dim);
+.btn:has(> svg:first-child) {
+ padding-left: 1rem;
+}
+
+.btn::after {
+ content: "";
+ position: absolute;
+ inset: 0;
+ background: currentColor;
+ opacity: 0;
+ pointer-events: none;
+ transition: opacity 0.15s ease;
+}
+
+.btn:hover:not(:disabled)::after {
+ opacity: 0.08;
+}
+
+.btn:active:not(:disabled)::after,
+.btn:focus-visible::after {
+ opacity: 0.12;
}
.btn:disabled {
- opacity: 0.5;
+ opacity: 0.38;
cursor: default;
}
.btn.accent {
- border-color: var(--accent);
+ border-color: transparent;
background: var(--accent);
color: #fff;
- font-weight: 600;
}
.btn.accent:hover:not(:disabled) {
- filter: brightness(1.12);
+ box-shadow: 0 1px 3px rgb(0 0 0 / 40%);
+}
+
+.btn.text {
+ padding: 0 0.75rem;
+ border-color: transparent;
}
.btn.danger {
- border-color: rgb(255 92 122 / 40%);
color: var(--danger);
}
-.btn.danger:hover:not(:disabled) {
- border-color: var(--danger);
- box-shadow: 0 0 0 4px rgb(255 92 122 / 14%);
+.btn.icon {
+ width: 2.5rem;
+ min-height: 2.5rem;
+ padding: 0;
+ border-color: transparent;
+ color: var(--muted);
}
-.btn.icon {
- padding: 0.4rem;
+.btn.icon.danger {
+ color: var(--danger);
}
/* Cards: the site's project/contact tiles. */
@@ -260,14 +298,15 @@ a:hover {
text-transform: uppercase;
}
+/* Material's outlined text field, as in the app. */
.field input,
.field select,
.field textarea,
.input {
- padding: 0.55rem 0.75rem;
- border: 1px solid var(--line);
- border-radius: var(--radius-sm);
- background: rgb(0 0 0 / 25%);
+ padding: 0.85rem 1rem;
+ border: 1px solid var(--outline);
+ border-radius: 4px;
+ background: transparent;
color: var(--text);
font-size: 0.95rem;
font-weight: 400;
@@ -283,8 +322,8 @@ a:hover {
.field textarea:focus,
.input:focus {
outline: none;
- border-color: var(--accent-line);
- box-shadow: 0 0 0 4px var(--accent-dim);
+ border-color: var(--accent);
+ box-shadow: inset 0 0 0 1px var(--accent);
}
/* Phones: 16px fields, or iOS Safari zooms the page on focus. */
@@ -337,9 +376,3 @@ pre,
samp {
font-family: var(--mono);
}
-
-/* iconsax renders its <svg> inside the element */
-iconsax-icon {
- display: inline-flex;
- flex-shrink: 0;
-}
diff --git a/email/src/web/components/Composer.svelte b/email/src/web/components/Composer.svelte
index cc3c727..4ffcd2d 100644
--- a/email/src/web/components/Composer.svelte
+++ b/email/src/web/components/Composer.svelte
@@ -4,6 +4,7 @@
See LICENCE.md in the project root for full licence information. -->
<script lang="ts">
import LoaderCircle from "../lib/icons/LoaderCircle.svelte";
+ import MoreVert from "../lib/icons/MoreVert.svelte";
import Paperclip from "../lib/icons/Paperclip.svelte";
import Send from "../lib/icons/Send.svelte";
import X from "../lib/icons/X.svelte";
@@ -23,6 +24,9 @@
let busy = $state(false);
let error = $state("");
let fileInput = $state<HTMLInputElement>();
+ // svelte-ignore state_referenced_locally
+ let showCopies = $state(init.cc.length > 0 || init.bcc.length > 0);
+ let menu = $state(false);
const addresses = $derived(session.me?.addresses ?? []);
const totalBytes = $derived(form.attachments.reduce((n, a) => n + a.size, 0));
@@ -109,54 +113,92 @@
function close() {
composer.open = null;
}
+
+ /** Closing keeps what's written as a draft, as the app does; an untouched one just goes. */
+ function closeAndSave() {
+ const blank =
+ !form.draftId && !form.to.length && !form.cc.length && !form.bcc.length &&
+ !form.subject.trim() && !form.text.trim() && !form.attachments.length;
+ if (blank) close();
+ else void save();
+ }
</script>
-<div class="backdrop" role="presentation" onkeydown={(e) => e.key === "Escape" && close()}>
+<div class="backdrop" role="presentation" onkeydown={(e) => e.key === "Escape" && (menu ? (menu = false) : closeAndSave())}>
+ <!-- The app's composer: a top bar with the actions, then one row per field. -->
<form class="composer" onsubmit={send}>
- <header>
+ <header class="bar">
+ <button type="button" class="btn icon" title="Close and save" aria-label="Close and save" onclick={closeAndSave} disabled={busy}>
+ <X size={24} />
+ </button>
<h2>{form.title}</h2>
- <button type="button" class="btn icon" title="Close" onclick={close}><X size={16} /></button>
+ <input bind:this={fileInput} type="file" multiple hidden onchange={(e) => addFiles(e.currentTarget.files)} />
+ <button type="button" class="btn icon" title="Attach" aria-label="Attach" onclick={() => fileInput?.click()}>
+ <Paperclip size={24} />
+ </button>
+ {#if busy || uploading}
+ <span class="busy"><LoaderCircle size={24} /></span>
+ {:else}
+ <button type="submit" class="btn icon send" title="Send" aria-label="Send"><Send size={24} /></button>
+ {/if}
+ <div class="more">
+ <button type="button" class="btn icon" title="More" aria-label="More" aria-expanded={menu} onclick={() => (menu = !menu)}>
+ <MoreVert size={24} />
+ </button>
+ {#if menu}
+ <!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_static_element_interactions -->
+ <div class="menu-scrim" onclick={() => (menu = false)}></div>
+ <div class="menu" role="menu">
+ <button type="button" role="menuitem" onclick={() => ((menu = false), save())} disabled={busy || uploading > 0}>Save draft</button>
+ <button type="button" role="menuitem" class="danger" onclick={() => ((menu = false), discard())} disabled={busy}>
+ {form.draftId ? "Delete draft" : "Discard"}
+ </button>
+ </div>
+ {/if}
+ </div>
</header>
- {#if addresses.length > 1}
- <label class="field">
- From
+ <label class="row">
+ <span class="cap">From</span>
+ {#if addresses.length > 1}
<select bind:value={form.from}>
{#each addresses as a (a)}<option value={a}>{a}</option>{/each}
</select>
- </label>
- {/if}
+ {:else}
+ <span class="value">{form.from || "No address to send from"}</span>
+ {/if}
+ </label>
<!-- Not <label>s: a click on the caption would hit the first pill's remove button. -->
- <div class="field">To <RecipientInput bind:value={form.to} label="To" placeholder="[email protected], …" /></div>
- <div class="field">Cc <RecipientInput bind:value={form.cc} label="Cc" /></div>
- <div class="field">Bcc <RecipientInput bind:value={form.bcc} label="Bcc" /></div>
- <label class="field">Subject <input bind:value={form.subject} required /></label>
- <label class="field grow">Message <textarea bind:value={form.text} rows="12"></textarea></label>
-
- <div class="files">
- <input bind:this={fileInput} type="file" multiple hidden onchange={(e) => addFiles(e.currentTarget.files)} />
- <button type="button" class="btn" onclick={() => fileInput?.click()}><Paperclip size={14} /> Attach</button>
- {#if uploading}<LoaderCircle size={16} class="spin" />{/if}
- {#each form.attachments as a, i (a.id)}
- <span class="file">
- {a.filename} <span class="muted">({fmtSize(a.size)})</span>
- <button type="button" class="btn icon" title="Remove" onclick={() => form.attachments.splice(i, 1)}>
- <X size={12} />
- </button>
- </span>
- {/each}
+ <div class="row">
+ <span class="cap">To</span>
+ <RecipientInput bind:value={form.to} label="To" />
+ {#if !showCopies}<button type="button" class="btn text" onclick={() => (showCopies = true)}>Cc/Bcc</button>{/if}
</div>
- {#if totalBytes > 40 * 1024 * 1024}
- <p class="error">Over 40 MB of attachments; Resend will refuse this.</p>
+ {#if showCopies}
+ <div class="row"><span class="cap">Cc</span> <RecipientInput bind:value={form.cc} label="Cc" /></div>
+ <div class="row"><span class="cap">Bcc</span> <RecipientInput bind:value={form.bcc} label="Bcc" /></div>
{/if}
+ <label class="row"><span class="cap">Subject</span> <input bind:value={form.subject} /></label>
- {#if error}<p class="error">{error}</p>{/if}
+ {#if form.attachments.length || uploading}
+ <div class="files">
+ {#each form.attachments as a, i (a.id)}
+ <span class="chip">
+ <span class="name">{a.filename} · {fmtSize(a.size)}</span>
+ <button type="button" title="Remove" aria-label="Remove {a.filename}" onclick={() => form.attachments.splice(i, 1)}>
+ <X size={18} />
+ </button>
+ </span>
+ {/each}
+ {#if uploading}<span class="small">Uploading {uploading}…</span>{/if}
+ </div>
+ {/if}
+ {#if totalBytes > 40 * 1024 * 1024}
+ <p class="error note">Over 40 MB of attachments; Resend will refuse this.</p>
+ {/if}
+ {#if error}<p class="error note">{error}</p>{/if}
- <footer>
- <button type="button" class="btn danger" onclick={discard} disabled={busy}>Discard</button>
- <button type="button" class="btn" onclick={save} disabled={busy || uploading > 0}>Save draft</button>
- <button type="submit" class="btn accent" disabled={busy || uploading > 0}><Send size={14} /> Send</button>
- </footer>
+ <textarea bind:value={form.text} placeholder="Write your message" aria-label="Message"></textarea>
</form>
</div>
@@ -172,65 +214,219 @@
backdrop-filter: blur(6px);
}
- /* The site's featured contact card: accent border, soft ring. */
+ /* Wide screens: a Material dialog holding the same layout as the app. */
.composer {
display: flex;
flex-direction: column;
- gap: 0.9rem;
width: min(720px, 100%);
- max-height: 100%;
+ height: min(720px, 100%);
overflow-y: auto;
- padding: 1.5rem;
- border: 1px solid var(--accent-line);
- border-radius: var(--radius);
- background:
- radial-gradient(80% 120% at 0% 0%, rgb(235 69 158 / 12%), transparent 70%),
- #131116;
- box-shadow: 0 0 0 4px var(--accent-dim);
+ border-radius: 1.75rem;
+ background: var(--surface-low);
}
- header {
+ .bar {
+ position: sticky;
+ top: 0;
+ z-index: 1;
display: flex;
- justify-content: space-between;
align-items: center;
+ gap: 0.25rem;
+ min-height: 4rem;
+ padding: 0 0.25rem;
+ background: var(--surface-low);
}
h2 {
- margin: 0;
- font-size: 1.15rem;
- font-weight: 700;
+ flex: 1;
+ margin: 0 0 0 0.25rem;
+ overflow: hidden;
+ font-size: 1.375rem;
+ font-weight: 400;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
- textarea {
- resize: vertical;
- min-height: 10rem;
+ .bar .btn.icon {
+ width: 3rem;
+ min-height: 3rem;
+ color: var(--text);
}
- .files {
+ .bar .btn.icon.send {
+ color: var(--accent);
+ }
+
+ .busy {
+ display: grid;
+ place-items: center;
+ width: 3rem;
+ height: 3rem;
+ }
+
+ .more {
+ position: relative;
+ }
+
+ .menu-scrim {
+ position: fixed;
+ inset: 0;
+ z-index: 1;
+ }
+
+ /* Material's dropdown menu. */
+ .menu {
+ position: absolute;
+ top: 100%;
+ right: 0;
+ z-index: 2;
+ display: flex;
+ flex-direction: column;
+ min-width: 12rem;
+ padding: 0.5rem 0;
+ border-radius: 0.25rem;
+ background: var(--surface-high);
+ box-shadow: 0 4px 12px rgb(0 0 0 / 45%);
+ }
+
+ .menu button {
+ min-height: 3rem;
+ padding: 0 0.75rem;
+ border: none;
+ background: none;
+ color: var(--text);
+ font-size: 0.875rem;
+ font-weight: 500;
+ text-align: left;
+ cursor: pointer;
+ }
+
+ .menu button:hover:not(:disabled) {
+ background: rgb(255 255 255 / 8%);
+ }
+
+ .menu button:disabled {
+ opacity: 0.38;
+ }
+
+ .menu .danger {
+ color: var(--danger);
+ }
+
+ /* One field per row, captioned in front and divided by a hairline. */
+ .row {
display: flex;
- flex-wrap: wrap;
align-items: center;
gap: 0.5rem;
- font-size: 0.85rem;
+ min-height: 3.5rem;
+ padding: 0 1rem;
+ border-bottom: 1px solid var(--outline-variant);
}
- .file {
- display: inline-flex;
- align-items: center;
- gap: 0.3rem;
- padding: 0.15rem 0.2rem 0.15rem 0.75rem;
- border: 1px solid var(--line);
- border-radius: 999px;
- background: var(--raised);
+ .cap {
+ color: var(--muted);
+ }
+
+ .row input,
+ .row select,
+ .value {
+ flex: 1;
+ min-width: 0;
+ padding: 0.75rem 0;
+ border: none;
+ background: transparent;
+ color: var(--text);
+ font-size: 1rem;
+ }
+
+ .row input:focus,
+ .row select:focus {
+ outline: none;
}
- footer {
+ .row select option {
+ background: var(--surface-high);
+ }
+
+ .row :global(.recipients) {
+ flex: 1;
+ min-width: 0;
+ padding: 0.4rem 0;
+ border: none;
+ background: transparent;
+ box-shadow: none;
+ font-size: 1rem;
+ }
+
+ .row :global(.recipients:focus-within) {
+ box-shadow: none;
+ }
+
+ .files {
display: flex;
- justify-content: flex-end;
+ flex-direction: column;
+ align-items: flex-start;
+ gap: 0.4rem;
+ padding: 0.4rem 0.75rem;
+ border-bottom: 1px solid var(--outline-variant);
+ }
+
+ /* Material's input chip. */
+ .chip {
+ display: inline-flex;
+ align-items: center;
gap: 0.5rem;
+ max-width: 100%;
+ min-height: 2rem;
+ padding: 0 0.5rem 0 0.75rem;
+ border: 1px solid var(--outline);
+ border-radius: 0.5rem;
+ font-size: 0.875rem;
+ font-weight: 500;
+ }
+
+ .chip .name {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
- /* Phones: full screen, as Gmail's compose is, with the buttons kept in reach. */
+ .chip button {
+ display: grid;
+ place-items: center;
+ padding: 0;
+ border: none;
+ background: none;
+ color: var(--muted);
+ cursor: pointer;
+ }
+
+ .small {
+ color: var(--muted);
+ font-size: 0.75rem;
+ font-weight: 500;
+ }
+
+ .note {
+ margin: 0.5rem 1rem 0;
+ }
+
+ textarea {
+ flex: 1;
+ min-height: 17.5rem;
+ padding: 1rem;
+ border: none;
+ background: transparent;
+ color: var(--text);
+ font-size: 1rem;
+ resize: none;
+ }
+
+ textarea:focus {
+ outline: none;
+ }
+
+ /* Phones: full screen, as the app's composer is. */
@media (max-width: 800px) {
.backdrop {
padding: 0;
@@ -239,31 +435,21 @@
.composer {
width: 100%;
height: 100%;
- padding: calc(0.75rem + env(safe-area-inset-top)) 1rem 0;
- border: none;
+ padding-bottom: env(safe-area-inset-bottom);
border-radius: 0;
- box-shadow: none;
- }
-
- .grow {
- flex: 1;
- }
-
- .grow textarea {
- flex: 1;
+ background: var(--bg);
}
- footer {
- position: sticky;
- bottom: 0;
- margin: 0 -1rem;
- padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
- border-top: 1px solid var(--line);
- background: #131116;
+ .bar {
+ padding-top: env(safe-area-inset-top);
+ background: var(--bg);
}
- footer .btn[type="submit"] {
- margin-left: auto;
+ /* 16px, or iOS Safari zooms the page on focus. */
+ .row input,
+ .row select,
+ textarea {
+ font-size: 16px;
}
}
</style>
diff --git a/email/src/web/components/EmailFrame.svelte b/email/src/web/components/EmailFrame.svelte
index d98a828..5a43012 100644
--- a/email/src/web/components/EmailFrame.svelte
+++ b/email/src/web/components/EmailFrame.svelte
@@ -30,8 +30,8 @@
let showRemote = $state(false);
const BASE_STYLE =
- ":root{color-scheme:light}body{margin:0;padding:16px;background:#fff;color:#111;" +
- "font:14px/1.5 -apple-system,system-ui,sans-serif;overflow-wrap:anywhere}" +
+ ":root{color-scheme:light}body{margin:0;padding:12px;background:#fff;color:#111;" +
+ "font:15px/1.5 -apple-system,system-ui,sans-serif;overflow-wrap:anywhere}" +
"img{max-width:100%;height:auto}pre{white-space:pre-wrap}table{max-width:100%}";
const body = $derived.by(() => {
@@ -75,7 +75,7 @@
{#if hasRemote && !showRemote}
<button class="btn remote" onclick={() => (showRemote = true)}>
- <ImageIcon size={14} /> Load remote images
+ <ImageIcon size={18} /> Load remote images
</button>
{/if}
@@ -90,16 +90,16 @@
></iframe>
<style>
- /* Emails are designed for a light page, so the frame stays white. */
+ /* Emails are designed for a light page, so the frame stays white, edge to
+ edge across the message card as in the app. */
iframe {
display: block;
width: 100%;
- border: 1px solid var(--line);
- border-radius: var(--radius-sm);
+ border: none;
background: #fff;
}
.remote {
- margin-bottom: 0.6rem;
+ margin: 0 0.875rem 0.5rem;
}
</style>
diff --git a/email/src/web/components/Sidebar.svelte b/email/src/web/components/Sidebar.svelte
index d091a9e..bc1bfd8 100644
--- a/email/src/web/components/Sidebar.svelte
+++ b/email/src/web/components/Sidebar.svelte
@@ -3,16 +3,19 @@
Licensed under the DASL-1.0 Licence.
See LICENCE.md in the project root for full licence information. -->
<script lang="ts">
+ import AllInbox from "../lib/icons/AllInbox.svelte";
+ import AlternateEmail from "../lib/icons/AlternateEmail.svelte";
import FileText from "../lib/icons/FileText.svelte";
import Globe from "../lib/icons/Globe.svelte";
import InboxIcon from "../lib/icons/Inbox.svelte";
import LogOut from "../lib/icons/LogOut.svelte";
+ import Mail from "../lib/icons/Mail.svelte";
import Mobile from "../lib/icons/Mobile.svelte";
import Send from "../lib/icons/Send.svelte";
import SettingsIcon from "../lib/icons/Settings.svelte";
import Shield from "../lib/icons/Shield.svelte";
import SquarePen from "../lib/icons/SquarePen.svelte";
- import Star from "../lib/icons/Star.svelte";
+ import StarOff from "../lib/icons/StarOff.svelte";
import Trash2 from "../lib/icons/Trash2.svelte";
import type { ListFolder } from "../../shared/types";
import { api } from "../lib/api";
@@ -24,7 +27,7 @@
const folders: { folder: ListFolder; label: string; icon: typeof InboxIcon }[] = [
{ folder: "inbox", label: "Inbox", icon: InboxIcon },
- { folder: "starred", label: "Starred", icon: Star },
+ { folder: "starred", label: "Starred", icon: StarOff },
{ folder: "sent", label: "Sent", icon: Send },
{ folder: "drafts", label: "Drafts", icon: FileText },
{ folder: "bin", label: "Bin", icon: Trash2 },
@@ -62,60 +65,72 @@
<!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_static_element_interactions -->
<div class="scrim" class:open onclick={onclose}></div>
+<!-- The Android app's drawer: who you are, the folders, your mailboxes, then
+ settings. On wide screens it's the sidebar, with a compose button. -->
<nav class="sidebar" class:open>
- <p class="brand eyebrow">Mail</p>
- <button class="btn accent compose" onclick={() => (onclose(), composeNew())}><SquarePen size={16} /> New message</button>
+ <div class="who">
+ <Mail size={24} />
+ <div>
+ <p class="name">{session.me?.name || session.me?.username || "Inbox"}</p>
+ {#if session.me?.addresses[0]}<p class="address">{session.me.addresses[0]}</p>{/if}
+ </div>
+ </div>
+ <button class="btn accent compose" onclick={() => (onclose(), composeNew())}><SquarePen size={18} /> New message</button>
+ <hr />
- <ul class="folders">
+ <ul>
{#each folders as f (f.folder)}
<li>
<a class="item" class:active={current === f.folder} href={router.href(folderHref(f.folder))}>
- <f.icon size={16} />
- <span>{f.label}</span>
+ <f.icon size={24} />
+ <span class="label">{f.label}</span>
{#if f.folder === "inbox" && total}<span class="count">{total}</span>{/if}
</a>
</li>
{/each}
</ul>
- {#if byDomain.length > 1 || (byDomain[0]?.[1].length ?? 0) > 1}
- <h3 class="mailboxes-title">Mailboxes</h3>
- <ul class="mailboxes">
+ {#if (session.me?.addresses.length ?? 0) > 1}
+ <hr />
+ <ul>
<li>
<a class="item" class:active={current && !router.mailbox} href={router.href(folderHref(current ?? "inbox", null))}>
- <span>All</span>
+ <AllInbox size={24} />
+ <span class="label">All addresses</span>
</a>
</li>
{#each byDomain as [domain, addresses] (domain)}
<li>
- <a class="item domain" class:active={current && router.mailbox === `@${domain}`} href={router.href(folderHref(current ?? "inbox", `@${domain}`))}>
- <Globe size={14} />
- <span>{domain}</span>
+ <a class="item" class:active={current && router.mailbox === `@${domain}`} href={router.href(folderHref(current ?? "inbox", `@${domain}`))}>
+ <Globe size={24} />
+ <span class="label">{domain}</span>
{#if unreadFor(domain)}<span class="count">{unreadFor(domain)}</span>{/if}
</a>
- <ul>
- {#each addresses as addr (addr)}
- <li>
- <a class="item address" class:active={current && router.mailbox === addr} href={router.href(folderHref(current ?? "inbox", addr))}>
- <span>{addr.slice(0, addr.lastIndexOf("@"))}</span>
- {#if session.unread[addr]}<span class="count">{session.unread[addr]}</span>{/if}
- </a>
- </li>
- {/each}
- </ul>
</li>
+ {#if addresses.length > 1}
+ {#each addresses as addr (addr)}
+ <li>
+ <a class="item indent" class:active={current && router.mailbox === addr} href={router.href(folderHref(current ?? "inbox", addr))}>
+ <AlternateEmail size={24} />
+ <span class="label">{addr.slice(0, addr.lastIndexOf("@"))}</span>
+ {#if session.unread[addr]}<span class="count">{session.unread[addr]}</span>{/if}
+ </a>
+ </li>
+ {/each}
+ {/if}
{/each}
</ul>
{/if}
+ <hr />
<ul class="bottom">
- <li><a class="item" class:active={route.name === "settings" || route.name === "privacy" || route.name === "terms"} href={router.href("/settings")}><SettingsIcon size={16} /> <span class="label">Settings</span></a></li>
- <!-- `download` keeps the router from treating it as a page in the app. -->
- <li><a class="item" href="/download" download><Mobile size={16} /> <span class="label">Get the Android app</span></a></li>
+ <li><a class="item" class:active={route.name === "settings" || route.name === "privacy" || route.name === "terms"} href={router.href("/settings")}><SettingsIcon size={24} /> <span class="label">Settings</span></a></li>
{#if session.me?.isAdmin}
- <li><a class="item" class:active={route.name === "admin"} href={router.href("/admin")}><Shield size={16} /> <span class="label">Admin</span></a></li>
+ <li><a class="item" class:active={route.name === "admin"} href={router.href("/admin")}><Shield size={24} /> <span class="label">Admin</span></a></li>
{/if}
- <li><button class="item" onclick={logout}><LogOut size={16} /> <span class="label">Log out</span></button></li>
+ <!-- `download` keeps the router from treating it as a page in the app. -->
+ <li><a class="item" href="/download" download><Mobile size={24} /> <span class="label">Get the Android app</span></a></li>
+ <li><button class="item" onclick={logout}><LogOut size={24} /> <span class="label">Log out</span></button></li>
</ul>
</nav>
@@ -123,8 +138,7 @@
.sidebar {
display: flex;
flex-direction: column;
- gap: 0.5rem;
- padding: 1rem 0.75rem;
+ padding: 0.75rem;
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--panel);
@@ -132,98 +146,130 @@
overflow-y: auto;
}
- .compose {
- justify-content: center;
- margin-bottom: 0.5rem;
+ .who {
+ display: flex;
+ align-items: center;
+ gap: 0.75rem;
+ padding: 0.75rem 1rem;
+ color: var(--accent);
}
- ul {
- list-style: none;
+ .who p {
margin: 0;
- padding: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
- ul ul {
- padding-left: 1.1rem;
+ .who > div {
+ min-width: 0;
}
- h3 {
- margin: 0.9rem 0 0.25rem 0.75rem;
- color: var(--accent);
- font-size: 0.7rem;
- font-weight: 600;
- letter-spacing: 0.14em;
- text-transform: uppercase;
+ .name {
+ color: var(--text);
+ font-size: 1rem;
+ font-weight: 500;
+ line-height: 1.5;
+ }
+
+ .address {
+ color: var(--muted);
+ font-size: 0.75rem;
+ font-weight: 500;
}
+ .compose {
+ margin: 0.25rem 0.5rem 0.5rem;
+ }
+
+ hr {
+ width: 100%;
+ margin: 0.5rem 0;
+ border: none;
+ border-top: 1px solid var(--outline-variant);
+ }
+
+ ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ }
+
+ /* Material's navigation drawer item: a full-width pill, filled when it's
+ where you are. */
.item {
display: flex;
align-items: center;
- gap: 0.55rem;
+ gap: 0.75rem;
width: 100%;
- padding: 0.45rem 0.75rem;
- border: 1px solid transparent;
- border-radius: var(--radius-sm);
+ min-height: 3rem;
+ padding: 0 1.5rem 0 1rem;
+ border: none;
+ border-radius: 999px;
background: transparent;
color: var(--muted);
- font-size: 0.9rem;
+ font-size: 0.875rem;
+ font-weight: 500;
text-align: left;
text-decoration: none;
cursor: pointer;
- transition:
- background 0.15s ease,
- border-color 0.15s ease,
- color 0.15s ease;
+ transition: background 0.15s ease;
+ }
+
+ .item.indent {
+ padding-left: 2.5rem;
}
- .item span:not(.count) {
+ .label {
+ flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item:hover {
- background: var(--raised-hover);
- color: var(--text);
+ background: rgb(255 255 255 / 8%);
+ color: var(--muted);
}
.item.active {
- border-color: var(--accent-line);
- background: var(--accent-dim);
- color: var(--text);
- font-weight: 600;
+ background: var(--secondary-container);
+ color: var(--on-secondary-container);
}
+ /* Material's badge, in the theme's error colour as the app's are. */
.count {
- margin-left: auto;
- padding: 0 0.45rem;
+ min-width: 1rem;
+ padding: 0 0.25rem;
border-radius: 999px;
- background: var(--accent);
- color: #fff;
- font-size: 0.7rem;
- font-weight: 700;
+ background: var(--danger);
+ color: #690005;
+ font-size: 0.6875rem;
+ font-weight: 500;
+ line-height: 1rem;
+ text-align: center;
}
.bottom {
margin-top: auto;
}
- .brand,
+
.scrim {
display: none;
}
- /* Phones: a drawer that slides in from the left, as in Gmail. The compose
+ /* Phones: a drawer that slides in from the left, as in the app. The compose
button lives on the list as a floating button instead. */
@media (max-width: 800px) {
.sidebar {
position: fixed;
inset: 0 auto 0 0;
z-index: 30;
- width: min(80vw, 300px);
- padding: calc(1rem + env(safe-area-inset-top)) 0.75rem calc(1rem + env(safe-area-inset-bottom));
- border-width: 0 1px 0 0;
+ width: min(85vw, 360px);
+ padding: calc(0.75rem + env(safe-area-inset-top)) 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
+ border: none;
border-radius: 0 var(--radius) var(--radius) 0;
- background: #131116;
+ background: var(--surface-low);
transform: translateX(-105%);
visibility: hidden;
transition:
@@ -253,17 +299,16 @@
pointer-events: auto;
}
- .brand {
- display: block;
- margin: 0 0 0.25rem 0.75rem;
- }
-
.compose {
display: none;
}
.item {
- padding-block: 0.6rem;
+ min-height: 3.5rem;
+ }
+
+ .bottom {
+ margin-top: 0;
}
}
</style>
diff --git a/email/src/web/components/ThreadList.svelte b/email/src/web/components/ThreadList.svelte
index d3b886b..cba048e 100644
--- a/email/src/web/components/ThreadList.svelte
+++ b/email/src/web/components/ThreadList.svelte
@@ -6,8 +6,8 @@
import ArchiveRestore from "../lib/icons/ArchiveRestore.svelte";
import CircleX from "../lib/icons/CircleX.svelte";
import Eye from "../lib/icons/Eye.svelte";
- import Mail from "../lib/icons/Mail.svelte";
- import MailOpen from "../lib/icons/MailOpen.svelte";
+ import MarkRead from "../lib/icons/MarkRead.svelte";
+ import MarkUnread from "../lib/icons/MarkUnread.svelte";
import Paperclip from "../lib/icons/Paperclip.svelte";
import Star from "../lib/icons/Star.svelte";
import StarOff from "../lib/icons/StarOff.svelte";
@@ -188,7 +188,7 @@
if (folder !== "inbox" && folder !== "starred") return undefined;
return {
label: thread.unread ? "Read" : "Unread",
- icon: thread.unread ? MailOpen : Mail,
+ icon: thread.unread ? MarkRead : MarkUnread,
tone: "accent",
dismiss: false,
run: () => toggleRead(thread),
@@ -233,7 +233,7 @@
? [
{
label: thread.unread ? "Mark as read" : "Mark as unread",
- icon: thread.unread ? MailOpen : Mail,
+ icon: thread.unread ? MarkRead : MarkUnread,
run: () => toggleRead(thread),
},
]
diff --git a/email/src/web/components/ThreadView.svelte b/email/src/web/components/ThreadView.svelte
index af571f4..0a1c5cc 100644
--- a/email/src/web/components/ThreadView.svelte
+++ b/email/src/web/components/ThreadView.svelte
@@ -5,9 +5,10 @@
<script lang="ts">
import ArchiveRestore from "../lib/icons/ArchiveRestore.svelte";
import ArrowLeft from "../lib/icons/ArrowLeft.svelte";
- import ChevronDown from "../lib/icons/ChevronDown.svelte";
+ import CircleX from "../lib/icons/CircleX.svelte";
import Forward from "../lib/icons/Forward.svelte";
- import MailOpen from "../lib/icons/MailOpen.svelte";
+ import LoaderCircle from "../lib/icons/LoaderCircle.svelte";
+ import MarkUnread from "../lib/icons/MarkUnread.svelte";
import Paperclip from "../lib/icons/Paperclip.svelte";
import Pencil from "../lib/icons/Pencil.svelte";
import Reply from "../lib/icons/Reply.svelte";
@@ -80,15 +81,13 @@
const last = $derived(thread?.messages.filter((m) => m.folder !== "drafts").at(-1) ?? thread?.messages.at(-1));
const hasInbound = $derived(thread?.messages.some((m) => m.folder === "inbox") ?? false);
- /** Newest first. The API sends them oldest first. */
- const newestFirst = $derived(thread ? [...thread.messages].sort((a, b) => b.sentAt - a.sentAt) : []);
- const newestId = $derived(newestFirst[0]?.id);
- /** Older messages the user has opened; the newest is always open. */
+ /** Oldest first, as the API sends them and the app shows them. */
+ const newestId = $derived(thread?.messages.at(-1)?.id);
+ /** Messages the user has opened or closed. The newest and unread ones start open. */
const opened = new SvelteSet<string>();
- const isOpen = (m: Message) => m.id === newestId || opened.has(m.id);
+ const isOpen = (m: Message) => (m.id === newestId || !m.read) !== opened.has(m.id);
function toggle(m: Message) {
- if (m.id === newestId) return;
if (opened.has(m.id)) opened.delete(m.id);
else opened.add(m.id);
}
@@ -158,9 +157,6 @@
}
}
- /** "Ari Lane" for "Ari Lane <[email protected]>", or the address when there's no name. */
- const names = (list: string[]) => list.map(displayName).join(", ");
-
const files = (m: Message) => m.attachments.filter((a) => !a.contentId || !m.html?.includes(a.contentId));
const isImage = (type: string) => /^image\/(png|jpe?g|gif|webp|avif|bmp)$/i.test(type);
</script>
@@ -168,19 +164,19 @@
<svelte:window {onkeydown} />
<article class="view">
- <!-- Phones: back arrow on the left, icon actions on the right. -->
+ <!-- Phones: the app's top bar, back on the left and actions on the right. -->
<div class="topbar">
- <button class="tb" aria-label="Back" onclick={() => router.thread(null)}><ArrowLeft size={20} /></button>
+ <button class="tb" aria-label="Back" onclick={() => router.thread(null)}><ArrowLeft size={24} /></button>
{#if thread && bin}
- <button class="tb" aria-label="Restore" title="Restore" onclick={restoreThread}><ArchiveRestore size={20} /></button>
+ <button class="tb" aria-label="Restore" title="Restore" onclick={restoreThread}><ArchiveRestore size={24} /></button>
<button
class="tb"
class:armed={confirming === "thread"}
- aria-label="Delete forever"
- title={confirming === "thread" ? "Press again to delete forever" : "Delete forever"}
+ aria-label={confirming === "thread" ? "Tap again to delete forever" : "Delete forever"}
+ title={confirming === "thread" ? "Tap again to delete forever" : "Delete forever"}
onclick={removeThread}
>
- <Trash size={20} />
+ <CircleX size={24} />
</button>
{:else if thread && last}
<button
@@ -190,310 +186,301 @@
aria-pressed={thread.starred}
onclick={toggleStar}
>
- <Star size={20} fill={thread.starred ? "currentColor" : "none"} />
+ <Star size={24} fill={thread.starred ? "currentColor" : "none"} />
</button>
- <button class="tb" aria-label="Move to Bin" title="Move to Bin" onclick={removeThread}><Trash size={20} /></button>
{#if hasInbound}
- <button class="tb" aria-label="Mark unread" title="Mark unread" onclick={markUnread}><MailOpen size={20} /></button>
+ <button class="tb" aria-label="Mark as unread" title="Mark as unread" onclick={markUnread}><MarkUnread size={24} /></button>
{/if}
+ <button class="tb" aria-label="Move to Bin" title="Move to Bin" onclick={removeThread}><Trash size={24} /></button>
{/if}
</div>
- {#if bin && confirming === "thread"}<p class="armed-note error">Tap the bin again to delete forever.</p>{/if}
{#if error}
- <p class="error">{error}</p>
+ <p class="error pad">{error}</p>
{:else if !thread}
- <p class="muted">Loading…</p>
+ <p class="loading"><LoaderCircle size={40} /></p>
{:else}
<h2>{thread.subject || "(no subject)"}</h2>
+ <!-- Wide screens have no top bar, so the thread's actions sit here. -->
{#if bin}
<div class="actions">
- <button class="btn accent" onclick={restoreThread}><ArchiveRestore size={14} /> Restore</button>
+ <button class="btn accent" onclick={restoreThread}><ArchiveRestore size={18} /> Restore</button>
<button class="btn danger" title="Delete forever (Del)" onclick={removeThread}>
- <Trash size={14} />
- {confirming === "thread" ? "Press again to delete forever" : "Delete forever"}
+ <CircleX size={18} />
+ {confirming === "thread" ? "Click again to delete forever" : "Delete forever"}
</button>
</div>
{:else if last}
<div class="actions">
- <button class="btn accent" title="Reply (R)" onclick={() => composeReply(last)}><Reply size={14} /> Reply</button>
- <button class="btn" title="Forward (F)" onclick={() => composeForward(last)}><Forward size={14} /> Forward</button>
+ <button class="btn accent" title="Reply (R)" onclick={() => composeReply(last)}><Reply size={18} /> Reply</button>
+ <button class="btn" title="Forward (F)" onclick={() => composeForward(last)}><Forward size={18} /> Forward</button>
<button class="btn" class:starred={thread.starred} aria-pressed={thread.starred} onclick={toggleStar}>
- <Star size={14} fill={thread.starred ? "currentColor" : "none"} />
+ <Star size={18} fill={thread.starred ? "currentColor" : "none"} />
{thread.starred ? "Starred" : "Star"}
</button>
{#if hasInbound}
- <button class="btn" onclick={markUnread}><MailOpen size={14} /> Mark unread</button>
+ <button class="btn" onclick={markUnread}><MarkUnread size={18} /> Mark as unread</button>
{/if}
- <button class="btn danger" title="Move to Bin (Del)" onclick={removeThread}><Trash size={14} /> Delete</button>
+ <button class="btn danger" title="Move to Bin (Del)" onclick={removeThread}><Trash size={18} /> Move to Bin</button>
</div>
{/if}
- {#each newestFirst as m (m.id)}
+ {#each thread.messages as m (m.id)}
{@const open = isOpen(m)}
- <section class="message" class:draft={m.folder === "drafts"} class:collapsed={!open}>
- <header>
- <button
- class="summary"
- onclick={() => toggle(m)}
- disabled={m.id === newestId}
- aria-expanded={open}
- title={m.id === newestId ? undefined : open ? "Collapse" : "Expand"}
- >
- <span class="badge {m.folder}">{m.folder === "inbox" ? "received" : m.folder === "sent" ? "sent" : "draft"}</span>
- <strong title={m.from}>{displayName(m.from)}</strong>
- {#if open}
- {#if displayName(m.from) !== bareAddress(m.from)}<span class="muted"><{bareAddress(m.from)}></span>{/if}
- <span class="muted" title={[...m.to, ...m.cc, ...m.bcc].join(", ")}>
- to {names(m.to)}{m.cc.length ? `, cc ${names(m.cc)}` : ""}{m.bcc.length ? `, bcc ${names(m.bcc)}` : ""}
- </span>
- {:else}
- <span class="muted snippet">{m.snippet}</span>
- {/if}
- </button>
- <div class="right">
- <time class="muted">{open ? new Date(m.sentAt).toLocaleString() : fmtTime(m.sentAt)}</time>
- {#if open}
- {#if m.folder === "drafts" && !bin}
- <button class="btn icon" title="Edit draft" onclick={() => composeDraft(m)}><Pencil size={14} /></button>
- {/if}
- {#if bin}
- <button class="btn icon" title="Restore this message" onclick={() => restoreMessage(m)}>
- <ArchiveRestore size={14} />
- </button>
- {/if}
- <button
- class="btn icon"
- class:danger={confirming === m.id}
- title={confirming === m.id ? "Click again to delete forever" : bin ? "Delete forever" : "Move to Bin"}
- onclick={() => removeMessage(m)}
- >
- <Trash size={14} />
- </button>
+ {@const draft = m.folder === "drafts"}
+ <!-- The app's message card: tap the header to open or close it. -->
+ <section class="message">
+ <button class="head" onclick={() => toggle(m)} aria-expanded={open}>
+ <span class="top">
+ <strong class:draft title={m.from}>{draft ? "Draft" : displayName(m.from)}</strong>
+ <time title={new Date(m.sentAt).toLocaleString()}>{fmtTime(m.sentAt)}</time>
+ </span>
+ {#if !open}
+ <span class="line">{m.snippet}</span>
+ {:else}
+ <span class="small">{bareAddress(m.from)}</span>
+ {#if m.to.length}<span class="small">To: {m.to.join(", ")}</span>{/if}
+ {#if m.cc.length}<span class="small">Cc: {m.cc.join(", ")}</span>{/if}
+ {#if m.bcc.length}<span class="small">Bcc: {m.bcc.join(", ")}</span>{/if}
+ {/if}
+ </button>
+
+ {#if open}
+ {#if m.html}
+ <EmailFrame html={m.html} attachments={m.attachments} />
+ {:else}
+ <pre>{m.text ?? "(empty message)"}</pre>
+ {/if}
+
+ {#if files(m).length}
+ <ul class="files">
+ {#each files(m) as a (a.id)}
+ <li>
+ {#if isImage(a.contentType)}
+ <a class="preview" href={api.attachmentUrl(a.id, true)} target="_blank" rel="noopener">
+ <img src={api.attachmentUrl(a.id, true)} alt={a.filename} />
+ </a>
+ {/if}
+ <a class="chip" href={api.attachmentUrl(a.id)} download={a.filename}>
+ <Paperclip size={18} />
+ <span>{a.filename} · {fmtSize(a.size)}</span>
+ </a>
+ </li>
+ {/each}
+ </ul>
+ {/if}
+
+ <div class="foot">
+ {#if draft && !bin}
+ <button class="btn text" onclick={() => composeDraft(m)}><Pencil size={18} /> Edit</button>
+ {:else if !bin}
+ <button class="btn text" onclick={() => composeReply(m)}><Reply size={18} /> Reply</button>
+ <button class="btn text" onclick={() => composeForward(m)}><Forward size={18} /> Forward</button>
{/if}
- {#if m.id !== newestId}
- <button class="btn icon chevron" class:open title={open ? "Collapse" : "Expand"} onclick={() => toggle(m)}>
- <ChevronDown size={14} />
+ <span class="spacer"></span>
+ {#if bin}
+ <button class="btn icon" title="Restore this message" aria-label="Restore this message" onclick={() => restoreMessage(m)}>
+ <ArchiveRestore size={24} />
</button>
{/if}
+ <button
+ class="btn icon"
+ class:danger={confirming === m.id}
+ title={confirming === m.id ? "Tap again to delete forever" : bin ? "Delete forever" : "Move to Bin"}
+ aria-label={confirming === m.id ? "Tap again to delete forever" : bin ? "Delete forever" : "Move to Bin"}
+ onclick={() => removeMessage(m)}
+ >
+ <Trash size={24} />
+ </button>
</div>
- </header>
-
- {#if open}
- {#if m.html}
- <EmailFrame html={m.html} attachments={m.attachments} />
- {:else}
- <pre>{m.text ?? "(empty message)"}</pre>
- {/if}
-
- {#if files(m).length}
- <ul class="files">
- {#each files(m) as a (a.id)}
- <li>
- {#if isImage(a.contentType)}
- <a href={api.attachmentUrl(a.id, true)} target="_blank" rel="noopener">
- <img src={api.attachmentUrl(a.id, true)} alt={a.filename} />
- </a>
- {/if}
- <a href={api.attachmentUrl(a.id)} download={a.filename}><Paperclip size={12} /> {a.filename}</a>
- <span class="muted">({fmtSize(a.size)})</span>
- </li>
- {/each}
- </ul>
- {/if}
{/if}
</section>
{/each}
-
- {#if !bin && last}
- <div class="replies">
- <button class="btn" onclick={() => composeReply(last)}><Reply size={16} /> Reply</button>
- <button class="btn" onclick={() => composeForward(last)}><Forward size={16} /> Forward</button>
- </div>
- {/if}
{/if}
</article>
<style>
.view {
+ display: flex;
+ flex-direction: column;
+ gap: 0.625rem;
overflow-y: auto;
- padding-right: 0.25rem;
+ padding: 0 0.25rem 1rem 0;
}
- .topbar,
- .armed-note,
- .replies {
+ .topbar {
display: none;
}
- h2 {
- margin: 0.5rem 0 1rem;
- font-size: 1.35rem;
- font-weight: 700;
- letter-spacing: -0.01em;
+ .pad {
+ padding: 1rem;
}
- .message {
- margin-bottom: 0.75rem;
- padding: 1.25rem 1.5rem;
- border: 1px solid var(--line);
- border-radius: var(--radius);
- background: var(--panel);
- backdrop-filter: blur(14px);
+ .loading {
+ display: grid;
+ place-items: center;
+ margin: 0;
+ padding: 3rem;
}
- .message.draft {
- border-style: dashed;
- border-color: var(--accent-line);
+ /* Material's headlineSmall, as the app titles a conversation. */
+ h2 {
+ margin: 0.5rem 0.25rem 0.25rem;
+ font-size: 1.5rem;
+ font-weight: 400;
+ line-height: 1.33;
}
- header {
+ .actions {
display: flex;
flex-wrap: wrap;
- justify-content: space-between;
gap: 0.5rem;
- margin-bottom: 0.9rem;
- font-size: 0.85rem;
+ margin: 0 0.25rem 0.25rem;
+ }
+
+ /* Material's card, filled with the same faint white as the app's. */
+ .message {
+ flex-shrink: 0;
+ border-radius: 0.75rem;
+ background: rgb(255 255 255 / 5%);
+ overflow: hidden;
+ }
+
+ .head {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ padding: 0.875rem;
+ border: none;
+ background: none;
+ color: inherit;
+ font-size: 1rem;
+ text-align: left;
+ cursor: pointer;
}
- .right {
+ .top {
display: flex;
align-items: center;
- gap: 0.4rem;
+ gap: 0.5rem;
}
- .badge {
- margin-right: 0.4rem;
- padding: 0.05rem 0.55rem;
- border: 1px solid var(--line);
- border-radius: 999px;
- color: var(--muted);
- font-size: 0.65rem;
+ .top strong {
+ flex: 1;
+ overflow: hidden;
font-weight: 600;
- letter-spacing: 0.14em;
- text-transform: uppercase;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
- .badge.inbox {
- border-color: var(--accent-line);
- background: var(--accent-dim);
- color: var(--accent);
+ .top strong.draft {
+ color: var(--danger);
+ }
+
+ time,
+ .small {
+ color: var(--muted);
+ font-size: 0.75rem;
+ font-weight: 500;
+ }
+
+ time {
+ white-space: nowrap;
+ }
+
+ .small {
+ overflow-wrap: anywhere;
+ }
+
+ .line {
+ overflow: hidden;
+ color: var(--muted);
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
pre {
margin: 0;
+ padding: 0 0.875rem;
font-family: var(--mono);
white-space: pre-wrap;
overflow-wrap: anywhere;
}
+ /* Attachments as Material assist chips; images get a preview above. */
.files {
display: flex;
flex-wrap: wrap;
- gap: 0.75rem;
+ gap: 0.5rem;
list-style: none;
- margin: 0.9rem 0 0;
- padding: 0;
- font-size: 0.85rem;
+ margin: 0;
+ padding: 0.5rem 0.875rem;
}
.files li {
display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 0.3rem 0.4rem;
- }
-
- /* An image preview sits on its own line above the file name. */
- .files li > a:has(img) {
- flex-basis: 100%;
+ flex-direction: column;
+ align-items: flex-start;
+ gap: 0.4rem;
+ min-width: 0;
}
.files img {
+ display: block;
max-width: 160px;
max-height: 120px;
- border-radius: var(--radius-sm);
- outline: 1px solid var(--line);
- transition: outline-color 0.15s ease;
+ border-radius: 0.5rem;
}
- .files a:hover img {
- outline-color: var(--accent);
- }
-
- .actions {
- display: flex;
- flex-wrap: wrap;
+ .chip {
+ display: inline-flex;
+ align-items: center;
gap: 0.5rem;
- margin-bottom: 1rem;
- }
-
- /* Collapsed: one line (sender, preview, time); click to open. */
- .message.collapsed {
- padding-block: 0.6rem;
- transition: border-color 0.15s ease;
- }
-
- .message.collapsed:hover {
- border-color: var(--accent-line);
- }
-
- .message.collapsed header {
- flex-wrap: nowrap;
- margin-bottom: 0;
- }
-
- .summary {
- display: flex;
- flex: 1;
- flex-wrap: wrap;
- align-items: baseline;
- gap: 0.35rem;
- min-width: 0;
- padding: 0;
- border: none;
- background: none;
- color: inherit;
- font-size: inherit;
- text-align: left;
- cursor: pointer;
- }
-
- .summary:disabled {
- cursor: default;
- }
-
- .collapsed .summary {
- flex-wrap: nowrap;
- }
-
- .collapsed .summary strong {
- flex-shrink: 0;
+ max-width: 100%;
+ min-height: 2rem;
+ padding: 0 1rem 0 0.5rem;
+ border: 1px solid var(--outline);
+ border-radius: 0.5rem;
+ color: var(--text);
+ font-size: 0.875rem;
+ font-weight: 500;
+ text-decoration: none;
+ }
+
+ .chip :global(svg) {
+ color: var(--accent);
}
- .snippet {
+ .chip span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
- .right time {
- white-space: nowrap;
+ .chip:hover {
+ background: rgb(255 255 255 / 8%);
+ color: var(--text);
+ }
+
+ .foot {
+ display: flex;
+ align-items: center;
+ padding: 0.25rem;
}
- .chevron :global(svg) {
- transition: transform 0.15s ease;
+ .spacer {
+ flex: 1;
}
- .chevron.open :global(svg) {
- transform: rotate(180deg);
+ .starred {
+ color: var(--star);
}
- /* Phones: full-bleed like Gmail's app, with flatter message cards. */
+ /* Phones: one screen at a time, under the app's top bar. */
@media (max-width: 800px) {
.view {
- padding: 0 0 2rem;
+ padding: 0 0.75rem 2rem;
}
.topbar {
@@ -502,84 +489,45 @@
z-index: 2;
display: flex;
justify-content: flex-end;
- gap: 0.25rem;
- padding: calc(0.4rem + env(safe-area-inset-top)) 0.5rem 0.4rem;
- background: var(--panel);
- backdrop-filter: blur(14px);
+ align-items: center;
+ min-height: 4rem;
+ margin: 0 -0.75rem;
+ padding: env(safe-area-inset-top) 0.25rem 0;
+ background: var(--bg);
}
.tb {
display: grid;
place-items: center;
- width: 2.75rem;
- height: 2.75rem;
+ width: 3rem;
+ height: 3rem;
padding: 0;
border: none;
border-radius: 50%;
background: none;
- color: var(--text);
+ color: var(--muted);
cursor: pointer;
}
.tb:first-child {
margin-right: auto;
+ color: var(--text);
}
.tb:hover {
- background: var(--raised-hover);
+ background: rgb(255 255 255 / 8%);
}
.tb.armed {
- background: rgb(255 92 122 / 14%);
color: var(--danger);
}
- .armed-note {
- display: block;
- margin: 0.5rem 1rem 0;
- font-size: 0.85rem;
+ .tb.starred {
+ color: var(--star);
}
.actions {
display: none;
}
-
- h2 {
- margin: 0.75rem 1rem 1rem;
- font-size: 1.3rem;
- font-weight: 500;
- }
-
- .message {
- margin: 0 0 0.5rem;
- padding: 1rem;
- border-width: 1px 0;
- border-radius: 0;
- }
-
- .message.collapsed {
- padding-block: 0.75rem;
- }
-
- .right time {
- font-size: 0.75rem;
- }
-
- .replies {
- display: flex;
- gap: 0.75rem;
- padding: 1rem;
- }
-
- .replies .btn {
- flex: 1;
- justify-content: center;
- padding-block: 0.65rem;
- font-size: 0.95rem;
- }
- }
-
- .starred {
- color: var(--star);
}
</style>
diff --git a/email/src/web/iconsax.d.ts b/email/src/web/iconsax.d.ts
deleted file mode 100644
index b8f8756..0000000
--- a/email/src/web/iconsax.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/* src/web/iconsax.d.ts
- * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
- * Licensed under the DASL-1.0 Licence.
- * See LICENCE.md in the project root for full licence information.
- */
-
-// <iconsax-icon> is registered by `import "iconsax"` in main.ts
-declare module "svelte/elements" {
- export interface SvelteHTMLElements {
- "iconsax-icon": HTMLAttributes<HTMLElement> & {
- name: string;
- type?: "bold" | "broken" | "bulk" | "linear" | "outline" | "twotone";
- size?: number | string;
- color?: string;
- pro?: boolean;
- };
- }
-}
-
-export {};
diff --git a/email/src/web/lib/icons/AllInbox.svelte b/email/src/web/lib/icons/AllInbox.svelte
new file mode 100644
index 0000000..01badf8
--- /dev/null
+++ b/email/src/web/lib/icons/AllInbox.svelte
@@ -0,0 +1,12 @@
+<!-- src/web/lib/icons/AllInbox.svelte
+ Licensed under the DASL-1.0 Licence — (c) Clove Twilight
+-->
+
+<script lang="ts">
+ import Icon from "./Icon.svelte";
+
+ let props: { size?: number; class?: string; [key: string]: unknown } = $props();
+</script>
+
+<!-- Material "all_inbox" -->
+<Icon svg={`<path d="M19 3H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 10h3.13c.21.78.67 1.47 1.27 2H5v-2zm14 2h-4.4c.6-.53 1.06-1.22 1.27-2H19v2zm0-4h-5v1c0 1.07-.93 2-2 2s-2-.93-2-2V8H5V5h14v3zm-2 7h-3v1c0 .47-.19.9-.48 1.25-.37.45-.92.75-1.52.75s-1.15-.3-1.52-.75c-.29-.35-.48-.78-.48-1.25v-1H3v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4h-4zM5 17h3.13c.02.09.06.17.09.25.24.68.65 1.28 1.18 1.75H5v-2zm14 2h-4.4c.54-.47.95-1.07 1.18-1.75.03-.08.07-.16.09-.25H19v2z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/AlternateEmail.svelte b/email/src/web/lib/icons/AlternateEmail.svelte
new file mode 100644
index 0000000..8f11262
--- /dev/null
+++ b/email/src/web/lib/icons/AlternateEmail.svelte
@@ -0,0 +1,12 @@
+<!-- src/web/lib/icons/AlternateEmail.svelte
+ Licensed under the DASL-1.0 Licence — (c) Clove Twilight
+-->
+
+<script lang="ts">
+ import Icon from "./Icon.svelte";
+
+ let props: { size?: number; class?: string; [key: string]: unknown } = $props();
+</script>
+
+<!-- Material "alternate_email" -->
+<Icon svg={`<path d="M12 1.95c-5.52 0-10 4.48-10 10s4.48 10 10 10h5v-2h-5c-4.34 0-8-3.66-8-8s3.66-8 8-8 8 3.66 8 8v1.43c0 .79-.71 1.57-1.5 1.57s-1.5-.78-1.5-1.57v-1.43c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5c1.38 0 2.64-.56 3.54-1.47.65.89 1.77 1.47 2.96 1.47 1.97 0 3.5-1.6 3.5-3.57v-1.43c0-5.52-4.48-10-10-10zm0 13c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/ArchiveRestore.svelte b/email/src/web/lib/icons/ArchiveRestore.svelte
index 1c38d0e..00b6ae0 100644
--- a/email/src/web/lib/icons/ArchiveRestore.svelte
+++ b/email/src/web/lib/icons/ArchiveRestore.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="archive-tick" {...props} />
+<!-- Material "restore_from_trash" -->
+<Icon svg={`<path d="m15.5 4-1-1h-5l-1 1H5v2h14V4zM6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2-5V9h8v10H8v-5zm2 4h4v-4h2l-4-4-4 4h2z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/ArrowLeft.svelte b/email/src/web/lib/icons/ArrowLeft.svelte
index 536e98c..341c177 100644
--- a/email/src/web/lib/icons/ArrowLeft.svelte
+++ b/email/src/web/lib/icons/ArrowLeft.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="arrow-left-01" {...props} />
+<!-- Material "arrow_back" -->
+<Icon svg={`<path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Bell.svelte b/email/src/web/lib/icons/Bell.svelte
index 256ff0a..600fe15 100644
--- a/email/src/web/lib/icons/Bell.svelte
+++ b/email/src/web/lib/icons/Bell.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="notification" {...props} />
+<!-- Material "notifications" -->
+<Icon svg={`<path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/ChevronDown.svelte b/email/src/web/lib/icons/ChevronDown.svelte
index 21bdbdf..f02a764 100644
--- a/email/src/web/lib/icons/ChevronDown.svelte
+++ b/email/src/web/lib/icons/ChevronDown.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="arrow-down-01" {...props} />
+<!-- Material "expand_more" -->
+<Icon svg={`<path d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/ChevronRight.svelte b/email/src/web/lib/icons/ChevronRight.svelte
index 1ce5c10..318e6cf 100644
--- a/email/src/web/lib/icons/ChevronRight.svelte
+++ b/email/src/web/lib/icons/ChevronRight.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="arrow-right-01" {...props} />
+<!-- Material "chevron_right" -->
+<Icon svg={`<path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/CircleX.svelte b/email/src/web/lib/icons/CircleX.svelte
index 949e128..1318f3f 100644
--- a/email/src/web/lib/icons/CircleX.svelte
+++ b/email/src/web/lib/icons/CircleX.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="close-circle" {...props} />
+<!-- Material "delete_forever" -->
+<Icon svg={`<path d="M14.12 10.47 12 12.59l-2.13-2.12-1.41 1.41L10.59 14l-2.12 2.12 1.41 1.41L12 15.41l2.12 2.12 1.41-1.41L13.41 14l2.12-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4zM6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Eye.svelte b/email/src/web/lib/icons/Eye.svelte
index a41f997..476e5e9 100644
--- a/email/src/web/lib/icons/Eye.svelte
+++ b/email/src/web/lib/icons/Eye.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="eye" {...props} />
+<!-- Material "open_in_new" -->
+<Icon svg={`<path d="M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/FileText.svelte b/email/src/web/lib/icons/FileText.svelte
index 7aba5d9..593dc2c 100644
--- a/email/src/web/lib/icons/FileText.svelte
+++ b/email/src/web/lib/icons/FileText.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="document-text" {...props} />
+<!-- Material "drafts" -->
+<Icon svg={`<path d="M21.99 8c0-.72-.37-1.35-.94-1.7L12 1 2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2l-.01-10zm-2 0v.01L12 13 4 8l8-4.68L19.99 8zM4 18v-7.66l8 5.02 7.99-4.99L20 18H4z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Forward.svelte b/email/src/web/lib/icons/Forward.svelte
index 24c8cfd..9b30ec5 100644
--- a/email/src/web/lib/icons/Forward.svelte
+++ b/email/src/web/lib/icons/Forward.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="forward-item" {...props} />
+<!-- Material "forward" -->
+<Icon svg={`<path d="M14 8.83 17.17 12 14 15.17V14H6v-4h8V8.83M12 4v4H4v8h8v4l8-8-8-8z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Globe.svelte b/email/src/web/lib/icons/Globe.svelte
index 17c700f..1a2fbea 100644
--- a/email/src/web/lib/icons/Globe.svelte
+++ b/email/src/web/lib/icons/Globe.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="global" {...props} />
+<!-- Material "language" -->
+<Icon svg={`<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95a15.65 15.65 0 0 0-1.38-3.56A8.03 8.03 0 0 1 18.92 8zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56A7.987 7.987 0 0 1 5.08 16zm2.95-8H5.08a7.987 7.987 0 0 1 4.33-3.56A15.65 15.65 0 0 0 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95a8.03 8.03 0 0 1-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Icon.svelte b/email/src/web/lib/icons/Icon.svelte
index 038136f..350d124 100644
--- a/email/src/web/lib/icons/Icon.svelte
+++ b/email/src/web/lib/icons/Icon.svelte
@@ -3,20 +3,29 @@
-->
<script lang="ts">
- // One iconsax icon, the set doughmination.gay uses. Sized by `size`, or by a CSS class
+ // One Material icon (outlined), the set the Android app uses. `svg` is the
+ // icon's own markup, from @material-design-icons/svg; it's a constant in
+ // each icon's component, never user input. Sized by `size`, or by a CSS class.
let {
- name,
+ svg,
size = 24,
- type = "bulk",
class: className = "",
...rest
}: {
- name: string;
+ svg: string;
size?: number;
- type?: "bold" | "broken" | "bulk" | "linear" | "outline" | "twotone";
class?: string;
[key: string]: unknown;
} = $props();
</script>
-<iconsax-icon {name} {type} {size} class={className} aria-hidden="true" {...rest}></iconsax-icon>
+<svg class="icon {className}" width={size} height={size} viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" {...rest}>
+ <!-- eslint-disable-next-line svelte/no-at-html-tags -->
+ {@html svg}
+</svg>
+
+<style>
+ .icon {
+ flex-shrink: 0;
+ }
+</style>
diff --git a/email/src/web/lib/icons/Image.svelte b/email/src/web/lib/icons/Image.svelte
index 9788d00..2a17059 100644
--- a/email/src/web/lib/icons/Image.svelte
+++ b/email/src/web/lib/icons/Image.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="gallery" {...props} />
+<!-- Material "image" -->
+<Icon svg={`<path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86-3 3.87L9 13.14 6 17h12l-3.86-5.14z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Inbox.svelte b/email/src/web/lib/icons/Inbox.svelte
index 11b5608..625e321 100644
--- a/email/src/web/lib/icons/Inbox.svelte
+++ b/email/src/web/lib/icons/Inbox.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="direct-inbox" {...props} />
+<!-- Material "inbox" -->
+<Icon svg={`<path d="M19 3H5c-1.1 0-2 .9-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5v-3h3.56c.69 1.19 1.97 2 3.45 2s2.75-.81 3.45-2H19v3zm0-5h-4.99c0 1.1-.9 2-2 2s-2-.9-2-2H5V5h14v9z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/LoaderCircle.svelte b/email/src/web/lib/icons/LoaderCircle.svelte
index 22a5703..81875f6 100644
--- a/email/src/web/lib/icons/LoaderCircle.svelte
+++ b/email/src/web/lib/icons/LoaderCircle.svelte
@@ -3,9 +3,45 @@
-->
<script lang="ts">
- import Icon from "./Icon.svelte";
-
- let props: { size?: number; class?: string; [key: string]: unknown } = $props();
+ // A Material circular progress indicator, like the app's spinner. Spins by
+ // itself; a `spin` class from the caller is harmless.
+ let { size = 24, class: className = "" }: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="refresh-circle" {...props} />
+<svg class="loader {className}" width={size} height={size} viewBox="0 0 24 24" aria-hidden="true">
+ <circle cx="12" cy="12" r="9" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" pathLength="100" />
+</svg>
+
+<style>
+ .loader {
+ flex-shrink: 0;
+ color: var(--accent);
+ animation: loader-spin 1.4s linear infinite;
+ }
+
+ circle {
+ stroke-dasharray: 60 100;
+ animation: loader-arc 1.4s ease-in-out infinite;
+ }
+
+ @keyframes loader-spin {
+ to {
+ transform: rotate(360deg);
+ }
+ }
+
+ @keyframes loader-arc {
+ 0% {
+ stroke-dasharray: 5 100;
+ stroke-dashoffset: 0;
+ }
+ 50% {
+ stroke-dasharray: 70 100;
+ stroke-dashoffset: -15;
+ }
+ 100% {
+ stroke-dasharray: 5 100;
+ stroke-dashoffset: -100;
+ }
+ }
+</style>
diff --git a/email/src/web/lib/icons/LogOut.svelte b/email/src/web/lib/icons/LogOut.svelte
index b0208f3..cac9521 100644
--- a/email/src/web/lib/icons/LogOut.svelte
+++ b/email/src/web/lib/icons/LogOut.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="logout-01" {...props} />
+<!-- Material "logout" -->
+<Icon svg={`<path d="m17 8-1.41 1.41L17.17 11H9v2h8.17l-1.58 1.58L17 16l4-4-4-4zM5 5h7V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h7v-2H5V5z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Mail.svelte b/email/src/web/lib/icons/Mail.svelte
index 3051c87..edcbc31 100644
--- a/email/src/web/lib/icons/Mail.svelte
+++ b/email/src/web/lib/icons/Mail.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="sms" {...props} />
+<!-- Material "mail" -->
+<Icon svg={`<path d="M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0-8 4.99L4 6h16zm0 12H4V8l8 5 8-5v10z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/MailOpen.svelte b/email/src/web/lib/icons/MailOpen.svelte
deleted file mode 100644
index 2e9921a..0000000
--- a/email/src/web/lib/icons/MailOpen.svelte
+++ /dev/null
@@ -1,11 +0,0 @@
-<!-- src/web/lib/icons/MailOpen.svelte
- Licensed under the DASL-1.0 Licence — (c) Clove Twilight
--->
-
-<script lang="ts">
- import Icon from "./Icon.svelte";
-
- let props: { size?: number; class?: string; [key: string]: unknown } = $props();
-</script>
-
-<Icon name="sms-notification" {...props} />
diff --git a/email/src/web/lib/icons/MarkRead.svelte b/email/src/web/lib/icons/MarkRead.svelte
new file mode 100644
index 0000000..96409ab
--- /dev/null
+++ b/email/src/web/lib/icons/MarkRead.svelte
@@ -0,0 +1,12 @@
+<!-- src/web/lib/icons/MarkRead.svelte
+ Licensed under the DASL-1.0 Licence — (c) Clove Twilight
+-->
+
+<script lang="ts">
+ import Icon from "./Icon.svelte";
+
+ let props: { size?: number; class?: string; [key: string]: unknown } = $props();
+</script>
+
+<!-- Material "mark_email_read" -->
+<Icon svg={`<path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h8v-2H4V8l8 5 8-5v5h2V6c0-1.1-.9-2-2-2zm-8 7L4 6h16l-8 5zm5.34 11-3.54-3.54 1.41-1.41 2.12 2.12 4.24-4.24L23 16.34 17.34 22z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/MarkUnread.svelte b/email/src/web/lib/icons/MarkUnread.svelte
new file mode 100644
index 0000000..f8f8e4e
--- /dev/null
+++ b/email/src/web/lib/icons/MarkUnread.svelte
@@ -0,0 +1,12 @@
+<!-- src/web/lib/icons/MarkUnread.svelte
+ Licensed under the DASL-1.0 Licence — (c) Clove Twilight
+-->
+
+<script lang="ts">
+ import Icon from "./Icon.svelte";
+
+ let props: { size?: number; class?: string; [key: string]: unknown } = $props();
+</script>
+
+<!-- Material "mark_email_unread" -->
+<Icon svg={`<path d="M22 8.98V18c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2l.01-12c0-1.1.89-2 1.99-2h10.1c-.06.32-.1.66-.1 1s.04.68.1 1H4l8 5 3.67-2.29c.47.43 1.02.76 1.63.98L12 13 4 8v10h16V9.9c.74-.15 1.42-.48 2-.92zM16 5c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Menu.svelte b/email/src/web/lib/icons/Menu.svelte
index 3258feb..99194c7 100644
--- a/email/src/web/lib/icons/Menu.svelte
+++ b/email/src/web/lib/icons/Menu.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="textalign-justifycenter" {...props} />
+<!-- Material "menu" -->
+<Icon svg={`<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Mobile.svelte b/email/src/web/lib/icons/Mobile.svelte
index d165399..eb9f1fd 100644
--- a/email/src/web/lib/icons/Mobile.svelte
+++ b/email/src/web/lib/icons/Mobile.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="mobile" {...props} />
+<!-- Material "phone_android" -->
+<Icon svg={`<path d="M16 1H8C6.34 1 5 2.34 5 4v16c0 1.66 1.34 3 3 3h8c1.66 0 3-1.34 3-3V4c0-1.66-1.34-3-3-3zm1 17H7V4h10v14zm-3 3h-4v-1h4v1z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/MoreVert.svelte b/email/src/web/lib/icons/MoreVert.svelte
new file mode 100644
index 0000000..51cde1a
--- /dev/null
+++ b/email/src/web/lib/icons/MoreVert.svelte
@@ -0,0 +1,12 @@
+<!-- src/web/lib/icons/MoreVert.svelte
+ Licensed under the DASL-1.0 Licence — (c) Clove Twilight
+-->
+
+<script lang="ts">
+ import Icon from "./Icon.svelte";
+
+ let props: { size?: number; class?: string; [key: string]: unknown } = $props();
+</script>
+
+<!-- Material "more_vert" -->
+<Icon svg={`<path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Paperclip.svelte b/email/src/web/lib/icons/Paperclip.svelte
index 88d18c6..3bea27f 100644
--- a/email/src/web/lib/icons/Paperclip.svelte
+++ b/email/src/web/lib/icons/Paperclip.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="paperclip" {...props} />
+<!-- Material "attach_file" -->
+<Icon svg={`<path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 0 1 5 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 0 0 5 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Pencil.svelte b/email/src/web/lib/icons/Pencil.svelte
index 26119d4..a3b61f7 100644
--- a/email/src/web/lib/icons/Pencil.svelte
+++ b/email/src/web/lib/icons/Pencil.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="edit-2" {...props} />
+<!-- Material "edit" -->
+<Icon svg={`<path d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Plus.svelte b/email/src/web/lib/icons/Plus.svelte
index 12b8bf3..5c1c832 100644
--- a/email/src/web/lib/icons/Plus.svelte
+++ b/email/src/web/lib/icons/Plus.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="add" {...props} />
+<!-- Material "add" -->
+<Icon svg={`<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/RefreshCw.svelte b/email/src/web/lib/icons/RefreshCw.svelte
index 6f7e968..b9043d2 100644
--- a/email/src/web/lib/icons/RefreshCw.svelte
+++ b/email/src/web/lib/icons/RefreshCw.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="refresh-arrow-01" {...props} />
+<!-- Material "refresh" -->
+<Icon svg={`<path d="M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Reply.svelte b/email/src/web/lib/icons/Reply.svelte
index 0ccac3f..8ad4b91 100644
--- a/email/src/web/lib/icons/Reply.svelte
+++ b/email/src/web/lib/icons/Reply.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="undo-arrow" {...props} />
+<!-- Material "reply" -->
+<Icon svg={`<path d="M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Send.svelte b/email/src/web/lib/icons/Send.svelte
index 8f5e80a..cec1b08 100644
--- a/email/src/web/lib/icons/Send.svelte
+++ b/email/src/web/lib/icons/Send.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="send-2" {...props} />
+<!-- Material "send" -->
+<Icon svg={`<path d="m4.01 6.03 7.51 3.22-7.52-1 .01-2.22m7.5 8.72L4 17.97v-2.22l7.51-1M2.01 3 2 10l15 2-15 2 .01 7L23 12 2.01 3z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Settings.svelte b/email/src/web/lib/icons/Settings.svelte
index 55bb4a1..c52af34 100644
--- a/email/src/web/lib/icons/Settings.svelte
+++ b/email/src/web/lib/icons/Settings.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="setting-2" {...props} />
+<!-- Material "settings" -->
+<Icon svg={`<path d="M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46a.5.5 0 0 0-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.488.488 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1a.566.566 0 0 0-.18-.03c-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46a.5.5 0 0 0 .61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Shield.svelte b/email/src/web/lib/icons/Shield.svelte
index f6af30f..a2d4300 100644
--- a/email/src/web/lib/icons/Shield.svelte
+++ b/email/src/web/lib/icons/Shield.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="shield" {...props} />
+<!-- Material "shield" -->
+<Icon svg={`<path d="M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5l-8-3zm6 9.09c0 4-2.55 7.7-6 8.83-3.45-1.13-6-4.82-6-8.83v-4.7l6-2.25 6 2.25v4.7z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/ShieldCheck.svelte b/email/src/web/lib/icons/ShieldCheck.svelte
index 7f25e54..1639f6f 100644
--- a/email/src/web/lib/icons/ShieldCheck.svelte
+++ b/email/src/web/lib/icons/ShieldCheck.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="shield-tick" {...props} />
+<!-- Material "privacy_tip" -->
+<Icon svg={`<path d="m12 3.19 7 3.11V11c0 4.52-2.98 8.69-7 9.93-4.02-1.24-7-5.41-7-9.93V6.3l7-3.11M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-1 6h2v2h-2V7zm0 4h2v6h-2v-6z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/SquarePen.svelte b/email/src/web/lib/icons/SquarePen.svelte
index 02b7ca2..b63cefa 100644
--- a/email/src/web/lib/icons/SquarePen.svelte
+++ b/email/src/web/lib/icons/SquarePen.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="edit" {...props} />
+<!-- Material "edit" -->
+<Icon svg={`<path d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Star.svelte b/email/src/web/lib/icons/Star.svelte
index 505fa76..b3e24a7 100644
--- a/email/src/web/lib/icons/Star.svelte
+++ b/email/src/web/lib/icons/Star.svelte
@@ -5,16 +5,9 @@
<script lang="ts">
import Icon from "./Icon.svelte";
- // `fill="currentColor"` (lucide's way of saying starred) becomes iconsax's solid style
- let {
- fill = "none",
- ...props
- }: {
- fill?: string;
- size?: number;
- class?: string;
- [key: string]: unknown;
- } = $props();
+ // Filled when `fill` is set (starred), an outline otherwise, as in the app.
+ let { fill = "none", ...props }: { size?: number; class?: string; fill?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="star" type={fill === "none" ? "linear" : "bold"} {...props} />
+<!-- Material "star" and "star_outline" -->
+<Icon svg={fill === "none" ? `<path d="m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/>` : `<path d="M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/StarOff.svelte b/email/src/web/lib/icons/StarOff.svelte
index 4ed23a9..a43a658 100644
--- a/email/src/web/lib/icons/StarOff.svelte
+++ b/email/src/web/lib/icons/StarOff.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="star-slash" {...props} />
+<!-- Material "star_outline" -->
+<Icon svg={`<path d="m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Trash.svelte b/email/src/web/lib/icons/Trash.svelte
index 645da41..950c2ef 100644
--- a/email/src/web/lib/icons/Trash.svelte
+++ b/email/src/web/lib/icons/Trash.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="trash" {...props} />
+<!-- Material "delete" -->
+<Icon svg={`<path d="M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/Trash2.svelte b/email/src/web/lib/icons/Trash2.svelte
index 598cdf6..eb8537c 100644
--- a/email/src/web/lib/icons/Trash2.svelte
+++ b/email/src/web/lib/icons/Trash2.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="trash" {...props} />
+<!-- Material "delete" -->
+<Icon svg={`<path d="M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"/>`} {...props} />
diff --git a/email/src/web/lib/icons/X.svelte b/email/src/web/lib/icons/X.svelte
index c2ae9d4..dada229 100644
--- a/email/src/web/lib/icons/X.svelte
+++ b/email/src/web/lib/icons/X.svelte
@@ -8,4 +8,5 @@
let props: { size?: number; class?: string; [key: string]: unknown } = $props();
</script>
-<Icon name="close-circle" {...props} />
+<!-- Material "close" -->
+<Icon svg={`<path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/>`} {...props} />
diff --git a/email/src/web/main.ts b/email/src/web/main.ts
index 5539624..27d5923 100644
--- a/email/src/web/main.ts
+++ b/email/src/web/main.ts
@@ -1,8 +1,6 @@
import { mount } from "svelte";
import App from "./App.svelte";
import "./app.css";
-// Registers <iconsax-icon>, the icon set doughmination.gay uses
-import "iconsax";
import { interceptLinks } from "./lib/router.svelte";
const target = document.getElementById("app")!;