mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-27 16:12:38 +00:00
f4ebe98d91
Show paywall in Git bridge dialog when appropriate GitOrigin-RevId: c6056c2a24fe5f2026448cd6cef2449057803cea
57 lines
1 KiB
TypeScript
57 lines
1 KiB
TypeScript
import { MainDocument, PdfViewer } from '../../../../types/project-settings'
|
|
|
|
type Scope = {
|
|
settings?: {
|
|
syntaxValidation?: boolean
|
|
pdfViewer?: PdfViewer
|
|
}
|
|
editor?: {
|
|
sharejs_doc?: {
|
|
doc_id?: string
|
|
getSnapshot?: () => string
|
|
}
|
|
newSourceEditor?: boolean
|
|
}
|
|
hasLintingError?: boolean
|
|
ui?: {
|
|
view?: 'editor' | 'history' | 'file' | 'pdf'
|
|
pdfLayout?: 'flat' | 'sideBySide' | 'split'
|
|
leftMenuShown?: boolean
|
|
}
|
|
project?: {
|
|
members?: any[]
|
|
owner: {
|
|
_id: string
|
|
}
|
|
features?: {
|
|
gitBridge?: boolean
|
|
}
|
|
}
|
|
user?: {
|
|
features?: {
|
|
dropbox: boolean
|
|
}
|
|
}
|
|
docs?: MainDocument[]
|
|
}
|
|
|
|
export const mockScope = (scope?: Scope) => ({
|
|
settings: {
|
|
syntaxValidation: false,
|
|
pdfViewer: 'pdfjs',
|
|
},
|
|
editor: {
|
|
sharejs_doc: {
|
|
doc_id: 'test-doc',
|
|
getSnapshot: () => 'some doc content',
|
|
},
|
|
newSourceEditor: true,
|
|
},
|
|
hasLintingError: false,
|
|
ui: {
|
|
view: 'editor',
|
|
pdfLayout: 'sideBySide',
|
|
leftMenuShown: false,
|
|
},
|
|
...scope,
|
|
})
|