some new automations
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,504 @@
|
||||
.yaml {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
border-style: solid;
|
||||
border-width: thin;
|
||||
margin: 0;
|
||||
overflow: auto;
|
||||
display: inline-flex;
|
||||
width: calc(100% - 20px);
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.hacslist {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.hacs-card-container {
|
||||
display: grid;
|
||||
grid-gap: 10px;
|
||||
}
|
||||
|
||||
.hacs-overview-container {
|
||||
width: 95%;
|
||||
margin-left: 2.5%;
|
||||
margin-right: 2.5%;
|
||||
margin-bottom: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.hacs-form {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.hacs-table {
|
||||
background-color: var(--paper-card-background-color);
|
||||
}
|
||||
|
||||
.hacs-content {
|
||||
position: absolute;
|
||||
top: 49px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.hacs-card {
|
||||
height: 100%;
|
||||
background-color: var(--paper-card-background-color) !important;
|
||||
padding: 3px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.overview {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.progressbar {
|
||||
margin-left: 2.5%;
|
||||
margin-right: 2.5%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.hacs-card-title {
|
||||
font-size: medium;
|
||||
color: var(--primary-text-color);
|
||||
}
|
||||
|
||||
tr.hacs-table-row.repository {
|
||||
border-bottom: 0px;
|
||||
display: table-row-group;
|
||||
}
|
||||
|
||||
td.repository {
|
||||
width: 50%;
|
||||
padding: 0px;
|
||||
}
|
||||
td.repository.text {
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
|
||||
select.hacs-select.repository {
|
||||
width: 100%;
|
||||
}
|
||||
.hacs-card-content {
|
||||
color: var(--secondary-text-color);
|
||||
font-style: italic;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.card-status {
|
||||
font-size: 18px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.hacs-card-standalone {
|
||||
background-color: var(--paper-card-background-color) !important;
|
||||
color: var(--primary-text-color);
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.installed {
|
||||
color: var(--hacs-status-installed);
|
||||
}
|
||||
|
||||
.pending-restart {
|
||||
color: var(--hacs-status-pending-restart);
|
||||
}
|
||||
|
||||
.pending-upgrade {
|
||||
color: var(--hacs-status-pending-update);
|
||||
}
|
||||
|
||||
.default {
|
||||
color: var(--primary-text-color);
|
||||
}
|
||||
|
||||
.hacs-nav {
|
||||
background-color: var(--primary-color) !important;
|
||||
position: fixed;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.disabledaction {
|
||||
cursor: default;
|
||||
color: var(--primary-color);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.hacs-bar {
|
||||
background-color: var(--primary-color) !important;
|
||||
}
|
||||
.hacs-bar-background {
|
||||
background-color: var(--dark-primary-color) !important;
|
||||
}
|
||||
|
||||
.errorview {
|
||||
display: block;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.hacscolor {
|
||||
background-color: var(--paper-card-background-color) !important;
|
||||
color: var(--primary-text-color);
|
||||
}
|
||||
|
||||
.hacsbutton {
|
||||
margin: 3%;
|
||||
background-color: var(--primary-color) !important;
|
||||
}
|
||||
|
||||
.hacsadminbutton {
|
||||
margin: 1%;
|
||||
background-color: var(--primary-color) !important;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--primary-background-color) !important;
|
||||
color: var(--primary-text-color);
|
||||
overflow: hidden;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
input[type="text"]:not(.browser-default):focus:not([readonly]) {
|
||||
border-bottom: 1px solid var(--primary-color);
|
||||
-webkit-box-shadow: 0 1px 0 0 var(--primary-color);
|
||||
box-shadow: 0 1px 0 0 var(--primary-color);
|
||||
}
|
||||
|
||||
.dropdown-list-item {
|
||||
color: var(--primary-color) !important;
|
||||
background-color: var(--paper-card-background-color) !important;
|
||||
}
|
||||
|
||||
a.dropdown-list-item:hover {
|
||||
opacity: 0.95;
|
||||
}
|
||||
|
||||
.actionlink {
|
||||
color: var(--primary-color) !important
|
||||
}
|
||||
|
||||
.uninstall {
|
||||
float: right;
|
||||
color: var(--google-red-500) !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@media all and (max-width: 550px) {
|
||||
select.hacs-select.custom_repository {
|
||||
width: 100%;
|
||||
}
|
||||
input#custom_url {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.actionlink {
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
display: block;
|
||||
font-size: x-large;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.uninstall {
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
.minigrid {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.card-action a:hover {
|
||||
opacity: 0.6 !important;
|
||||
}
|
||||
|
||||
.codeinfo {
|
||||
opacity: 0.6 !important;
|
||||
}
|
||||
|
||||
.hacs-select {
|
||||
display: initial !important;
|
||||
margin-left: 1%;
|
||||
width: 20%;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
color: var(--primary-text-color);
|
||||
}
|
||||
|
||||
.hacs-badge {
|
||||
background-color: var(--hacs-badge-color);
|
||||
margin-right: 1%;
|
||||
font-size: 12px;
|
||||
padding: 0px 4px 2px 4px;
|
||||
color: var(--hacs-badge-text-color);
|
||||
-moz-border-radius: 10px 10px 10px 10px;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
}
|
||||
|
||||
tr.hacs-table-row:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/* color vars*/
|
||||
:root {
|
||||
--hacs-status-installed: #126e15;
|
||||
--hacs-status-pending-restart: #a70000;
|
||||
--hacs-status-pending-update: #ffab40;
|
||||
--hacs-status-default: var(--primary-text-color);
|
||||
--hacs-badge-color: var(--primary-color);
|
||||
--hacs-badge-text-color: var(--primary-text-color);
|
||||
--primary-color: #03a9f4;
|
||||
--primary-text-color: #000000;
|
||||
--secondary-text-color: #424141;
|
||||
--primary-background-color: #fafafa;
|
||||
--paper-card-background-color: #ffffff;
|
||||
--dark-primary-color: #00405d;
|
||||
--google-red-500: #db4437;
|
||||
}
|
||||
|
||||
/* hug screens*/
|
||||
@media all and (min-width: 2000px) {
|
||||
.hacs-card-container {
|
||||
grid-template-columns: repeat(6, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* even bigger screens*/
|
||||
@media all and (min-width: 1500px) and (max-width: 1999px) {
|
||||
.hacs-card-container {
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* bigger screens*/
|
||||
@media all and (min-width: 1000px) and (max-width: 1499px) {
|
||||
.hacs-card-container {
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* big screens */
|
||||
@media all and (min-width: 550px) and (max-width: 999px) {
|
||||
.hacs-card-container {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
|
||||
|
||||
#main::-webkit-scrollbar-track
|
||||
{
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#main::-webkit-scrollbar
|
||||
{
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
#main::-webkit-scrollbar-thumb
|
||||
{
|
||||
border-radius: 10px;
|
||||
background-color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
|
||||
/* smal screens */
|
||||
@media all and (max-width: 550px) {
|
||||
body {
|
||||
overflow: scroll !important;
|
||||
}
|
||||
|
||||
.minigrid {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.smal-hide {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.hacs-content {
|
||||
overflow: scroll !important;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* laoder */
|
||||
|
||||
*.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
div.loading{
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(16, 16, 16, 0.5);
|
||||
}
|
||||
|
||||
@-webkit-keyframes uil-ring-anim {
|
||||
0% {
|
||||
-ms-transform: rotate(0deg);
|
||||
-moz-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-ms-transform: rotate(360deg);
|
||||
-moz-transform: rotate(360deg);
|
||||
-webkit-transform: rotate(360deg);
|
||||
-o-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes uil-ring-anim {
|
||||
0% {
|
||||
-ms-transform: rotate(0deg);
|
||||
-moz-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-ms-transform: rotate(360deg);
|
||||
-moz-transform: rotate(360deg);
|
||||
-webkit-transform: rotate(360deg);
|
||||
-o-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@-moz-keyframes uil-ring-anim {
|
||||
0% {
|
||||
-ms-transform: rotate(0deg);
|
||||
-moz-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-ms-transform: rotate(360deg);
|
||||
-moz-transform: rotate(360deg);
|
||||
-webkit-transform: rotate(360deg);
|
||||
-o-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@-ms-keyframes uil-ring-anim {
|
||||
0% {
|
||||
-ms-transform: rotate(0deg);
|
||||
-moz-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-ms-transform: rotate(360deg);
|
||||
-moz-transform: rotate(360deg);
|
||||
-webkit-transform: rotate(360deg);
|
||||
-o-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@-moz-keyframes uil-ring-anim {
|
||||
0% {
|
||||
-ms-transform: rotate(0deg);
|
||||
-moz-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-ms-transform: rotate(360deg);
|
||||
-moz-transform: rotate(360deg);
|
||||
-webkit-transform: rotate(360deg);
|
||||
-o-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes uil-ring-anim {
|
||||
0% {
|
||||
-ms-transform: rotate(0deg);
|
||||
-moz-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-ms-transform: rotate(360deg);
|
||||
-moz-transform: rotate(360deg);
|
||||
-webkit-transform: rotate(360deg);
|
||||
-o-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@-o-keyframes uil-ring-anim {
|
||||
0% {
|
||||
-ms-transform: rotate(0deg);
|
||||
-moz-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-ms-transform: rotate(360deg);
|
||||
-moz-transform: rotate(360deg);
|
||||
-webkit-transform: rotate(360deg);
|
||||
-o-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@keyframes uil-ring-anim {
|
||||
0% {
|
||||
-ms-transform: rotate(0deg);
|
||||
-moz-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-ms-transform: rotate(360deg);
|
||||
-moz-transform: rotate(360deg);
|
||||
-webkit-transform: rotate(360deg);
|
||||
-o-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
.uil-ring-css {
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
.uil-ring-css > div {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
border-radius: 80px;
|
||||
box-shadow: 0 6px 0 0 var(--primary-color);
|
||||
-ms-animation: uil-ring-anim 1s linear infinite;
|
||||
-moz-animation: uil-ring-anim 1s linear infinite;
|
||||
-webkit-animation: uil-ring-anim 1s linear infinite;
|
||||
-o-animation: uil-ring-anim 1s linear infinite;
|
||||
animation: uil-ring-anim 1s linear infinite;
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
// Copy active HA theme
|
||||
document.getElementsByTagName("html").item(0).setAttribute("style", parent.document.getElementsByTagName("html").item(0).style.cssText)
|
||||
|
||||
// Copy yhe content of the Lovelace example to the clipboard.
|
||||
function CopyToLovelaceExampleToClipboard() {
|
||||
window.getSelection().selectAllChildren(document.getElementById("LovelaceExample"));
|
||||
document.execCommand("copy");
|
||||
document.getSelection().empty()
|
||||
document.getElementById('lovelacecopy').style.color = 'forestgreen';
|
||||
}
|
||||
|
||||
// Show progress bar
|
||||
function ShowProgressBar() {
|
||||
document.getElementById('progressbar').style.display = 'block';
|
||||
}
|
||||
|
||||
// Hard reloading
|
||||
function HardReload() {
|
||||
parent.location.reload(true)
|
||||
}
|
||||
|
||||
// Searchbar
|
||||
function Search() {
|
||||
var input = document.getElementById("Search");
|
||||
if (input) {
|
||||
var filter = input.value.toLowerCase();
|
||||
var nodes = document.getElementsByClassName('hacs-card');
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
if (nodes[i].innerHTML.toLowerCase().includes(filter)) {
|
||||
nodes[i].style.display = "block";
|
||||
} else {
|
||||
nodes[i].style.display = "none";
|
||||
}
|
||||
}
|
||||
var nodes = document.getElementsByClassName('hacs-table-row');
|
||||
for (i = 0; i < nodes.length; i++) {
|
||||
if (nodes[i].innerHTML.toLowerCase().includes(filter)) {
|
||||
nodes[i].style.display = "table-row";
|
||||
} else {
|
||||
nodes[i].style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Dropdown
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var elems = document.querySelectorAll('.dropdown-trigger');
|
||||
M.Dropdown.init(elems, { hover: false, constrainWidth: false });
|
||||
});
|
||||
|
||||
// Modal
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var elems = document.querySelectorAll('.modal');
|
||||
M.Modal.init(elems, {});
|
||||
});
|
||||
|
||||
|
||||
// Loader
|
||||
function toggleLoading() {
|
||||
var loadingOverlay = document.querySelector('.loading');
|
||||
loadingOverlay.classList.remove('hidden')
|
||||
document.activeElement.blur();
|
||||
}
|
||||
|
||||
|
||||
// Check if we can reload
|
||||
function sleep(time) {
|
||||
return new Promise((resolve) => setTimeout(resolve, time));
|
||||
}
|
||||
function CheckIfWeCanReload() {
|
||||
var data = true;
|
||||
const hacsrequest = new XMLHttpRequest()
|
||||
hacsrequest.open('GET', '/hacs_task', true)
|
||||
hacsrequest.onload = function () {
|
||||
data = JSON.parse(this.response)
|
||||
data = data["task"]
|
||||
if (!data) {
|
||||
console.log("Background task is no longer running, reloading in 5s...")
|
||||
sleep(5000).then(() => {
|
||||
location.reload()
|
||||
});
|
||||
}
|
||||
}
|
||||
hacsrequest.send()
|
||||
}
|
||||
|
||||
function IsTaskRunning() {
|
||||
let retval = false;
|
||||
let disp = document.getElementsByClassName("progress")
|
||||
if (disp) {
|
||||
disp = disp.item(0).style.display;
|
||||
if (disp == "block") {
|
||||
retval = true
|
||||
} else {
|
||||
retval = false
|
||||
}
|
||||
}
|
||||
return retval
|
||||
}
|
||||
|
||||
window.setInterval(function () {
|
||||
var running = false;
|
||||
running = IsTaskRunning();
|
||||
if (running) {
|
||||
CheckIfWeCanReload();
|
||||
}
|
||||
}, 10000);
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,51 @@
|
||||
{% set progressbar = 'block' if hacs.system.status.background_task else 'none' %}
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="/hacsweb/{{ hacs.token }}/static/materialize.min.css.gz">
|
||||
<link rel="stylesheet" href="/hacsweb/{{ hacs.token }}/static/all.min.css.gz">
|
||||
<script src="/hacsweb/{{ hacs.token }}/static/materialize.min.js.gz"></script>
|
||||
<link rel="stylesheet" href="/hacsweb/{{ hacs.token }}/static/static/hacs.css">
|
||||
<script src="/hacsweb/{{ hacs.token }}/static/hacs.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navbar-fixed">
|
||||
<nav class="nav-extended hacs-nav">
|
||||
<div class="nav-content">
|
||||
<ul class="right tabs tabs-transparent">
|
||||
<li class="tab {{ 'active' if location == 'overview' }}"><a href="/hacsweb/{{ hacs.token }}/overview?timestamp={{ timestamp }}">Overview</a></li>
|
||||
<li class="tab {{ 'active' if location == 'store' }}"><a href="/hacsweb/{{ hacs.token }}/store?timestamp={{ timestamp }}">Store</a></li>
|
||||
<li class="tab right {{ 'active' if location == 'settings' }}"><a href="/hacsweb/{{ hacs.token }}/settings?timestamp={{ timestamp }}">Settings</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div id="main" class="hacs-content">
|
||||
<div class="progressbar" style="display: {{ progressbar }}">
|
||||
<p>Background task running, this page will reload when it's done.</p>
|
||||
<div class="progress hacs-bar-background" id="progressbar">
|
||||
<div class="indeterminate hacs-bar"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="loading hidden">
|
||||
<div class='uil-ring-css' style='transform:scale(0.79);'>
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
{% if message %}
|
||||
{% include 'message.html' with context %}
|
||||
{% endif %}
|
||||
{% set hacs_repo = hacs.get_by_name("hacs/integration") %}
|
||||
{% if hacs_repo.pending_restart %}
|
||||
{% set message = "The frontend of HACS has been disabled until you restart Home Assistant." %}
|
||||
{% include 'message.html' with context %}
|
||||
{% else %}
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,36 @@
|
||||
<div class='hacs-overview-container'>
|
||||
<h5>{{ displaytype }}</h5>
|
||||
<div class='hacs-card-container'>
|
||||
{% for repository in repositories.repositories %}
|
||||
<a href="/hacsweb/{{ hacs.token }}/repository/{{ repository.information.uid }}?timestamp={{ timestamp }}"
|
||||
class="hacs-card" onclick="toggleLoading()">
|
||||
<div class="hacs-card overview">
|
||||
<div id="statusicon">
|
||||
|
||||
</div>
|
||||
<div id="title">
|
||||
<input type="hidden" name="author" value="{{repository.information.authors}}">
|
||||
<input type="hidden" name="topics" value="{{repository.information.topics}}">
|
||||
<input type="hidden" name="full_name" value="{{repository.information.full_name}}">
|
||||
<span class="hacs-card-title">
|
||||
{% if location == 'store' and repository.status.new %}
|
||||
<span title="{{ repository.display_status_description }}" class='hacs-badge'>NEW</span>
|
||||
{% else %}
|
||||
<i title="{{ repository.display_status_description }}"
|
||||
class='fas fa-cube card-status {{repository.display_status}}'></i>
|
||||
{% endif %}
|
||||
{{repository.display_name}}
|
||||
</span>
|
||||
</div>
|
||||
<div id="description">
|
||||
<span class="hacs-card-content">
|
||||
<p>{{repository.information.description}}</p>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</br>
|
||||
</br>
|
||||
@@ -0,0 +1,47 @@
|
||||
{% set repositories = namespace(repositories=[]) %}
|
||||
{% for repository in hacs.sorted_by_name %}
|
||||
{% if repository.status.new %}
|
||||
{% set repositories.repositories = repositories.repositories+[repository] %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if repositories.repositories %}
|
||||
<div class='hacs-overview-container'>
|
||||
<h5>NEW REPOSITORIES (ALL)</h5>
|
||||
<form action="/hacsapi/{{ hacs.token }}/remove_new_flag" name="remove_new_flag" method="post" accept-charset="utf-8"
|
||||
enctype="application/x-www-form-urlencoded" class="hacs-form">
|
||||
<input type="hidden" name="return" value="store">
|
||||
<a class="waves-effect waves-light btn modal-trigger hacsbutton" href="#"
|
||||
onclick="toggleLoading();document.getElementsByName('remove_new_flag')[0].submit()" style="width: 95%;">
|
||||
Remove the NEW flag for all new items
|
||||
</a>
|
||||
</form>
|
||||
<div class='hacs-card-container'>
|
||||
{% for repository in repositories.repositories %}
|
||||
<a href="/hacsweb/{{ hacs.token }}/repository/{{ repository.information.uid }}?timestamp={{ timestamp }}"
|
||||
class="hacs-card" onclick="toggleLoading()">
|
||||
<div class="hacs-card overview">
|
||||
<div id="statusicon">
|
||||
|
||||
</div>
|
||||
<div id="title">
|
||||
<span class="hacs-card-title">
|
||||
<span class="hacs-badge">
|
||||
{{repository.information.category | upper}}
|
||||
</span>
|
||||
</br></br>
|
||||
{{repository.display_name}}
|
||||
</span>
|
||||
</div>
|
||||
<div id="description">
|
||||
<span class="hacs-card-content">
|
||||
<p>{{repository.information.description}}</p>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</br>
|
||||
</br>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class='container'>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card-panel orange darken-4">
|
||||
<div class="card-content white-text">
|
||||
<span>
|
||||
{{message}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,33 @@
|
||||
<div id="modal_upgrade_all" class="modal hacscolor">
|
||||
<div class="modal-content">
|
||||
<h5>Pending Upgrades</h5>
|
||||
{% for repository in hacs.repositories %}
|
||||
{% if repository.pending_upgrade %}
|
||||
<p>- {{repository.information.name}} (
|
||||
{{repository.display_installed_version}}
|
||||
->
|
||||
{{repository.display_available_version}}
|
||||
)</p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</br>
|
||||
<p>
|
||||
Be careful using this feature, elements may contain breaking changes,
|
||||
make sure you read the release notes for all the elements in the list above.
|
||||
</p>
|
||||
</div>
|
||||
<div class="modal-footer hacscolor">
|
||||
{% if hacs.system.status.background_task %}
|
||||
<p>Background task is running, batch upgrade is disabled.</p>
|
||||
{% else %}
|
||||
<form action="/hacsapi/{{ hacs.token }}/repositories_upgrade_all" name="upgrade_all" method="post"
|
||||
accept-charset="utf-8" enctype="application/x-www-form-urlencoded" class="hacs-form">
|
||||
<a href="#" onclick="toggleLoading();document.getElementsByName('upgrade_all')[0].submit()"
|
||||
class='waves-effect waves-light btn hacsbutton'
|
||||
style="background-color: var(--google-red-500) !important; font-weight: bold;">
|
||||
UPGRADE ALL
|
||||
</a>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
<div id="haversion" class="modal hacscolor">
|
||||
<div class="modal-content">
|
||||
<h5>Unsupported Home Assistant version</h5>
|
||||
<p>
|
||||
You have version '{{hacs.system.ha_version}}' of Home Assistant, but version
|
||||
'{{repository.display_available_version}}' of '{{repository.display_name}}' require version
|
||||
'{{repository.repository_manifest.homeassistant}}' of Home Assistant, installation and upgrades are disabled
|
||||
for this
|
||||
integration untill you upgrade Home Assistant.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,77 @@
|
||||
<!-- Used for both overview and store-->
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
{% if location == 'store' %}
|
||||
<div class='hacs-overview-container'>
|
||||
<input type="text" id="Search" onkeyup="Search()" placeholder="Please enter a search term.." title="Type in a name"
|
||||
autofocus style="color: var(--primary-text-color)">
|
||||
</div>
|
||||
{% if hacs.configuration.frontend_mode == "Grid" %}
|
||||
{% include 'grid_new.html' with context %}
|
||||
{% else %}
|
||||
{% include 'table_new.html' with context %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% for type in hacs.common.categories %}
|
||||
|
||||
{% if type == 'appdaemon' %}
|
||||
{% set displaytype = 'APPDAEMON APPS' %}
|
||||
{% elif type == 'python_script' %}
|
||||
{% set displaytype = 'PYTHON SCRIPTS' %}
|
||||
{% else %}
|
||||
{% set displaytype = (type + 's') | upper %}
|
||||
{% endif %}
|
||||
|
||||
{% set repositories = namespace(repositories=[]) %}
|
||||
|
||||
{% for repository in hacs.sorted_by_name %}
|
||||
{% set repo = namespace(include=True) %}
|
||||
|
||||
{% if repository.status.hide and repo.include %}
|
||||
{% set repo.include = False %}
|
||||
{% endif %}
|
||||
|
||||
{% if repository.information.category != type and repo.include %}
|
||||
{% set repo.include = False %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if location == 'overview' %}
|
||||
{% if not repository.status.installed and repo.include %}
|
||||
{% set repo.include = False %}
|
||||
{% if repository.information.uid == "172733314" %}
|
||||
{% set repo.include = True %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if repository.information.uid == "172733314" %}
|
||||
{% set repo.include = False %}
|
||||
{% endif %}
|
||||
{% if hacs.configuration.country and repo.include %}
|
||||
{% if repository.repository_manifest %}
|
||||
{% if repository.repository_manifest.country %}
|
||||
{% if hacs.configuration.country not in repository.repository_manifest.country %}
|
||||
{% set repo.include = False %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if repo.include %}
|
||||
{% set repositories.repositories = repositories.repositories+[repository] %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if repositories.repositories %}
|
||||
{% if hacs.configuration.frontend_mode == "Grid" %}
|
||||
{% include 'grid.html' with context %}
|
||||
{% else %}
|
||||
{% include 'table.html' with context %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,93 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
|
||||
{% if repository.pending_restart %}
|
||||
{% set message = "You need to restart (and potentially reconfigure) Home Assistant, for your last operation to be loaded." %}
|
||||
{% endif %}
|
||||
|
||||
{% if repository.information.category == "integration" and repository.status.first_install and repository.status.installed and repository.config_flow %}
|
||||
{% set message = "
|
||||
<b>Good news!</b></br>
|
||||
This integration supports config flows!</br>
|
||||
This means that you can go to 'Configuration' --> 'Integrations' --> '+' to configure it.</br>
|
||||
The best part if you do that, is that you do <b>not</b> need to restart Home Assistant.</br></br>
|
||||
<i>You may need to clear the cache on the integrations page before it shows in the list (+).</i>"%}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if message %}
|
||||
{% include 'message.html' with context %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card hacscolor">
|
||||
<div class="card-content">
|
||||
<span class="card-title">
|
||||
<b>{{repository.display_name}}</b>
|
||||
<a class='dropdown-trigger btn right' href='#' data-target='dropdown1'
|
||||
style="background-color: var(--primary-color); padding-top: 8px; height: 48px">
|
||||
<i class="fas fa-bars"></i>
|
||||
</a>
|
||||
|
||||
{% include 'repository/menu.html' with context %}
|
||||
</span>
|
||||
<p>{{repository.information.description}}</p></br>
|
||||
<table class="hacs-table">
|
||||
{% if repository.status.installed %}
|
||||
<tr class="hacs-table-row repository">
|
||||
<td class="repository">
|
||||
<b>Installed {{repository.display_version_or_commit}}:</b>
|
||||
</td>
|
||||
<td class="repository text">
|
||||
{{repository.display_installed_version}}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
<tr class="hacs-table-row repository">
|
||||
{% if repository.releases.published_tags %}
|
||||
{% include 'repository/versionselect.html' with context %}
|
||||
{% else %}
|
||||
<td class="repository">
|
||||
<b>Available {{repository.display_version_or_commit}}:</b>
|
||||
</td>
|
||||
<td class="repository text">
|
||||
{{repository.display_available_version}}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% if repository.status.selected_tag == repository.information.default_branch %}
|
||||
<tr class="hacs-table-row repository">
|
||||
<td class="repository">
|
||||
<b>Last updated:</b>
|
||||
</td>
|
||||
<td class="repository text">
|
||||
{{repository.information.last_updated}}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% include 'repository/authors.html' with context %}
|
||||
</table>
|
||||
</div>
|
||||
{% include 'repository/buttons.html' with context %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card hacscolor">
|
||||
<div class="card-content" style="margin-top: -20px;">
|
||||
{{ repository.information.additional_info }}
|
||||
{% include 'repository/note.html' with context %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,27 @@
|
||||
{% if repository.information.authors %}
|
||||
{% if repository.information.category == "integration" %}
|
||||
<tr class="hacs-table-row repository">
|
||||
<td class="repository">
|
||||
<b>Author(s):</b>
|
||||
</td>
|
||||
<td class="repository text">
|
||||
{% for author in repository.information.authors %}
|
||||
{% if "@" in author %}
|
||||
{% set author = author.split("@")[-1] %}
|
||||
{% endif %}
|
||||
<a rel='noreferrer' href='https://github.com/{{author}}' target='_blank'
|
||||
style='color: var(--primary-color) !important; margin: 2'> @{{author}}</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr class="hacs-table-row repository">
|
||||
<td class="repository">
|
||||
<b>Author:</b>
|
||||
</td>
|
||||
<td class="repository text">
|
||||
{{repository.information.authors}}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,50 @@
|
||||
{% if not repository.can_install %}
|
||||
{% include 'modal/wrong_ha_version.html' with context %}
|
||||
{% endif %}
|
||||
|
||||
<div class="card-action">
|
||||
{% if repository.can_install %}
|
||||
<form action="/hacsapi/{{ hacs.token }}/repository_install" name="install" method="post" accept-charset="utf-8"
|
||||
enctype="application/x-www-form-urlencoded" class="hacs-form">
|
||||
<input type="hidden" name="repository_id" value="{{repository.information.uid}}">
|
||||
<a class="actionlink" href="#" onclick="toggleLoading();document.getElementsByName('install')[0].submit()">
|
||||
{{repository.main_action}}
|
||||
</a>
|
||||
</form>
|
||||
{% else %}
|
||||
<a class="modal-trigger actionlink" href="#haversion">
|
||||
{{repository.main_action}}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if repository.pending_upgrade and repository.display_version_or_commit == "version" %}
|
||||
<a class="actionlink" rel='noreferrer'
|
||||
href='https://github.com/{{repository.information.full_name}}/releases/{{repository.available_version}}'
|
||||
target='_blank'>
|
||||
CHANGELOG
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<a class="actionlink" rel='noreferrer' href='https://github.com/{{repository.information.full_name}}' target='_blank'>
|
||||
repository
|
||||
</a>
|
||||
|
||||
{% if repository.status.installed and repository.information.category == "plugin" %}
|
||||
{% set name = repository.information.full_name.split("/")[-1] %}
|
||||
<a class="actionlink" href='/community_plugin/{{name}}/{{repository.information.file_name}}' target='_blank'>
|
||||
OPEN PLUGIN
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if repository.status.installed and repository.information.uid != "172733314" %}
|
||||
<form action="/hacsapi/{{ hacs.token }}/repository_uninstall" name="uninstall" method="post" accept-charset="utf-8"
|
||||
enctype="application/x-www-form-urlencoded" class="hacs-form">
|
||||
<input type="hidden" name="repository_id" value="{{repository.information.uid}}">
|
||||
<a class="actionlink uninstall" href='#'
|
||||
onclick="toggleLoading();document.getElementsByName('uninstall')[0].submit()">
|
||||
UNINSTALL
|
||||
</a>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,61 @@
|
||||
<ul id='dropdown1' class='dropdown-content'>
|
||||
|
||||
<form action="/hacsapi/{{ hacs.token }}/repository_update" name="update" method="post" accept-charset="utf-8"
|
||||
enctype="application/x-www-form-urlencoded">
|
||||
<input type="hidden" name="repository_id" value="{{repository.information.uid}}">
|
||||
<li>
|
||||
<a class="dropdown-list-item" href='#' onclick="toggleLoading();document.getElementsByName('update')[0].submit()">
|
||||
Reload
|
||||
</a>
|
||||
</li>
|
||||
</form>
|
||||
|
||||
{% if repository.display_version_or_commit == "version" %}
|
||||
{% set hide_show = "hide" if repository.status.show_beta else "show" %}
|
||||
<form action="/hacsapi/{{ hacs.token }}/repository_beta_{{hide_show}}" name="beta" method="post"
|
||||
accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
|
||||
<input type="hidden" name="repository_id" value="{{repository.information.uid}}">
|
||||
<li>
|
||||
<a class="dropdown-list-item" href='#' onclick="toggleLoading();document.getElementsByName('beta')[0].submit()">
|
||||
{{hide_show | title}} beta
|
||||
</a>
|
||||
</li>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% if not repository.status.installed %}
|
||||
{% if not repository.custom %}
|
||||
{% if repository.information.uid != "172733314" %}
|
||||
<form action="/hacsapi/{{ hacs.token }}/repository_hide" name="repository_hide" method="post" accept-charset="utf-8"
|
||||
enctype="application/x-www-form-urlencoded">
|
||||
<input type="hidden" name="repository_id" value="{{repository.information.uid}}">
|
||||
<li>
|
||||
<a class="dropdown-list-item" href='#'
|
||||
onclick="toggleLoading();document.getElementsByName('repository_hide')[0].submit()">
|
||||
Hide
|
||||
</a>
|
||||
</li>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<li>
|
||||
<a class="dropdown-list-item" rel='noreferrer'
|
||||
href="https://github.com/{{repository.information.full_name}}/issues/" target="_blank">
|
||||
Open issue
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
{% if repository.information.uid != "172733314" %}
|
||||
<li>
|
||||
<a class="dropdown-list-item" rel='noreferrer'
|
||||
href="https://github.com/hacs/integration/issues/new?title={{repository.information.full_name}}&labels=flag&assignee=ludeeus&template=flag.md"
|
||||
target="_blank">
|
||||
Flag this
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
@@ -0,0 +1,42 @@
|
||||
{% if repository.additional_info %}
|
||||
</br>
|
||||
<hr></br>
|
||||
{% endif %}
|
||||
|
||||
{% if repository.information.category == "appdaemon" %}
|
||||
|
||||
<i>
|
||||
When installed, this will be located in '{{repository.content.path.local}}',
|
||||
you still need to add it to your 'apps.yaml' file.
|
||||
</i>
|
||||
|
||||
{% elif repository.information.category == "integration" %}
|
||||
|
||||
<i>
|
||||
When installed, this will be located in '{{repository.content.path.local}}',
|
||||
you still need to add it to your 'configuration.yaml' file.
|
||||
</i>
|
||||
|
||||
{% elif repository.information.category == "plugin" %}
|
||||
{% set name = repository.information.full_name.split("/")[-1] %}
|
||||
|
||||
<i>
|
||||
When installed, this will be located in '{{repository.content.path.local }}',
|
||||
you still need to add it to your lovelace configuration ('ui-lovelace.yaml' or the raw UI config editor).
|
||||
</i>
|
||||
</br></br>
|
||||
<i>
|
||||
When you add this to your configuration use this:
|
||||
</i></br>
|
||||
<pre id="LovelaceExample" class="yaml">
|
||||
- url: /community_plugin/{{name}}/{{repository.information.file_name}}
|
||||
{%- if repository.information.javascript_type %}
|
||||
type: {{repository.information.javascript_type}}
|
||||
{%- else %}
|
||||
type: Could not determine the type of this plugin, check the repository.
|
||||
{%- endif -%}
|
||||
</pre>
|
||||
<a title="Copy content to clipboard" id="lovelacecopy" onclick="CopyToLovelaceExampleToClipboard()">
|
||||
<i class="fa fa-copy"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,24 @@
|
||||
{% set tags = repository.releases.published_tags | sort(True) %}
|
||||
{% set tags = tags + [repository.information.default_branch] %}
|
||||
|
||||
|
||||
{% if repository.status.selected_tag %}
|
||||
{% set selected_tag = repository.status.selected_tag %}
|
||||
{% else %}
|
||||
{% set selected_tag = repository.versions.available %}
|
||||
{% endif %}
|
||||
<td class="repository">
|
||||
<b>Available versions:</b>
|
||||
</td>
|
||||
<td class="repository">
|
||||
<form action="/hacsapi/{{ hacs.token }}/repository_select_tag" name="selected_tag" method="post"
|
||||
accept-charset="utf-8" enctype="application/x-www-form-urlencoded" class="hacs-form">
|
||||
<input type="hidden" name="repository_id" value="{{repository.information.uid}}">
|
||||
<select name="selected_tag" class="hacs-select repository"
|
||||
onchange="toggleLoading();document.getElementsByName('selected_tag')[0].submit()">
|
||||
{% for tag in tags %}
|
||||
<option {{'selected' if selected_tag == tag else ''}} class='hacscolor' value='{{tag}}'>{{tag}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
@@ -0,0 +1,20 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
{% if hacs.configuration.dev %}
|
||||
{% set message = "You have 'dev' enabled for HACS, this is not intended for regular use, no support will be given if you break something." %}
|
||||
{% include 'message.html' with context %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'modal/upgrade_all.html' with context %}
|
||||
|
||||
|
||||
{% include 'settings/hacs_info.html' with context %}
|
||||
{% include 'settings/buttons.html' with context %}
|
||||
{% include 'settings/custom_repositories.html' with context %}
|
||||
{% include 'settings/hidden_repositories.html' with context %}
|
||||
|
||||
|
||||
{% if hacs.configuration.dev and not hacs.system.status.background_task %}
|
||||
{% include 'settings/developer.html' with context %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,26 @@
|
||||
<div class='hacs-overview-container minigrid'>
|
||||
|
||||
<form action="/hacsapi/{{ hacs.token }}/repositories_reload" name="reload" method="post" accept-charset="utf-8"
|
||||
enctype="application/x-www-form-urlencoded" class="hacs-form">
|
||||
<a class="waves-effect waves-light btn modal-trigger hacsbutton" href="#"
|
||||
onclick="toggleLoading();document.getElementsByName('reload')[0].submit()">
|
||||
RELOAD DATA
|
||||
</a>
|
||||
</form>
|
||||
|
||||
<a href="#modal_upgrade_all" class="waves-effect waves-light btn modal-trigger hacsbutton"
|
||||
style="background-color: var(--google-red-500) !important; font-weight: bold;">
|
||||
UPGRADE ALL
|
||||
</a>
|
||||
|
||||
<a href='https://github.com/hacs/integration' rel='noreferrer' class='waves-effect waves-light btn hacsbutton'
|
||||
target="_blank">
|
||||
HACS REPO
|
||||
</a>
|
||||
|
||||
<a href='https://github.com/hacs/integration/issues' rel='noreferrer'
|
||||
class='waves-effect waves-light btn hacsbutton' target="_blank">
|
||||
OPEN ISSUE
|
||||
</a>
|
||||
|
||||
</div>
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="row">
|
||||
<ul class="collection with-header hacslist">
|
||||
<li class="collection-header hacscolor hacslist">
|
||||
<h5>CUSTOM REPOSITORIES</h5>
|
||||
</li>
|
||||
{% if hacs.system.status.background_task %}
|
||||
<li class="collection-item hacscolor hacslist">
|
||||
Loading custom repositories...
|
||||
</li>
|
||||
{% else %}
|
||||
{% for repository in hacs.sorted_by_repository_name %}
|
||||
{% if repository.custom %}
|
||||
<li class="collection-item hacscolor hacslist">
|
||||
<div>
|
||||
<a href="/hacsweb/{{ hacs.token }}/repository/{{repository.information.uid}}">
|
||||
<span class="hacs-badge">
|
||||
{{repository.information.category | upper}}
|
||||
</span>
|
||||
{{repository.information.full_name }}
|
||||
</a>
|
||||
{% if repository.status.installed %}
|
||||
<i title="Remove is not possible when installed."
|
||||
class="secondary-content fas fa-trash-alt disabledaction"></i>
|
||||
{% else %}
|
||||
<form action="/hacsapi/{{ hacs.token }}/repository_remove" name="remove" method="post" accept-charset="utf-8"
|
||||
enctype="application/x-www-form-urlencoded" class="hacs-form">
|
||||
<input type="hidden" name="repository_id" value="{{repository.information.uid}}">
|
||||
<a class="secondary-content" href="#"
|
||||
onclick="toggleLoading();document.getElementsByName('remove')[0].submit()"
|
||||
style=" color: var(--primary-color)">
|
||||
<i title="Remove." class="fas fa-trash-alt"></i>
|
||||
</a>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% if not hacs.system.status.background_task %}
|
||||
<form class="minigrid" action="/hacsapi/{{ hacs.token }}/repository_register" method="post" accept-charset="utf-8"
|
||||
enctype="application/x-www-form-urlencoded">
|
||||
<input class="custom_repository" id="custom_url" type="text" name="custom_url"
|
||||
placeholder=" ADD CUSTOM REPOSITORY" style="width: 70%; color: var(--primary-text-color)">
|
||||
<select name="repository_type" class="hacs-select custom_repository">
|
||||
<option disabled selected value>Category</option>
|
||||
{% for element_type in hacs.common.categories | sort %}
|
||||
<option class='hacscolor' value='{{element_type}}'>{{element_type | title}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<button class="btn waves-effect waves-light right" type="submit" name="add" onclick="toggleLoading()"
|
||||
style="background-color: var(--primary-color); height: 44px;">
|
||||
<i class="fas fa-save"></i>
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="hacs-card-standalone">
|
||||
<form style="display: contents" action="/hacsapi/{{ hacs.token }}/remove_new_flag" method="post" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
|
||||
<button class="waves-effect waves-light btn hacsadminbutton" type="submit" onclick="toggleLoading()">
|
||||
REMOVE FLAGS
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
{% for repository in hacs.store.frontend|sort(attribute='name') %}
|
||||
<form style="display: contents" action="/hacsapi/{{ hacs.token }}/devrepository" method="post" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
|
||||
<input type="hidden" name="repository" value="{{repository.information.uid}}">
|
||||
<button class="waves-effect waves-light btn hacsadminbutton" type="submit" onclick="toggleLoading()">
|
||||
{{ repository.name }}
|
||||
</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="hacs-card-standalone">
|
||||
<form style="display: contents" action="/hacsapi/{{ hacs.token }}/set_ha_version_action" method="post" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
|
||||
<input class="hacscolor" type="text" name="ha_version" value="{{hacs.store.ha_version}}">
|
||||
<button class="waves-effect waves-light btn hacsadminbutton" type="submit" onclick="toggleLoading()">
|
||||
SET
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="hacs-card-standalone">
|
||||
<form style="display: contents" action="/hacsapi/{{ hacs.token }}/dev_template" method="post" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
|
||||
<input class="hacscolor" type="text" name="repository_id" value="{{ hacs.dev_template_id }}">
|
||||
<textarea class="hacscolor" name="template" style="width:100%;height:250px;"></textarea></br>
|
||||
<button name="set" class="waves-effect waves-light btn hacsadminbutton" type="submit" onclick="toggleLoading()">
|
||||
TEST
|
||||
</button>
|
||||
<button name="clear" class="waves-effect waves-light btn hacsadminbutton" type="submit" onclick="toggleLoading()">
|
||||
CLEAR
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if hacs.dev_template %}
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="hacs-card-standalone">
|
||||
{{ hacs.dev_template }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,8 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="hacs-card-standalone">
|
||||
<label>{{hacs.token}}</label>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,19 @@
|
||||
<div class="hacs-overview-container hacs-color minigrid" style="margin-top: 30px;">
|
||||
<div class="hacs-card-standalone">
|
||||
<h5 style="margin-left: 5px;">DEVELOPER TOOLS</h5>
|
||||
{% for button in [
|
||||
"remove_new_flag",
|
||||
"repositories",
|
||||
"set_ha_version",
|
||||
"token",
|
||||
"template_test"
|
||||
] %}
|
||||
<form style="display: contents" action="/hacsapi/{{ hacs.token }}/devview" method="post" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
|
||||
<input type="hidden" name="view" value="{{button}}">
|
||||
<button class="waves-effect waves-light btn hacsadminbutton" type="submit" onclick="toggleLoading()">
|
||||
{{ button.replace("_"," ")}}
|
||||
</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,38 @@
|
||||
{% if hacs.get_by_id("172733314").pending_restart %}
|
||||
{% set pending_restart = " <b>(RESTART PENDING!)</b>" %}
|
||||
{% else %}
|
||||
{% set pending_restart = "" %}
|
||||
{% endif %}
|
||||
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="hacs-card-standalone">
|
||||
<h5>HACS (Home Assistant Community Store)</h5>
|
||||
<table class="hacs-table">
|
||||
<tr class="hacs-table-row repository">
|
||||
<td class="repository">
|
||||
<b>Version:</b>
|
||||
</td>
|
||||
<td class="repository text">
|
||||
{{hacs.version}}{{pending_restart}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="hacs-table-row repository">
|
||||
<td class="repository">
|
||||
<b>Display:</b>
|
||||
</td>
|
||||
<td class="repository">
|
||||
<form action="/hacsapi/{{ hacs.token }}/frontend_mode" name="overview_display" method="post"
|
||||
accept-charset="utf-8" enctype="application/x-www-form-urlencoded" class="hacs-form">
|
||||
<select name="view_type" class="hacs-select repository"
|
||||
onchange="toggleLoading();document.getElementsByName('overview_display')[0].submit()">
|
||||
{% for displayoption in ["Grid", "Table"] %}
|
||||
<option {{"selected" if hacs.configuration.frontend_mode == displayoption else ""}} class="hacscolor"
|
||||
value="{{displayoption}}">{{displayoption}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
{% set repositories = namespace(hidden=False) %}
|
||||
{% for repository in hacs.repositories_list_repo %}
|
||||
{% if repository.hide %}
|
||||
{% set repositories.hidden = True %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if repositories.hidden %}
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="row">
|
||||
<ul class="collection with-header hacslist">
|
||||
<li class="collection-header hacscolor hacslist">
|
||||
<h5>HIDDEN REPOSITORIES</h5>
|
||||
</li>
|
||||
{% if hacs.system.status.background_task %}
|
||||
<li class="collection-item hacscolor hacslist">
|
||||
Loading hidden repositories...
|
||||
</li>
|
||||
{% else %}
|
||||
{% for repository in hacs.repositories_list_repo %}
|
||||
{% if repository.hide %}
|
||||
<li class="collection-item hacscolor hacslist">
|
||||
<div>
|
||||
<form action="/hacsapi/{{ hacs.token }}/repository_unhide" name="remove" method="post" accept-charset="utf-8"
|
||||
enctype="application/x-www-form-urlencoded" class="hacs-form">
|
||||
<input type="hidden" name="repository_id" value="{{repository.information.uid}}">
|
||||
<a href="#" onclick="toggleLoading();document.getElementsByName('remove')[0].submit()"
|
||||
style=" color: var(--primary-color)">
|
||||
<i title="Unhide" class="fas fa-plus-circle" style="padding-right: 8px"></i>
|
||||
</a>
|
||||
{{repository.repository_name}}
|
||||
<span class="hacs-badge">{{repository.repository_type}}</span>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,42 @@
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="row">
|
||||
<h5>{{ displaytype }}</h5>
|
||||
<table class="hacs-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>Name</th>
|
||||
<th class="smal-hide">Description</th>
|
||||
{% if location == 'overview' %}
|
||||
<th class="smal-hide">Installed</th>
|
||||
<th class="smal-hide">Available</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for repository in repositories.repositories %}
|
||||
<tr class="hacs-table-row"
|
||||
onclick="toggleLoading();window.location='/hacsweb/{{ hacs.token }}/repository/{{ repository.information.uid }}?timestamp={{ timestamp }}';">
|
||||
<input type="hidden" name="author" value="{{repository.information.authors}}">
|
||||
<input type="hidden" name="topics" value="{{repository.information.topics}}">
|
||||
<input type="hidden" name="full_name" value="{{repository.information.full_name}}">
|
||||
<td title="{{ repository.display_status_description }}">
|
||||
{% if location == 'store' and repository.status.new %}
|
||||
<span style='margin-left: 25%' class='repository-list-badge hacs-badge'>NEW</span>
|
||||
{% else %}
|
||||
<i style='margin-left: 25%' class='fas fa-cube card-status {{repository.display_status}}'></i></td>
|
||||
{% endif %}
|
||||
<td>
|
||||
{{repository.display_name}}
|
||||
</td>
|
||||
<td class="hacs-card-content smal-hide">{{repository.information.description}}</td>
|
||||
{% if location == 'overview' %}
|
||||
<td class="smal-hide">{{repository.display_installed_version}}</td>
|
||||
<td class="smal-hide">{{repository.display_available_version}}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,44 @@
|
||||
{% set repositories = namespace(repositories=[]) %}
|
||||
{% for repository in hacs.sorted_by_name %}
|
||||
{% if repository.status.new %}
|
||||
{% set repositories.repositories = repositories.repositories+[repository] %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if repositories.repositories %}
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="row">
|
||||
<h5>NEW REPOSITORIES (ALL)</h5>
|
||||
<form action="/hacsapi/{{ hacs.token }}/remove_new_flag" name="remove_new_flag" method="post" accept-charset="utf-8"
|
||||
enctype="application/x-www-form-urlencoded" class="hacs-form">
|
||||
<input type="hidden" name="return" value="store">
|
||||
<a class="waves-effect waves-light btn modal-trigger hacsbutton" href="#"
|
||||
onclick="toggleLoading();document.getElementsByName('remove_new_flag')[0].submit()" style="width: 95%;">
|
||||
Remove the NEW flag for all new items
|
||||
</a>
|
||||
</form>
|
||||
<table class="hacs-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Category</th>
|
||||
<th>Name</th>
|
||||
<th class="smal-hide">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for repository in repositories.repositories %}
|
||||
<tr class="hacs-table-row"
|
||||
onclick="toggleLoading();window.location='/hacsweb/{{ hacs.token }}/repository/{{ repository.information.uid }}?timestamp={{ timestamp }}';">
|
||||
<td>
|
||||
<span class="hacs-badge">{{repository.information.category | upper}}</span>
|
||||
</td>
|
||||
<td>
|
||||
{{repository.display_name}}
|
||||
</td>
|
||||
<td class="hacs-card-content smal-hide">{{repository.information.description}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user