-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding informations in admin about powering off device
Change functions to ES6 notation Handle new event : 'unpaired' : cert and status are updated Cleaning code
- Loading branch information
Showing
7 changed files
with
73 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,32 +4,45 @@ | |
<title>Homebridge AndroidTV Plugin</title> | ||
<script src="https://unpkg.com/[email protected]"></script> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> | ||
</head> | ||
<body> | ||
<div id="devices" class="container-fluid"> | ||
<table class="table table-striped"> | ||
<div style="text-align: center"><h1 class="display-5 text-white bg-secondary">AndroidTV Homebridge Plugin</h1></div> | ||
|
||
<div id="devices_list" class="container-fluid" > | ||
<div class="alert alert-warning m-auto" role="alert" style="width: 30rem; text-align: center" v-if="devices_length === 0"> | ||
<h1>Oops !</h1> | ||
<hr> | ||
<h6>It seems that no AndroidTV is connected and powered on this network</h6> | ||
<i class="bi bi-power text-warning" style="font-size: 3rem;"></i> | ||
</div> | ||
<table class="table table-striped" v-if="devices_length > 0"> | ||
<thead> | ||
<tr> | ||
<th v-for="column in columns" scope="col"> {{ column }}</th> | ||
<th>actions</th> | ||
<th v-for="column in columns" scope="col" style="text-align: center"> {{ column }}</th> | ||
<th style="text-align: center">actions</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr v-for="device in devices"> | ||
<td v-for="key in columns"> | ||
<div v-if="key !== 'type'"> | ||
{{device[key]}} | ||
<div v-if="key === 'host' || key === 'name' || key === 'app_package_current'"> | ||
{{device[key]}} | ||
</div> | ||
<div v-if="key === 'online' || key === 'paired' || key === 'started' || key === 'powered'" style="text-align: center;"> | ||
<i class="bi bi-check-circle text-success" style="font-size: 1.5rem;" v-if="device[key] === true"></i> | ||
<i class="bi bi-x-circle text-danger" style="font-size: 1.5rem;" v-if="device[key] === false"></i> | ||
</div> | ||
<div v-else-if="key === 'type'"> | ||
<div v-if="key === 'type'" style="text-align: center"> | ||
<select v-model="device.type" v-on:change="set_type(device)"> | ||
<option v-for="type in types" v-bind:value="type.value"> | ||
{{ type.text }} | ||
</option> | ||
</select> | ||
</div> | ||
</td> | ||
<td> | ||
<td style="text-align: center"> | ||
<button class="btn btn-primary btn-sm" v-on:click="pair(device)" v-if="device.online && !device.paired && !device.pairing">Pair</button> | ||
<button class="btn btn-warning btn-sm" v-on:click="power(device)" v-if="device.started">Power</button> | ||
<div class="row" v-if="device.pairing"> | ||
|
@@ -44,8 +57,16 @@ | |
</tr> | ||
</tbody> | ||
</table> | ||
<div id="info" class="alert alert-primary m-auto" role="alert" style="width: 30rem; text-align: center" v-if="devices_length > 0"> | ||
<!--<span class="badge bg-primary rounded-pill" style="font-size: 1.2em;">Info</span> --> | ||
<h4 class="alert-heading">Information</h4> | ||
<hr> | ||
<p>Please note that after restarting Homebridge while your devices are turned off, your devices will remain unavailable until you turn them on manually.</p> | ||
</div> | ||
</div> | ||
|
||
|
||
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.24.0/axios.js"></script> | ||
<script src="index.js" charset="utf-8" ></script> | ||
</body> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters