1
0
Fork 0
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:
BlackDex 2023-01-11 21:45:11 +01:00 committed by Daniel García
parent c90b3031a6
commit acc1474394
No known key found for this signature in database
GPG key ID: FC8A7D14C3CD543A
12 changed files with 42 additions and 1 deletions

View file

@ -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",
})
}

View file

@ -200,6 +200,7 @@ table! {
client_kdf_type -> Integer,
client_kdf_iter -> Integer,
api_key -> Nullable<Text>,
avatar_color -> Nullable<Text>,
}
}

View file

@ -200,6 +200,7 @@ table! {
client_kdf_type -> Integer,
client_kdf_iter -> Integer,
api_key -> Nullable<Text>,
avatar_color -> Nullable<Text>,
}
}

View file

@ -200,6 +200,7 @@ table! {
client_kdf_type -> Integer,
client_kdf_iter -> Integer,
api_key -> Nullable<Text>,
avatar_color -> Nullable<Text>,
}
}