some new automations
This commit is contained in:
@@ -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