mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-19 09:50:09 +00:00
Add avatar color support
The new web-vault v2023.1.0 supports a custom color for the avatar. https://github.com/bitwarden/server/pull/2330 This PR adds this feature.
This commit is contained in:
parent
c90b3031a6
commit
acc1474394
12 changed files with 42 additions and 1 deletions
|
@ -46,6 +46,8 @@ db_object! {
|
|||
pub client_kdf_iter: i32,
|
||||
|
||||
pub api_key: Option<String>,
|
||||
|
||||
pub avatar_color: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Identifiable, Queryable, Insertable)]
|
||||
|
@ -113,6 +115,8 @@ impl User {
|
|||
client_kdf_iter: Self::CLIENT_KDF_ITER_DEFAULT,
|
||||
|
||||
api_key: None,
|
||||
|
||||
avatar_color: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -226,6 +230,7 @@ impl User {
|
|||
"Providers": [],
|
||||
"ProviderOrganizations": [],
|
||||
"ForcePasswordReset": false,
|
||||
"AvatarColor": self.avatar_color,
|
||||
"Object": "profile",
|
||||
})
|
||||
}
|
||||
|
|
|
@ -200,6 +200,7 @@ table! {
|
|||
client_kdf_type -> Integer,
|
||||
client_kdf_iter -> Integer,
|
||||
api_key -> Nullable<Text>,
|
||||
avatar_color -> Nullable<Text>,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -200,6 +200,7 @@ table! {
|
|||
client_kdf_type -> Integer,
|
||||
client_kdf_iter -> Integer,
|
||||
api_key -> Nullable<Text>,
|
||||
avatar_color -> Nullable<Text>,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -200,6 +200,7 @@ table! {
|
|||
client_kdf_type -> Integer,
|
||||
client_kdf_iter -> Integer,
|
||||
api_key -> Nullable<Text>,
|
||||
avatar_color -> Nullable<Text>,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue