You've already forked AstralRinth
forked from didirus/AstralRinth
Envs v3 frontend (#4267)
* New envs frontend * lint fix * Add blog post, user-facing changes, dashboard warning, project page member warning, and migration reviewing. maybe some other misc stuff * lint * lint * ignore .data in .prettierignore * i18n as fuck * fix proj page * Improve news markdown rendering * improve phrasing of initial paragraph * Fix environments not reloading after save * index.ts instead of underscored name * shrink-0 back on these icons
This commit is contained in:
5
packages/ui/src/providers/api.ts
Normal file
5
packages/ui/src/providers/api.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { ModrinthApi } from '@modrinth/utils'
|
||||
|
||||
import { createContext } from '.'
|
||||
|
||||
export const [injectApi, provideApi] = createContext<ModrinthApi>('root', 'apiContext')
|
||||
@@ -78,4 +78,5 @@ export function createContext<ContextValue>(
|
||||
return [injectContext, provideContext] as const
|
||||
}
|
||||
|
||||
export * from './project-page'
|
||||
export * from './web-notifications'
|
||||
|
||||
13
packages/ui/src/providers/project-page.ts
Normal file
13
packages/ui/src/providers/project-page.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { Project, ProjectV3Partial } from '@modrinth/utils'
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
import { createContext } from '.'
|
||||
|
||||
export interface ProjectPageContext {
|
||||
projectV2: Ref<Project>
|
||||
projectV3: Ref<ProjectV3Partial>
|
||||
refreshProject: () => Promise<void>
|
||||
}
|
||||
|
||||
export const [injectProjectPageContext, provideProjectPageContext] =
|
||||
createContext<ProjectPageContext>('root', 'projectPageContext')
|
||||
Reference in New Issue
Block a user