mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-03-20 11:48:31 -04:00
a
This commit is contained in:
@@ -47,7 +47,7 @@ export const BulkActionChangeOwnerModal: React.FC<BulkActionChangeOwnerModalProp
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`/api/v1/users?name=${encodeURIComponent(name)}`);
|
const response = await fetch(`/api/v1/users?name=${encodeURIComponent(name)}&exclude_self=True`);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(translateString('Failed to search users'));
|
throw new Error(translateString('Failed to search users'));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export const LayoutProvider = ({ children }) => {
|
|||||||
const site = useContext(SiteContext);
|
const site = useContext(SiteContext);
|
||||||
const cache = new BrowserCache('MediaCMS[' + site.id + '][layout]', 86400);
|
const cache = new BrowserCache('MediaCMS[' + site.id + '][layout]', 86400);
|
||||||
|
|
||||||
const isMediaPage = useMemo(() => PageStore.get('current-page') === 'media', []);
|
const isMediaPage = useMemo(() => PageStore.get('current-page') === 'media' || window.MediaCMS?.mediaId !== undefined, []);
|
||||||
const isEmbeddedApp = useMemo(() => inEmbeddedApp(), []);
|
const isEmbeddedApp = useMemo(() => inEmbeddedApp(), []);
|
||||||
|
|
||||||
const enabledSidebar = Boolean(document.getElementById('app-sidebar') || document.querySelector('.page-sidebar'));
|
const enabledSidebar = Boolean(document.getElementById('app-sidebar') || document.querySelector('.page-sidebar'));
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user