forked from tangled.org/core
Monorepo for Tangled — https://tangled.org

improve settings styles on mobile

Changed files
+24 -18
appview
pages
templates
+24 -18
appview/pages/templates/settings.html
···
<div class="flex flex-col">
{{ block "profile" . }} {{ end }}
{{ block "keys" . }} {{ end }}
-
{{ block "knots" . }} {{ end }}
{{ block "emails" . }} {{ end }}
</div>
{{ end }}
···
<p class="mb-8">SSH public keys added here will be broadcasted to knots that you are a member of, <br> allowing you to push to repositories there.</p>
<div id="key-list" class="flex flex-col gap-6 mb-8">
{{ range $index, $key := .PubKeys }}
-
<div class="flex justify-between items-center gap-4">
-
<div>
+
<div class="grid grid-cols-[minmax(0,1fr)_auto] items-center gap-4">
+
<div class="flex flex-col gap-1">
<div class="inline-flex items-center gap-4">
<i class="w-3 h-3" data-lucide="key"></i>
<p class="font-bold">{{ .Name }}</p>
-
<p class="text-sm text-gray-500">added {{ .Created | timeFmt }}</p>
</div>
-
<code class="block break-all text-sm text-gray-500">{{ .Key }}</code>
+
<p class="text-sm text-gray-500">added {{ .Created | timeFmt }}</p>
+
<div class="overflow-x-auto whitespace-nowrap flex-1 max-w-full">
+
<code class="text-sm text-gray-500">{{ .Key }}</code>
+
</div>
</div>
<button
class="btn text-red-500 hover:text-red-700"
···
hx-delete="/settings/keys?name={{urlquery .Name}}&rkey={{urlquery .Rkey}}&key={{urlquery .Key}}"
hx-confirm="Are you sure you wish to delete the key '{{ .Name }}'?">
<i class="w-5 h-5" data-lucide="trash-2"></i>
+
<span class="hidden md:inline">delete</span>
</button>
</div>
{{ end }}
···
<p class="mb-8">Commits authored using emails listed here will be associated with your Tangled profile.</p>
<div id="email-list" class="flex flex-col gap-6 mb-8">
{{ range $index, $email := .Emails }}
-
<div class="flex justify-between items-center gap-4">
-
<div>
+
<div class="grid grid-cols-[minmax(0,1fr)_auto] items-center gap-4">
+
<div class="flex flex-col gap-2">
<div class="inline-flex items-center gap-4">
<i class="w-3 h-3" data-lucide="mail"></i>
<p class="font-bold">{{ .Address }}</p>
-
<p class="text-sm text-gray-500">added {{ .CreatedAt | timeFmt }}</p>
-
{{ if .Verified }}
-
<span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded">verified</span>
-
{{ else }}
-
<span class="text-xs bg-yellow-100 text-yellow-800 px-2 py-1 rounded">unverified</span>
-
{{ end }}
-
{{ if .Primary }}
-
<span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">primary</span>
-
{{ end }}
+
<div class="inline-flex items-center gap-1">
+
{{ if .Verified }}
+
<span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded">verified</span>
+
{{ else }}
+
<span class="text-xs bg-yellow-100 text-yellow-800 px-2 py-1 rounded">unverified</span>
+
{{ end }}
+
{{ if .Primary }}
+
<span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">primary</span>
+
{{ end }}
+
</div>
</div>
+
<p class="text-sm text-gray-500">added {{ .CreatedAt | timeFmt }}</p>
</div>
<div class="flex gap-2 items-center">
{{ if not .Verified }}
<a
-
class="text-sm"
+
class="btn flex gap-2"
hx-post="/settings/emails/verify/resend"
hx-swap="none"
href="#"
hx-vals='{"email": "{{ .Address }}"}'>
-
resend verification
+
<i class="w-5 h-5" data-lucide="rotate-cw"></i>
+
<span class="hidden md:inline">resend</span>
</a>
{{ end }}
{{ if and (not .Primary) .Verified }}
···
title="Delete email"
type="submit">
<i class="w-5 h-5" data-lucide="trash-2"></i>
+
<span class="hidden md:inline">delete</span>
</button>
</form>
{{ end }}