some new automations
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user