Added ldap and pam authentication
This commit is contained in:
+8
-5
@@ -5,7 +5,7 @@ import ViewMode from './ViewMode';
|
||||
import EditMode from './EditMode';
|
||||
import FullscreenMode from './FullscreenMode';
|
||||
import ControlDialogs from './ControlDialogs';
|
||||
import { applyZoom, getStoredZoom } from './ZoomControl';
|
||||
import { applyZoom, getStoredZoom, setServerDefaultZoom, watchDpr } from './ZoomControl';
|
||||
import { AuthContext, DEFAULT_ME, fetchMe, canRead } from './lib/auth';
|
||||
import type { Interface, Me } from './lib/types';
|
||||
|
||||
@@ -29,11 +29,14 @@ export default function App() {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const dpr = window.devicePixelRatio ?? 1;
|
||||
document.documentElement.style.setProperty('--dpr', String(dpr));
|
||||
applyZoom(getStoredZoom());
|
||||
applyZoom(getStoredZoom(), false);
|
||||
const unwatchDpr = watchDpr();
|
||||
if (!fsParam) wsClient.connect('/ws');
|
||||
fetchMe().then(setMe);
|
||||
fetchMe().then(me => {
|
||||
setMe(me);
|
||||
setServerDefaultZoom(me.defaultZoom);
|
||||
});
|
||||
return unwatchDpr;
|
||||
}, []);
|
||||
|
||||
if (fsParam) {
|
||||
|
||||
Reference in New Issue
Block a user