Merge branch 'master' into new-forms-part-3

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-01 20:46:23 +02:00
commit ed2e9b88e7
6 changed files with 31 additions and 7 deletions

View File

@ -14,6 +14,7 @@
<link rel="stylesheet" type="text/css" href="{% static 'dist/patternfly.min.css' %}?v={{ ak_version }}"> <link rel="stylesheet" type="text/css" href="{% static 'dist/patternfly.min.css' %}?v={{ ak_version }}">
<link rel="stylesheet" type="text/css" href="{% static 'dist/authentik.css' %}?v={{ ak_version }}"> <link rel="stylesheet" type="text/css" href="{% static 'dist/authentik.css' %}?v={{ ak_version }}">
<script src="{% url 'authentik_api:javascript-catalog' %}?v={{ ak_version }}"></script> <script src="{% url 'authentik_api:javascript-catalog' %}?v={{ ak_version }}"></script>
<script src="{% static 'dist/adoptedStyleSheets.js' %}?v={{ ak_version }}" type="module"></script>
{% block head %} {% block head %}
{% endblock %} {% endblock %}
</head> </head>

View File

@ -1,7 +1,7 @@
"""ProxyProvider API Views""" """ProxyProvider API Views"""
from drf_yasg.utils import swagger_serializer_method from drf_yasg.utils import swagger_serializer_method
from rest_framework.fields import CharField, ListField, SerializerMethodField from rest_framework.fields import CharField, ListField, SerializerMethodField
from rest_framework.serializers import ModelSerializer, Serializer from rest_framework.serializers import ModelSerializer
from rest_framework.viewsets import ModelViewSet from rest_framework.viewsets import ModelViewSet
from authentik.core.api.providers import ProviderSerializer from authentik.core.api.providers import ProviderSerializer

View File

@ -26,10 +26,6 @@ const resources = [
const isProdBuild = process.env.NODE_ENV === "production"; const isProdBuild = process.env.NODE_ENV === "production";
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
function manualChunks(id) { function manualChunks(id) {
if (id.includes("construct-style-sheets-polyfill")) {
// Keep polyfills in the main file so they are loaded when dependencies are loaded
return "vendor-poly";
}
if (id.includes("node_modules")) { if (id.includes("node_modules")) {
if (id.includes("codemirror")) { if (id.includes("codemirror")) {
return "vendor-cm"; return "vendor-cm";
@ -64,6 +60,33 @@ export default [
clearScreen: false, clearScreen: false,
}, },
}, },
// Polyfills (imported first)
{
input: [
"construct-style-sheets-polyfill"
],
output: [
{
format: "es",
dir: "dist",
sourcemap: true,
}
],
plugins: [
cssimport(),
typescript(),
externalGlobals({
django: "django",
}),
resolve({ browser: true }),
commonjs(),
sourcemaps(),
isProdBuild && terser(),
].filter(p => p),
watch: {
clearScreen: false,
},
},
// Main Application // Main Application
{ {
input: "./src/interfaces/AdminInterface.ts", input: "./src/interfaces/AdminInterface.ts",

View File

@ -1,5 +1,3 @@
import "construct-style-sheets-polyfill";
import "../elements/messages/MessageContainer"; import "../elements/messages/MessageContainer";
import { customElement } from "lit-element"; import { customElement } from "lit-element";
import { me } from "../api/Users"; import { me } from "../api/Users";

View File

@ -8,6 +8,7 @@
<link rel="stylesheet" type="text/css" href="/static/dist/patternfly-base.css"> <link rel="stylesheet" type="text/css" href="/static/dist/patternfly-base.css">
<link rel="stylesheet" type="text/css" href="/static/dist/authentik.css"> <link rel="stylesheet" type="text/css" href="/static/dist/authentik.css">
<script src="/api/jsi18n/"></script> <script src="/api/jsi18n/"></script>
<script src="/static/dist/adoptedStyleSheets.js" type="module"></script>
<script src="/static/dist/AdminInterface.js" type="module"></script> <script src="/static/dist/AdminInterface.js" type="module"></script>
<title>authentik</title> <title>authentik</title>
</head> </head>

View File

@ -8,6 +8,7 @@
<link rel="stylesheet" type="text/css" href="/static/dist/patternfly-base.css"> <link rel="stylesheet" type="text/css" href="/static/dist/patternfly-base.css">
<link rel="stylesheet" type="text/css" href="/static/dist/authentik.css"> <link rel="stylesheet" type="text/css" href="/static/dist/authentik.css">
<script src="/api/jsi18n/"></script> <script src="/api/jsi18n/"></script>
<script src="/static/dist/adoptedStyleSheets.js" type="module"></script>
<script src="/static/dist/FlowInterface.js" type="module"></script> <script src="/static/dist/FlowInterface.js" type="module"></script>
<title>authentik</title> <title>authentik</title>
</head> </head>