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::{
|
use crate::{
|
||||||
components::{
|
components::{
|
||||||
avatar::Avatar,
|
avatar::ShowAvatar,
|
||||||
change_password::ChangePasswordForm,
|
change_password::ChangePasswordForm,
|
||||||
create_group::CreateGroupForm,
|
create_group::CreateGroupForm,
|
||||||
create_user::CreateUserForm,
|
create_user::CreateUserForm,
|
||||||
@ -307,7 +307,7 @@ impl App {
|
|||||||
id="dropdownUser"
|
id="dropdownUser"
|
||||||
data-bs-toggle="dropdown"
|
data-bs-toggle="dropdown"
|
||||||
aria-expanded="false">
|
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">
|
<span class="ms-2">
|
||||||
{user_id}
|
{user_id}
|
||||||
</span>
|
</span>
|
||||||
|
@ -26,7 +26,7 @@ impl AvatarData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Avatar {
|
pub struct ShowAvatar {
|
||||||
common: CommonComponentParts<Self>,
|
common: CommonComponentParts<Self>,
|
||||||
avatar: Option<AvatarData>,
|
avatar: Option<AvatarData>,
|
||||||
_producer: Box<dyn Bridge<AvatarEventBus>>,
|
_producer: Box<dyn Bridge<AvatarEventBus>>,
|
||||||
@ -47,7 +47,7 @@ pub struct Props {
|
|||||||
pub height: i32,
|
pub height: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CommonComponent<Avatar> for Avatar {
|
impl CommonComponent<ShowAvatar> for ShowAvatar {
|
||||||
fn handle_msg(
|
fn handle_msg(
|
||||||
&mut self,
|
&mut self,
|
||||||
ctx: &Context<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>) {
|
fn get_user_avatar(&mut self, ctx: &Context<Self>) {
|
||||||
self.common.call_graphql::<GetUserAvatar, _>(
|
self.common.call_graphql::<GetUserAvatar, _>(
|
||||||
ctx,
|
ctx,
|
||||||
@ -90,7 +90,7 @@ impl Avatar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Component for Avatar {
|
impl Component for ShowAvatar {
|
||||||
type Message = Msg;
|
type Message = Msg;
|
||||||
type Properties = Props;
|
type Properties = Props;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user