mirror of
https://github.com/nitnelave/lldap.git
synced 2023-04-12 14:25:13 +00:00
rename component
This commit is contained in:
parent
d509dc82a0
commit
7b27538c16
@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
components::{
|
||||
avatar::Avatar,
|
||||
avatar::ShowAvatar,
|
||||
change_password::ChangePasswordForm,
|
||||
create_group::CreateGroupForm,
|
||||
create_user::CreateUserForm,
|
||||
@ -307,7 +307,7 @@ impl App {
|
||||
id="dropdownUser"
|
||||
data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<Avatar username={user_id.clone()} width=32 height=32 />
|
||||
<ShowAvatar username={user_id.clone()} width=32 height=32 />
|
||||
<span class="ms-2">
|
||||
{user_id}
|
||||
</span>
|
||||
|
@ -26,7 +26,7 @@ impl AvatarData {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Avatar {
|
||||
pub struct ShowAvatar {
|
||||
common: CommonComponentParts<Self>,
|
||||
avatar: Option<AvatarData>,
|
||||
_producer: Box<dyn Bridge<AvatarEventBus>>,
|
||||
@ -47,7 +47,7 @@ pub struct Props {
|
||||
pub height: i32,
|
||||
}
|
||||
|
||||
impl CommonComponent<Avatar> for Avatar {
|
||||
impl CommonComponent<ShowAvatar> for ShowAvatar {
|
||||
fn handle_msg(
|
||||
&mut self,
|
||||
ctx: &Context<Self>,
|
||||
@ -77,7 +77,7 @@ impl CommonComponent<Avatar> for Avatar {
|
||||
}
|
||||
}
|
||||
|
||||
impl Avatar {
|
||||
impl ShowAvatar {
|
||||
fn get_user_avatar(&mut self, ctx: &Context<Self>) {
|
||||
self.common.call_graphql::<GetUserAvatar, _>(
|
||||
ctx,
|
||||
@ -90,7 +90,7 @@ impl Avatar {
|
||||
}
|
||||
}
|
||||
|
||||
impl Component for Avatar {
|
||||
impl Component for ShowAvatar {
|
||||
type Message = Msg;
|
||||
type Properties = Props;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user