forked from TalkControl/talk-control
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from sfeir-open-source/feat/88-remove-fontawesome
- Loading branch information
Showing
11 changed files
with
161 additions
and
102 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
59 changes: 59 additions & 0 deletions
59
src/client/web-components/remote-control/remote-control.js
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import '@webcomponents/webcomponentsjs/webcomponents-loader'; | ||
import '@webcomponents/webcomponentsjs/custom-elements-es5-adapter'; | ||
import { bulmaStyles } from '@granite-elements/granite-lit-bulma/granite-lit-bulma'; | ||
import { LitElement, html } from 'lit-element'; | ||
import Fontawesome from 'lit-fontawesome'; | ||
import config from '@config/config.json'; | ||
const QRCode = require('qrcode'); | ||
|
||
class RemoteControl extends LitElement { | ||
static get properties() { | ||
return {}; | ||
} | ||
|
||
static get styles() { | ||
return [ | ||
bulmaStyles, | ||
Fontawesome | ||
]; | ||
} | ||
|
||
constructor() { | ||
super(); | ||
} | ||
|
||
firstUpdated() { | ||
super.firstUpdated(); | ||
|
||
if (config.tcController.urls.external) { | ||
QRCode.toCanvas(this.shadowRoot.getElementById('qrCode'), config.tcController.urls.external); | ||
this.shadowRoot.getElementById( | ||
'textCode' | ||
).innerHTML = `<a href="${config.tcController.urls.external}" title="Use this url to connect to TalkControl from another device">${config.tcController.urls.external}</a>`; | ||
} else { | ||
this.shadowRoot.getElementById('qrCodeSection').classList.add('is-hidden'); | ||
} | ||
} | ||
|
||
render() { | ||
return html` | ||
<div id="qrCodeSection"> | ||
<h2 class="subtitle"> | ||
Or take control from another device | ||
</h2> | ||
<div class="columns"> | ||
<div class="column is-one-third"> | ||
<div class="card"> | ||
<div class="card-content has-text-centered"> | ||
<canvas id="qrCode" aria-label="Use this QRCode to connect to TalkControl from your mobile"></canvas><br /> | ||
<span id="textCode"></span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
} | ||
} | ||
|
||
customElements.define('tc-remote-control', RemoteControl); |
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import '@webcomponents/webcomponentsjs/webcomponents-loader'; | ||
import '@webcomponents/webcomponentsjs/custom-elements-es5-adapter'; | ||
import { bulmaStyles } from '@granite-elements/granite-lit-bulma/granite-lit-bulma'; | ||
import { LitElement, html } from 'lit-element'; | ||
import Fontawesome from 'lit-fontawesome'; | ||
|
||
class ViewSelector extends LitElement { | ||
static get properties() { | ||
return {}; | ||
} | ||
|
||
static get styles() { | ||
return [ | ||
bulmaStyles, | ||
Fontawesome | ||
]; | ||
} | ||
|
||
constructor() { | ||
super(); | ||
} | ||
|
||
firstUpdated() { | ||
super.firstUpdated(); | ||
} | ||
|
||
render() { | ||
return html` | ||
<div class="columns"> | ||
<div class="column is-one-fifth"> | ||
<a href="on-stage.html"> | ||
<div id="onStageButton" class="card"> | ||
<div class="card-content has-text-centered"> | ||
<p class="title"> | ||
<i class="fas fa-chalkboard"></i> | ||
</p> | ||
<p class="subtitle"> | ||
Stage view | ||
</p> | ||
</div> | ||
</div> | ||
</a> | ||
</div> | ||
<div class="column is-one-fifth is-hidden-tablet"> | ||
<!-- Mobile version --> | ||
<a href="presenter-mobile.html"> | ||
<div class="card"> | ||
<div class="card-content has-text-centered" onclick="window.location.href = 'presenter-mobile.html'"> | ||
<p class="title"> | ||
<i class="fas fa-chalkboard-teacher"></i> | ||
</p> | ||
<p class="subtitle"> | ||
Presenter view | ||
</p> | ||
</div> | ||
</div> | ||
</a> | ||
</div> | ||
<div class="column is-one-fifth is-hidden-mobile"> | ||
<!-- Desktop version --> | ||
<a href="presenter.html"> | ||
<div class="card"> | ||
<div class="card-content has-text-centered" onclick="window.location.href = 'presenter.html'"> | ||
<p class="title"> | ||
<i class="fas fa-chalkboard-teacher"></i> | ||
</p> | ||
<p class="subtitle"> | ||
Presenter view | ||
</p> | ||
</div> | ||
</div> | ||
</a> | ||
</div> | ||
</div> | ||
`; | ||
} | ||
} | ||
|
||
customElements.define('tc-view-selector', ViewSelector); |
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