mirror of
https://github.com/stashapp/stash.git
synced 2026-02-10 17:35:45 +01:00
expose useful libs (#4489)
* expose useful libs * Update UIPluginApi.md
This commit is contained in:
parent
de2b28d3f9
commit
892d74c98b
2 changed files with 12 additions and 0 deletions
|
|
@ -12,6 +12,10 @@ An example using various aspects of `PluginApi` may be found in the source code
|
|||
|
||||
An instance of the React library.
|
||||
|
||||
### `ReactDOM`
|
||||
|
||||
An instance of the ReactDOM library.
|
||||
|
||||
### `GQL`
|
||||
|
||||
This namespace contains the generated graphql client interface. This is a low-level interface. In many cases, `StashService` should be used instead.
|
||||
|
|
@ -25,6 +29,8 @@ This namespace contains the generated graphql client interface. This is a low-le
|
|||
- `Intl`
|
||||
- `FontAwesomeRegular`
|
||||
- `FontAwesomeSolid`
|
||||
- `Mousetrap`
|
||||
- `MousetrapPause`
|
||||
|
||||
### `register`
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import * as ReactRouterDOM from "react-router-dom";
|
||||
import Mousetrap from "mousetrap";
|
||||
import MousetrapPause from "mousetrap-pause";
|
||||
import NavUtils from "./utils/navigation";
|
||||
import { HoverPopover } from "./components/Shared/HoverPopover";
|
||||
import { TagLink } from "./components/Shared/TagLink";
|
||||
|
|
@ -97,6 +100,7 @@ export function RegisterComponent(component: string, fn: Function) {
|
|||
}
|
||||
export const PluginApi = {
|
||||
React,
|
||||
ReactDOM,
|
||||
GQL,
|
||||
libraries: {
|
||||
ReactRouterDOM,
|
||||
|
|
@ -105,6 +109,8 @@ export const PluginApi = {
|
|||
Intl,
|
||||
FontAwesomeRegular,
|
||||
FontAwesomeSolid,
|
||||
Mousetrap,
|
||||
MousetrapPause,
|
||||
},
|
||||
register: {
|
||||
// register a route to be added to the main router
|
||||
|
|
|
|||
Loading…
Reference in a new issue