You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/MediaBrowser.Providers/Plugins/StudioImages/Configuration/config.html

59 lines
2.3 KiB

<!DOCTYPE html>
<html>
<head>
3 years ago
<title>Studio Images</title>
</head>
<body>
<div data-role="page" class="page type-interior pluginConfigurationPage configPage" data-require="emby-input,emby-button,emby-checkbox">
<div data-role="content">
<div class="content-primary">
<form class="configForm">
<div class="inputContainer">
<input is="emby-input" type="text" id="repository" required label="Repository" />
<div class="fieldDescription">This can be any Jellyfin-compatible artwork repository.</div>
</div>
<br />
<div>
<button is="emby-button" type="submit" class="raised button-submit block"><span>Save</span></button>
</div>
</form>
</div>
</div>
<script type="text/javascript">
var PluginConfig = {
pluginId: "872a7849-1171-458d-a6fb-3de3d442ad30"
};
document.querySelector('.configPage')
.addEventListener('pageshow', function () {
Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
var repository = document.querySelector('#repository');
repository.value = config.RepositoryUrl;
repository.dispatchEvent(new Event('change', {
bubbles: true,
cancelable: false
}));
Dashboard.hideLoadingMsg();
});
});
document.querySelector('.configForm')
.addEventListener('submit', function (e) {
Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
config.RepositoryUrl = document.querySelector('#server').value;
ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
});
e.preventDefault();
return false;
});
</script>
</div>
</body>
</html>