web: cleanup old FlowDiagram colours
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
241e36b2a6
commit
7932b390dc
|
@ -10,11 +10,6 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
||||||
|
|
||||||
import { FlowsApi } from "@goauthentik/api";
|
import { FlowsApi } from "@goauthentik/api";
|
||||||
|
|
||||||
export const FONT_COLOUR_DARK_MODE = "#fafafa";
|
|
||||||
export const FONT_COLOUR_LIGHT_MODE = "#151515";
|
|
||||||
export const FILL_DARK_MODE = "#18191a";
|
|
||||||
export const FILL_LIGHT_MODE = "#f0f0f0";
|
|
||||||
|
|
||||||
@customElement("ak-flow-diagram")
|
@customElement("ak-flow-diagram")
|
||||||
export class FlowDiagram extends AKElement {
|
export class FlowDiagram extends AKElement {
|
||||||
_flowSlug?: string;
|
_flowSlug?: string;
|
||||||
|
@ -58,7 +53,6 @@ export class FlowDiagram extends AKElement {
|
||||||
super();
|
super();
|
||||||
const matcher = window.matchMedia("(prefers-color-scheme: light)");
|
const matcher = window.matchMedia("(prefers-color-scheme: light)");
|
||||||
const handler = (ev?: MediaQueryListEvent) => {
|
const handler = (ev?: MediaQueryListEvent) => {
|
||||||
console.log("setting config");
|
|
||||||
mermaid.initialize({
|
mermaid.initialize({
|
||||||
logLevel: "error",
|
logLevel: "error",
|
||||||
startOnLoad: false,
|
startOnLoad: false,
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
import {
|
|
||||||
FONT_COLOUR_DARK_MODE,
|
|
||||||
FONT_COLOUR_LIGHT_MODE,
|
|
||||||
} from "@goauthentik/admin/flows/FlowDiagram";
|
|
||||||
import { EVENT_REFRESH } from "@goauthentik/common/constants";
|
import { EVENT_REFRESH } from "@goauthentik/common/constants";
|
||||||
import { AKElement } from "@goauthentik/elements/Base";
|
import { AKElement } from "@goauthentik/elements/Base";
|
||||||
import { Chart, ChartConfiguration, ChartData, ChartOptions, Plugin, Tick } from "chart.js";
|
import { Chart, ChartConfiguration, ChartData, ChartOptions, Plugin, Tick } from "chart.js";
|
||||||
|
@ -21,6 +17,9 @@ Chart.register(LineController, BarController, DoughnutController);
|
||||||
Chart.register(ArcElement, BarElement);
|
Chart.register(ArcElement, BarElement);
|
||||||
Chart.register(TimeScale, LinearScale);
|
Chart.register(TimeScale, LinearScale);
|
||||||
|
|
||||||
|
export const FONT_COLOUR_DARK_MODE = "#fafafa";
|
||||||
|
export const FONT_COLOUR_LIGHT_MODE = "#151515";
|
||||||
|
|
||||||
export abstract class AKChart<T> extends AKElement {
|
export abstract class AKChart<T> extends AKElement {
|
||||||
abstract apiRequest(): Promise<T>;
|
abstract apiRequest(): Promise<T>;
|
||||||
abstract getChartData(data: T): ChartData;
|
abstract getChartData(data: T): ChartData;
|
||||||
|
|
Reference in New Issue