This repository has been archived by the owner on Jun 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
firefox: add a way to install Dashkiosk receiver for Firefox OS
- Loading branch information
1 parent
87a4f9b
commit 3b26c77
Showing
11 changed files
with
152 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ | |
"angular": false, | ||
"define": false, | ||
"io": false, | ||
"require": false | ||
"require": false, | ||
"Apps": false | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
<title>Dashkiosk — Firefox OS receiver installer</title> | ||
<meta name="viewport" content="width=device-width, user-scalable=no"> | ||
<!-- build:css styles/firefox-final.css --> | ||
<link rel="stylesheet" href="styles/firefox.css"> | ||
<!-- endbuild --> | ||
</head> | ||
<body> | ||
|
||
<div class="logo"></div> | ||
<p class="instructions is-firefox"> | ||
To install <em>Dashkiosk receiver</em> for Firefox, click | ||
on the button below. | ||
</p> | ||
<p class="instructions is-not-firefox"> | ||
This page would install <em>Dashkiosk receiver</em> for | ||
Firefox. Please, open it in Firefox browser. | ||
</p> | ||
<button class="is-firefox" id="install">Install</button> | ||
|
||
<!-- build:js scripts/firefox-final.js --> | ||
<script src="scripts/firefox.js"></script> | ||
<!-- endbuild --> | ||
</body> | ||
</html> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,10 @@ | ||
{ | ||
"name": "Dashkiosk", | ||
"description": "Receiver for Dashkiosk", | ||
"launch_path": "/receiver", | ||
"fullscreen": "true", | ||
"orientation": [ "landscape" ], | ||
"icons": { | ||
"128": "/favicon.png" | ||
} | ||
} |
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,28 @@ | ||
(function(window, undefined) { | ||
'use strict'; | ||
|
||
var Apps = window.navigator.mozApps, | ||
firefox = (Apps && Apps.install); | ||
|
||
if (firefox) { | ||
document.body.className += 'is-firefox'; | ||
} else { | ||
document.body.className += 'is-not-firefox'; | ||
} | ||
|
||
window.document.addEventListener('DOMContentLoaded', function() { | ||
var button = document.getElementById('install'); | ||
button.addEventListener('click', function() { | ||
console.debug('[Dashkiosk] Trigger installation of Firefox OS receiver'); | ||
var request = Apps.install(window.location.origin + '/manifest.webapp'); | ||
request.onsuccess = function() { | ||
console.debug('[Dashkiosk] Firefox OS receiver successfully installed'); | ||
}; | ||
request.onerror = function() { | ||
console.debug('[Dashkiosk] Installation of Firefox OS was unsuccessful', | ||
this.error); | ||
}; | ||
}); | ||
}); | ||
|
||
})(window); |
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,39 @@ | ||
body, html { | ||
width: 100%; | ||
height: 100%; | ||
padding: 0; | ||
margin: 0; | ||
overflow: hidden; | ||
border: 0; | ||
} | ||
|
||
body { | ||
background-image: url(../images/dark-wood.jpg); | ||
text-align: center; | ||
} | ||
|
||
.logo { | ||
display: inline-block; | ||
width: 50%; | ||
height: 50%; | ||
background: url(../images/dashkiosk.svg) no-repeat center; | ||
background-size: contain; | ||
} | ||
|
||
.instructions { | ||
color: orange; | ||
} | ||
|
||
/* Install button */ | ||
button { | ||
padding: 0.5em 3em; | ||
} | ||
|
||
|
||
/* Elements visibility */ | ||
body { | ||
&.is-firefox .is-not-firefox, | ||
&.is-not-firefox .is-firefox { | ||
display: none; | ||
} | ||
} |
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,16 @@ | ||
Firefox application | ||
=================== | ||
|
||
A very simple Firefox application can also be used on any OS | ||
supporting Firefox. It is only a thin layer on top of the classic | ||
receiver. The only additional features are: | ||
|
||
- fullscreen | ||
- orientation locked to landscape | ||
|
||
Installation | ||
------------ | ||
|
||
The installation is quite simple. Point Firefox to the ``/firefox`` | ||
endpoint. You should get a page with a button to install the | ||
application. |
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