@@ -210,3 +296,4 @@ function EmbedObjectsComponent(props: any) {
}
export default EmbedObjectsComponent
+
diff --git a/apps/web/components/Objects/Editor/Extensions/NoTextInput/NoTextInput.tsx b/apps/web/components/Objects/Editor/Extensions/NoTextInput/NoTextInput.tsx
index fcaf1752..3fd782a3 100644
--- a/apps/web/components/Objects/Editor/Extensions/NoTextInput/NoTextInput.tsx
+++ b/apps/web/components/Objects/Editor/Extensions/NoTextInput/NoTextInput.tsx
@@ -9,19 +9,8 @@ export const NoTextInput = Extension.create({
new Plugin({
key: new PluginKey('noTextInput'),
filterTransaction: (transaction) => {
- // If the transaction is adding text, stop it
- return (
- !transaction.docChanged ||
- transaction.steps.every((step) => {
- const { slice } = step.toJSON()
- return (
- !slice ||
- !slice.content.some(
- (node: { type: string }) => node.type === 'text'
- )
- )
- })
- )
+ // Block all content-changing transactions
+ return !transaction.docChanged
},
}),
]
diff --git a/apps/web/components/Objects/Editor/Extensions/Quiz/QuizBlockComponent.tsx b/apps/web/components/Objects/Editor/Extensions/Quiz/QuizBlockComponent.tsx
index 3e81aa8e..a9c44b2d 100644
--- a/apps/web/components/Objects/Editor/Extensions/Quiz/QuizBlockComponent.tsx
+++ b/apps/web/components/Objects/Editor/Extensions/Quiz/QuizBlockComponent.tsx
@@ -291,7 +291,7 @@ function QuizBlockComponent(props: any) {
diff --git a/apps/web/components/Security/AdminAuthorization.tsx b/apps/web/components/Security/AdminAuthorization.tsx
index 7840317f..7afdefe8 100644
--- a/apps/web/components/Security/AdminAuthorization.tsx
+++ b/apps/web/components/Security/AdminAuthorization.tsx
@@ -4,6 +4,8 @@ import { useLHSession } from '@components/Contexts/LHSessionContext';
import useAdminStatus from '@components/Hooks/useAdminStatus';
import { usePathname, useRouter } from 'next/navigation';
import PageLoading from '@components/Objects/Loaders/PageLoading';
+import { getUriWithoutOrg } from '@services/config/config';
+import { useOrg } from '@components/Contexts/OrgContext';
type AuthorizationProps = {
children: React.ReactNode;
@@ -22,6 +24,7 @@ const ADMIN_PATHS = [
const AdminAuthorization: React.FC
= ({ children, authorizationMode }) => {
const session = useLHSession() as any;
+ const org = useOrg() as any;
const pathname = usePathname();
const router = useRouter();
const { isAdmin, loading } = useAdminStatus() as any
@@ -51,7 +54,7 @@ const AdminAuthorization: React.FC = ({ children, authorizat
}
if (!isUserAuthenticated) {
- router.push('/login');
+ router.push(getUriWithoutOrg('/login?orgslug=' + org.slug));
return;
}
diff --git a/apps/web/components/Security/HeaderProfileBox.tsx b/apps/web/components/Security/HeaderProfileBox.tsx
index 6fbddd2b..f61d875d 100644
--- a/apps/web/components/Security/HeaderProfileBox.tsx
+++ b/apps/web/components/Security/HeaderProfileBox.tsx
@@ -25,10 +25,10 @@ export const HeaderProfileBox = () => {
-
Login
+ href={{ pathname: getUriWithoutOrg('/login?orgslug=' + org.slug), query: org ? { orgslug: org.slug } : null }} >Login
-
- Sign up
+ Sign up