feat: Add a page for viewing a device's details

This commit is contained in:
Ginger committed 2026-06-29 09:35:48 -04:00
1 parent 19700a081e
commit 0d806a2038
13 files changed
+221 -93

No files matched your search

+5 -4
View File
@@ -10,7 +10,7 @@ use ruma::{OwnedUserId, UserId};
use serde::{Deserialize, Serialize};
use tower_sessions::Session;
use crate::{ROUTE_PREFIX, WebError, pages::account::device::RemoveDevicePath};
use crate::{ROUTE_PREFIX, WebError, pages::account::device::DevicePath};
pub(crate) mod store;
@@ -32,7 +32,8 @@ pub(crate) enum LoginTarget {
ChangeEmail,
CrossSigningReset,
Deactivate,
RemoveDevice(RemoveDevicePath),
DeviceInfo(DevicePath),
RemoveDevice(DevicePath),
}
impl PartialEq for LoginTarget {
@@ -52,8 +53,8 @@ impl LoginTarget {
| Self::ChangeEmail => "account/email/change/".into(),
| Self::CrossSigningReset => "account/cross_signing_reset".into(),
| Self::Deactivate => "account/deactivate".into(),
| Self::RemoveDevice(path) =>
format!("account/device/{}/remove", path.device,).into(),
| Self::DeviceInfo(path) => format!("account/device/{}/", path.device).into(),
| Self::RemoveDevice(path) => format!("account/device/{}/remove", path.device).into(),
};
format!("{ROUTE_PREFIX}/{path}")