mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 17:35:28 +00:00
feat: port input modals to new system
This commit is contained in:
@@ -347,9 +347,8 @@ export default observer(() => {
|
||||
<a
|
||||
className="status"
|
||||
onClick={() =>
|
||||
openScreen({
|
||||
id: "special_input",
|
||||
type: "set_custom_status",
|
||||
modalController.push({
|
||||
type: "custom_status",
|
||||
})
|
||||
}>
|
||||
Change your status...
|
||||
|
||||
@@ -16,10 +16,9 @@ import {
|
||||
Category,
|
||||
} from "@revoltchat/ui";
|
||||
|
||||
import { useIntermediate } from "../../../context/intermediate/Intermediate";
|
||||
|
||||
import { PermissionList } from "../../../components/settings/roles/PermissionList";
|
||||
import { RoleOrDefault } from "../../../components/settings/roles/RoleSelection";
|
||||
import { modalController } from "../../../controllers/modals/ModalController";
|
||||
|
||||
interface Props {
|
||||
server: Server;
|
||||
@@ -54,18 +53,14 @@ export const Roles = observer(({ server }: Props) => {
|
||||
// Consolidate all permissions that we can change right now.
|
||||
const currentRoles = useRoles(server);
|
||||
|
||||
// Pull in modal context.
|
||||
const { openScreen } = useIntermediate();
|
||||
|
||||
return (
|
||||
<PermissionsLayout
|
||||
server={server}
|
||||
rank={server.member?.ranking ?? Infinity}
|
||||
onCreateRole={(callback) =>
|
||||
openScreen({
|
||||
id: "special_input",
|
||||
modalController.push({
|
||||
type: "create_role",
|
||||
server: server as any,
|
||||
server,
|
||||
callback,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user