mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
expose useful libs (#4489)
* expose useful libs * Update UIPluginApi.md
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user