Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
or resolves a feature request, be sure to link to that issue or discussion
in the additional information section.
-->

## Type of change
Expand Down Expand Up @@ -56,7 +56,7 @@
-->

- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- This PR is related to issue or discussion:
- Link to documentation pull request:

## Checklist
Expand Down
27 changes: 0 additions & 27 deletions .github/lock.yml

This file was deleted.

56 changes: 0 additions & 56 deletions .github/stale.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lock

# yamllint disable-line rule:truthy
on:
schedule:
- cron: "0 * * * *"

jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2.0.1
with:
github-token: ${{ github.token }}
issue-lock-inactive-days: "30"
issue-exclude-created-before: "2020-10-01T00:00:00Z"
issue-lock-reason: ""
pr-lock-inactive-days: "1"
pr-exclude-created-before: "2020-11-01T00:00:00Z"
pr-lock-reason: ""
42 changes: 42 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Stale

# yamllint disable-line rule:truthy
on:
schedule:
- cron: "0 * * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: 90 days stale policy
uses: actions/stale@v3.0.13
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 90
days-before-close: 7
operations-per-run: 25
remove-stale-when-updated: true
stale-issue-label: "stale"
exempt-issue-labels: "no-stale,Help%20wanted,help-wanted,feature-request,feature%20request"
stale-issue-message: >
There hasn't been any activity on this issue recently. Due to the
high number of incoming GitHub notifications, we have to clean some
of the old issues, as many of them have already been resolved with
the latest updates.

Please make sure to update to the latest Home Assistant version and
check if that solves the issue. Let us know if that works for you by
adding a comment 👍

This issue has now been marked as stale and will be closed if no
further activity occurs. Thank you for your contributions.

stale-pr-label: "stale"
exempt-pr-labels: "no-stale"
stale-pr-message: >
There hasn't been any activity on this pull request recently. This
pull request has been automatically marked as stale because of that
and will be closed if no further activity occurs within 7 days.

Thank you for your contributions.
38 changes: 32 additions & 6 deletions hassio/src/ingress-view/hassio-ingress-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import {
fetchHassioAddonInfo,
HassioAddonDetails,
} from "../../../src/data/hassio/addon";
import { createHassioSession } from "../../../src/data/hassio/supervisor";
import {
createHassioSession,
validateHassioSession,
} from "../../../src/data/hassio/ingress";
import "../../../src/layouts/hass-loading-screen";
import "../../../src/layouts/hass-subpage";
import { HomeAssistant, Route } from "../../../src/types";
Expand All @@ -35,6 +38,17 @@ class HassioIngressView extends LitElement {
@property({ type: Boolean })
public narrow = false;

private _sessionKeepAlive?: number;

public disconnectedCallback() {
super.disconnectedCallback();

if (this._sessionKeepAlive) {
clearInterval(this._sessionKeepAlive);
this._sessionKeepAlive = undefined;
}
}

protected render(): TemplateResult {
if (!this._addon) {
return html` <hass-loading-screen></hass-loading-screen> `;
Expand Down Expand Up @@ -83,10 +97,7 @@ class HassioIngressView extends LitElement {
}

private async _fetchData(addonSlug: string) {
const createSessionPromise = createHassioSession(this.hass).then(
() => true,
() => false
);
const createSessionPromise = createHassioSession(this.hass);

let addon;

Expand Down Expand Up @@ -119,7 +130,11 @@ class HassioIngressView extends LitElement {
return;
}

if (!(await createSessionPromise)) {
let session;

try {
session = await createSessionPromise;
} catch (err) {
await showAlertDialog(this, {
text: "Unable to create an Ingress session",
title: addon.name,
Expand All @@ -128,6 +143,17 @@ class HassioIngressView extends LitElement {
return;
}

if (this._sessionKeepAlive) {
clearInterval(this._sessionKeepAlive);
}
this._sessionKeepAlive = window.setInterval(async () => {
try {
await validateHassioSession(this.hass, session);
} catch (err) {
session = await createHassioSession(this.hass);
}
}, 60000);

this._addon = addon;
}

Expand Down
Binary file added public/static/images/conference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/common/util/copy-clipboard.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export const copyToClipboard = (str) => {
const el = document.createElement("textarea");
el.value = str;
document.body.appendChild(el);
el.select();
document.execCommand("copy");
document.body.removeChild(el);
};
4 changes: 3 additions & 1 deletion src/components/ha-circular-progress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class HaCircularProgress extends CircularProgress {
public alt = "Loading";

@property()
public size: "small" | "medium" | "large" = "medium";
public size: "tiny" | "small" | "medium" | "large" = "medium";

// @ts-ignore
public set density(_) {
Expand All @@ -20,6 +20,8 @@ export class HaCircularProgress extends CircularProgress {

public get density() {
switch (this.size) {
case "tiny":
return -8;
case "small":
return -5;
case "medium":
Expand Down
106 changes: 0 additions & 106 deletions src/components/ha-cover-tilt-controls.js

This file was deleted.

Loading