mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
fixes
This commit is contained in:
parent
4346147bfc
commit
f345c80144
@ -104,7 +104,7 @@ export function getPredefinedPermissions(predefinedRoleName: string) {
|
|||||||
return ['*', '~widgets/*', 'widgets/admin'];
|
return ['*', '~widgets/*', 'widgets/admin'];
|
||||||
case 'logged-user':
|
case 'logged-user':
|
||||||
return ['*', '~widgets/admin', '~admin/*'];
|
return ['*', '~widgets/admin', '~admin/*'];
|
||||||
case 'anonymouse-user':
|
case 'anonymous-user':
|
||||||
return ['*', '~widgets/admin', '~admin/*'];
|
return ['*', '~widgets/admin', '~admin/*'];
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
|
@ -7,7 +7,7 @@ import { getSettings, useConfig, useSettings } from './utility/metadataLoaders';
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { safeJsonParse } from 'dbgate-tools';
|
import { safeJsonParse } from 'dbgate-tools';
|
||||||
import { apiCall } from './utility/api';
|
import { apiCall } from './utility/api';
|
||||||
import { getOpenedTabsStorageName } from './utility/pageDefs';
|
import { getOpenedTabsStorageName, isAdminPage } from './utility/pageDefs';
|
||||||
|
|
||||||
export interface TabDefinition {
|
export interface TabDefinition {
|
||||||
title: string;
|
title: string;
|
||||||
@ -73,7 +73,7 @@ function subscribeCssVariable(store, transform, cssVariable) {
|
|||||||
store.subscribe(value => document.documentElement.style.setProperty(cssVariable, transform(value)));
|
store.subscribe(value => document.documentElement.style.setProperty(cssVariable, transform(value)));
|
||||||
}
|
}
|
||||||
|
|
||||||
export const selectedWidget = writableWithStorage('database', 'selectedWidget');
|
export const selectedWidget = writableWithStorage('database', isAdminPage() ? 'selectedAdminWidget' : 'selectedWidget');
|
||||||
export const lockedDatabaseMode = writableWithStorage<boolean>(false, 'lockedDatabaseMode');
|
export const lockedDatabaseMode = writableWithStorage<boolean>(false, 'lockedDatabaseMode');
|
||||||
export const visibleWidgetSideBar = writableWithStorage(true, 'visibleWidgetSideBar');
|
export const visibleWidgetSideBar = writableWithStorage(true, 'visibleWidgetSideBar');
|
||||||
export const visibleSelectedWidget = derived(
|
export const visibleSelectedWidget = derived(
|
||||||
|
Loading…
Reference in New Issue
Block a user