diff --git a/templates/pages/account.html b/templates/pages/account.html index 278bcad..08a2aee 100644 --- a/templates/pages/account.html +++ b/templates/pages/account.html @@ -1,24 +1,39 @@ {% extends "base.html" %} {% import "partials/icons.html" as icons %} -{% block title %}Brewlog · Admin{% endblock %} +{% block title %}Brewlog · Account{% endblock %} {% block head %} {% endblock %} {% block content %} - -
-

Passkeys

+
+

Account

+

Manage your passkeys, API tokens, and data.

+
-
- {% for passkey in passkeys %} -
-
-
- {% call icons::key("inline h-4 w-4 mr-1 text-accent") %}{{ passkey.name }} + +
+
+
+

Passkeys

+

Passkeys let you sign in securely without a password.

+
+ +
+ {% for passkey in passkeys %} +
+
+ {% call icons::key("h-4 w-4 text-accent shrink-0") %} +
+ {{ passkey.name }} + + Added {{ passkey.created_at }} + · {% if let Some(last_used) = passkey.last_used_at %}Last used {{ last_used }}{% else %}Never used{% endif %} + +
{% if passkeys.len() > 1 %} {% endif %}
-
-

Added {{ passkey.created_at }}

- {% if let Some(last_used) = passkey.last_used_at %} -

Last used {{ last_used }}

- {% else %} -

Never used

- {% endif %} + {% endfor %} +
+ + {% if passkeys.len() <= 1 %} +

Add another passkey before removing your only one.

+ {% endif %} + + + - {% endfor %} -
- {% if passkeys.len() <= 1 %} -

Add another passkey before removing your only one.

- {% endif %} - - -
-

API Tokens

+
+
+

API Tokens

+

Use tokens to authenticate the CLI or REST API.

+
- {% if tokens.is_empty() %} -

No active tokens. Create one to use the CLI or API.

- {% else %} -
- {% for token in tokens %} -
-
+ {% if tokens.is_empty() %} +

No active tokens.

+ {% else %} +
+ {% for token in tokens %} +
- {{ token.name }} + {{ token.name }} + + Created {{ token.created_at }} + · {% if let Some(last_used) = token.last_used_at %}Last used {{ last_used }}{% else %}Never used{% endif %} +
-
-

Created {{ token.created_at }}

- {% if let Some(last_used) = token.last_used_at %} -

Last used {{ last_used }}

- {% else %} -

Never used

- {% endif %} -
+ {% endfor %}
- {% endfor %} -
- {% endif %} + {% endif %} - -
-
-

Data

-

Export all coffee data as JSON, or restore from a previous backup.

+
+
+
+

Data

+

Export all coffee data as JSON, or restore from a previous backup.

+
-
- - Download Backup - - +
+ + Download Backup + + +
+ + + + +
- - - - -
- + {% if let Some(usage) = ai_usage %} -
-

OpenRouter Usage

-
-
- Total Cost - {{ usage.cost }} -
-
- API Calls - {{ usage.calls }} -
-
- Total Tokens - {{ usage.tokens }} +
+
+

AI Usage

+ +
+
+ Total Cost + {{ usage.cost }} +
+
+ API Calls + {{ usage.calls }} +
+
+ Total Tokens + {{ usage.tokens }} +
diff --git a/templates/pages/cli_callback.html b/templates/pages/cli_callback.html index 4620743..ff51c09 100644 --- a/templates/pages/cli_callback.html +++ b/templates/pages/cli_callback.html @@ -1,23 +1,32 @@ -{% extends "base.html" %} +{% extends "base.html" %} {% import "partials/icons.html" as icons %} {% block title %}Brewlog · CLI Authentication{% endblock %} {% block content %}
{% if token.is_some() %} -

Authenticated

-

- Your CLI has been authenticated. You can close this window. -

+
+ {% call icons::check_circle("h-10 w-10 text-emerald-600 dark:text-emerald-400") %} +

CLI Authenticated

+

+ Your CLI has been authenticated successfully. You can close this window and return to the terminal. +

+
{% else if error.is_some() %} -

Authentication Failed

-
- {{ error.as_ref().unwrap() }} +
+ {% call icons::x_circle("h-10 w-10 text-red-600 dark:text-red-400") %} +

Authentication Failed

+
+ {{ error.as_ref().unwrap() }} +
{% else %} -

CLI Authentication

-

- Processing authentication... -

+
+ {% call icons::spinner("h-10 w-10") %} +

CLI Authentication

+

+ Processing authentication… +

+
{% endif %}
diff --git a/templates/partials/icons.html b/templates/partials/icons.html index 7911da7..ee1c94c 100644 --- a/templates/partials/icons.html +++ b/templates/partials/icons.html @@ -188,6 +188,12 @@ {% endmacro %} +{% macro check_circle(class) %} + +{% endmacro %} + {% macro key(class) %}