mirror of
https://github.com/9p4/jellyfin-plugin-sso.git
synced 2026-08-05 12:14:12 +00:00
Add nav to leave linking page
This commit is contained in:
committed by
Matthew Strasitoto
parent
bd60d7e32c
commit
d8d7d616bd
@@ -1,14 +1,19 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="emby-restyle.css">
|
<link rel="stylesheet" href="emby-restyle.css" />
|
||||||
<link id="theme-style" rel="stylesheet">
|
<link id="theme-style" rel="stylesheet" />
|
||||||
<script defer>
|
<script defer>
|
||||||
import("./ApiClient.js").then((clientModule) => {
|
import("./ApiClient.js").then((clientModule) => {
|
||||||
import("./linking.js").then((renderer) => {
|
import("./linking.js").then((renderer) => {
|
||||||
const view = document.querySelector("#sso-config-page");
|
const view = document.querySelector("#sso-config-page");
|
||||||
|
|
||||||
document.querySelector("#theme-style").href = ApiClient.getUrl("/web/themes/dark/theme.css");
|
document.querySelector("#theme-style").href = ApiClient.getUrl(
|
||||||
|
"/web/themes/dark/theme.css"
|
||||||
|
);
|
||||||
|
|
||||||
|
document.querySelector("a.emby-button.home").href =
|
||||||
|
ApiClient.serverAddress();
|
||||||
renderer.default(view);
|
renderer.default(view);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -25,7 +30,11 @@
|
|||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
<div class="sectionTitleContainer flex align-items-center">
|
<div class="sectionTitleContainer flex align-items-center">
|
||||||
<h2 class="sectionTitle">SSO Settings:</h2>
|
<a class="raised emby-button home">
|
||||||
|
<span class="material-icons home" aria-hidden="true"></span
|
||||||
|
><span>Home</span>
|
||||||
|
</a>
|
||||||
|
<h2 class="sectionTitle">SSO Linking:</h2>
|
||||||
<a
|
<a
|
||||||
is="emby-button"
|
is="emby-button"
|
||||||
class="raised button-alt headerHelpButton"
|
class="raised button-alt headerHelpButton"
|
||||||
|
|||||||
@@ -6,6 +6,20 @@ const ssoConfigLinking = {
|
|||||||
var provider_list = view.querySelector("#" + provider_list_id);
|
var provider_list = view.querySelector("#" + provider_list_id);
|
||||||
provider_list.innerHTML = "";
|
provider_list.innerHTML = "";
|
||||||
|
|
||||||
|
const currentUserId = ApiClient.getCurrentUserId();
|
||||||
|
|
||||||
|
if (currentUserId) {
|
||||||
|
ApiClient.fetch(
|
||||||
|
{
|
||||||
|
type: "GET",
|
||||||
|
url: ApiClient.getUrl(`sso/OID/links/${currentUserId}`),
|
||||||
|
},
|
||||||
|
true
|
||||||
|
).then((resp) => {
|
||||||
|
resp.json().then((x) => console.log(x));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
fetch(new Request(ApiClient.getUrl("sso/OID/GetNames"))).then((resp) => {
|
fetch(new Request(ApiClient.getUrl("sso/OID/GetNames"))).then((resp) => {
|
||||||
resp.json().then((config_names) => {
|
resp.json().then((config_names) => {
|
||||||
ssoConfigLinking.loadProviderList(provider_list, config_names, "oid");
|
ssoConfigLinking.loadProviderList(provider_list, config_names, "oid");
|
||||||
|
|||||||
Reference in New Issue
Block a user