mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Merge pull request #31329 from overleaf/mj-dark-mode-notification
[web] Introduce notification for dashboard dark mode GitOrigin-RevId: da5045d412ddc87a4b18823a4a5fa3192fe15c89
This commit is contained in:
committed by
Copybot
parent
55c3b6b7ea
commit
498c89c6ed
@@ -55,6 +55,7 @@ import { DetachCompileContext } from '@/shared/context/detach-compile-context'
|
||||
import { type CompileContext } from '@/shared/context/local-compile-context'
|
||||
import { EditorContext } from '@/shared/context/editor-context'
|
||||
import { Cobranding } from '@ol-types/cobranding'
|
||||
import { TutorialContext } from '@/shared/context/tutorial-context'
|
||||
|
||||
// these constants can be imported in tests instead of
|
||||
// using magic strings
|
||||
@@ -248,6 +249,7 @@ export function EditorProviders({
|
||||
LayoutProvider: makeLayoutProvider(layoutContext),
|
||||
ProjectProvider: makeProjectProvider(project),
|
||||
ReferencesProvider: makeReferencesProvider(),
|
||||
TutorialProvider: makeTutorialProvider(),
|
||||
...providers,
|
||||
}
|
||||
|
||||
@@ -284,10 +286,6 @@ export function makeEditorProvider({
|
||||
isProjectOwner,
|
||||
renameProject,
|
||||
isPendingEditor: false,
|
||||
deactivateTutorial: () => {},
|
||||
inactiveTutorials: [],
|
||||
currentPopup: null,
|
||||
setCurrentPopup: () => {},
|
||||
hasPremiumSuggestion: false,
|
||||
setHasPremiumSuggestion: () => {},
|
||||
premiumSuggestionResetDate: new Date(),
|
||||
@@ -307,6 +305,25 @@ export function makeEditorProvider({
|
||||
return EditorProvider
|
||||
}
|
||||
|
||||
export const makeTutorialProvider = (opts?: {
|
||||
inactiveTutorials: string[]
|
||||
}) => {
|
||||
const TutorialProvider: FC<PropsWithChildren> = ({ children }) => {
|
||||
const value = {
|
||||
deactivateTutorial: () => {},
|
||||
inactiveTutorials: opts?.inactiveTutorials ?? [],
|
||||
currentPopup: null,
|
||||
setCurrentPopup: () => {},
|
||||
}
|
||||
return (
|
||||
<TutorialContext.Provider value={value}>
|
||||
{children}
|
||||
</TutorialContext.Provider>
|
||||
)
|
||||
}
|
||||
return TutorialProvider
|
||||
}
|
||||
|
||||
const makeReferencesProvider = () => {
|
||||
const ReferencesProvider: FC<PropsWithChildren> = ({ children }) => {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user