mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 04:37:00 +00:00
feat: Allow devices to be removed from the account panel
This commit is contained in:
9 files changed
+172
-41
No files matched your search
@@ -10,7 +10,7 @@ use ruma::{OwnedUserId, UserId};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tower_sessions::Session;
|
||||
|
||||
use crate::{ROUTE_PREFIX, WebError};
|
||||
use crate::{ROUTE_PREFIX, WebError, pages::account::device::RemoveDevicePath};
|
||||
|
||||
pub(crate) mod store;
|
||||
|
||||
@@ -32,6 +32,7 @@ pub(crate) enum LoginTarget {
|
||||
ChangeEmail,
|
||||
CrossSigningReset,
|
||||
Deactivate,
|
||||
RemoveDevice(RemoveDevicePath),
|
||||
}
|
||||
|
||||
impl PartialEq for LoginTarget {
|
||||
@@ -51,6 +52,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(),
|
||||
};
|
||||
|
||||
format!("{ROUTE_PREFIX}/{path}")
|
||||
|
||||
Reference in new issue
Block a user