forked from abner/for-legacy-web
feat: port UserProfile, Onboarding, CreateBot to legacy
This commit is contained in:
@@ -24,6 +24,7 @@ import { SIDEBAR_MEMBERS } from "../../../mobx/stores/Layout";
|
||||
import { useIntermediate } from "../../../context/intermediate/Intermediate";
|
||||
|
||||
import UpdateIndicator from "../../../components/common/UpdateIndicator";
|
||||
import { modalController } from "../../../controllers/modals/ModalController";
|
||||
import { ChannelHeaderProps } from "../ChannelHeader";
|
||||
|
||||
const Container = styled.div`
|
||||
@@ -114,8 +115,8 @@ export default function HeaderActions({ channel }: ChannelHeaderProps) {
|
||||
<>
|
||||
<IconButton
|
||||
onClick={() =>
|
||||
openScreen({
|
||||
id: "user_picker",
|
||||
modalController.push({
|
||||
type: "user_picker",
|
||||
omit: channel.recipient_ids!,
|
||||
callback: async (users) => {
|
||||
for (const user of users) {
|
||||
|
||||
@@ -18,6 +18,7 @@ import { useIntermediate } from "../../context/intermediate/Intermediate";
|
||||
|
||||
import UserIcon from "../../components/common/user/UserIcon";
|
||||
import UserStatus from "../../components/common/user/UserStatus";
|
||||
import { modalController } from "../../controllers/modals/ModalController";
|
||||
|
||||
interface Props {
|
||||
user: User;
|
||||
@@ -128,7 +129,12 @@ export const Friend = observer(({ user }: Props) => {
|
||||
return (
|
||||
<div
|
||||
className={styles.friend}
|
||||
onClick={() => openScreen({ id: "profile", user_id: user._id })}
|
||||
onClick={() =>
|
||||
modalController.push({
|
||||
type: "user_profile",
|
||||
user_id: user._id,
|
||||
})
|
||||
}
|
||||
{...useTriggerEvents("Menu", {
|
||||
user: user._id,
|
||||
})}>
|
||||
|
||||
@@ -12,13 +12,13 @@ import { Button, LineDivider, Tip } from "@revoltchat/ui";
|
||||
import TextAreaAutoSize from "../../../lib/TextAreaAutoSize";
|
||||
import { useTranslation } from "../../../lib/i18n";
|
||||
|
||||
import { UserProfile } from "../../../context/intermediate/popovers/UserProfile";
|
||||
import { FileUploader } from "../../../context/revoltjs/FileUploads";
|
||||
|
||||
import AutoComplete, {
|
||||
useAutoComplete,
|
||||
} from "../../../components/common/AutoComplete";
|
||||
import { useSession } from "../../../controllers/client/ClientController";
|
||||
import { UserProfile } from "../../../controllers/modals/components/legacy/UserProfile";
|
||||
|
||||
export const Profile = observer(() => {
|
||||
const translate = useTranslation();
|
||||
@@ -75,6 +75,7 @@ export const Profile = observer(() => {
|
||||
user_id={client.user!._id}
|
||||
dummy={true}
|
||||
dummyProfile={profile}
|
||||
{...({} as any)}
|
||||
/>
|
||||
</div>
|
||||
{/*<h3>Badges</h3>
|
||||
|
||||
Reference in New Issue
Block a user