2022-11-04 19:26:34 -04:00
|
|
|
import SyncMenu from '../../js/features/editor-left-menu/components/sync-menu'
|
|
|
|
import { ScopeDecorator } from '../decorators/scope'
|
|
|
|
import { useScope } from '../hooks/use-scope'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Editor / Left Menu / Sync Menu',
|
|
|
|
component: SyncMenu,
|
|
|
|
decorators: [ScopeDecorator],
|
|
|
|
}
|
|
|
|
|
|
|
|
export const WriteAccess = () => {
|
|
|
|
window.metaAttributesCache.set('ol-anonymous', false)
|
2023-11-07 06:54:03 -05:00
|
|
|
window.metaAttributesCache.set('ol-gitBridgeEnabled', true)
|
2022-11-04 19:26:34 -04:00
|
|
|
useScope({
|
|
|
|
permissionsLevel: 'owner',
|
|
|
|
})
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div id="left-menu" className="shown">
|
|
|
|
<SyncMenu />
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export const ReadOnlyAccess = () => {
|
|
|
|
window.metaAttributesCache.set('ol-anonymous', false)
|
2023-11-07 06:54:03 -05:00
|
|
|
window.metaAttributesCache.set('ol-gitBridgeEnabled', true)
|
2022-11-04 19:26:34 -04:00
|
|
|
useScope({
|
|
|
|
permissionsLevel: 'readOnly',
|
|
|
|
})
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div id="left-menu" className="shown">
|
|
|
|
<SyncMenu />
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|