- openScreen({
- id: "special_prompt",
+ modalController.push({
type: "delete_server",
target: server,
})
diff --git a/src/pages/settings/panes/MyBots.tsx b/src/pages/settings/panes/MyBots.tsx
index 4f3e26fd..158ca952 100644
--- a/src/pages/settings/panes/MyBots.tsx
+++ b/src/pages/settings/panes/MyBots.tsx
@@ -218,8 +218,8 @@ function BotCard({ bot, onDelete, onUpdate }: Props) {
target={user}
size={42}
onClick={() =>
- openScreen({
- id: "profile",
+ modalController.push({
+ type: "user_profile",
user_id: user._id,
})
}
@@ -460,8 +460,7 @@ function BotCard({ bot, onDelete, onUpdate }: Props) {
palette="error"
onClick={async () => {
setSaving(true);
- openScreen({
- id: "special_prompt",
+ modalController.push({
type: "delete_bot",
target: bot._id,
name: user.username,
@@ -508,16 +507,14 @@ export const MyBots = observer(() => {
// eslint-disable-next-line
}, []);
- const { openScreen } = useIntermediate();
-
return (
}
onClick={() =>
- openScreen({
- id: "create_bot",
+ modalController.push({
+ type: "create_bot",
onCreate: (bot) => setBots([...(bots ?? []), bot]),
})
}
diff --git a/src/pages/settings/server/Categories.tsx b/src/pages/settings/server/Categories.tsx
index 9af11841..cf3bb5c0 100644
--- a/src/pages/settings/server/Categories.tsx
+++ b/src/pages/settings/server/Categories.tsx
@@ -17,6 +17,7 @@ import { noop } from "../../../lib/js";
import { useIntermediate } from "../../../context/intermediate/Intermediate";
import ChannelIcon from "../../../components/common/ChannelIcon";
+import { modalController } from "../../../controllers/modals/ModalController";
const KanbanEntry = styled.div`
padding: 2px 4px;
@@ -449,8 +450,7 @@ function ListElement({
- openScreen({
- id: "special_prompt",
+ modalController.push({
type: "create_channel",
target: server,
cb: addChannel,
diff --git a/yarn.lock b/yarn.lock
index b674b8fd..621d8370 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2231,9 +2231,9 @@ __metadata:
languageName: node
linkType: hard
-"@revoltchat/ui@npm:1.0.61":
- version: 1.0.61
- resolution: "@revoltchat/ui@npm:1.0.61"
+"@revoltchat/ui@npm:1.0.63":
+ version: 1.0.63
+ resolution: "@revoltchat/ui@npm:1.0.63"
dependencies:
"@styled-icons/boxicons-logos": ^10.38.0
"@styled-icons/boxicons-regular": ^10.38.0
@@ -2247,7 +2247,7 @@ __metadata:
react-virtuoso: ^2.12.0
peerDependencies:
revolt.js: "*"
- checksum: 678584f84cb3d43307507058eb434507cb1d201455f9da6618eb1731c6439240ddc16601dc636b5790a83393884770bf4e8fee75d235871f65ba5abcd8f685ac
+ checksum: 4e785798d31b503bb7777da7661656cbbeb17734257aa4578357e6acf2d053abeb40e406f1e04c7b1338822260d5614ffb8262cb64ae95ce3b1c7edda0c2125b
languageName: node
linkType: hard
@@ -3554,7 +3554,7 @@ __metadata:
"@hcaptcha/react-hcaptcha": ^0.3.6
"@insertish/vite-plugin-babel-macros": ^1.0.5
"@preact/preset-vite": ^2.0.0
- "@revoltchat/ui": 1.0.61
+ "@revoltchat/ui": 1.0.63
"@rollup/plugin-replace": ^2.4.2
"@styled-icons/boxicons-logos": ^10.38.0
"@styled-icons/boxicons-regular": ^10.38.0