Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
15
gaia/dev_apps/share-receiver/index.html
Executable file
15
gaia/dev_apps/share-receiver/index.html
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
|
||||
<meta charset="utf-8">
|
||||
<title>Share Receiver</title>
|
||||
<script src="js/share-receiver.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Shared Images</h1>
|
||||
<p><i>This test app is here for so that the gallery app will have
|
||||
someone to share images with</i></p>
|
||||
<button id='ok'>Ok</button>
|
||||
</body>
|
||||
</html>
|
||||
32
gaia/dev_apps/share-receiver/js/share-receiver.js
Executable file
32
gaia/dev_apps/share-receiver/js/share-receiver.js
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
window.onload = function() {
|
||||
navigator.mozSetMessageHandler('activity', function(activityRequest) {
|
||||
activity = activityRequest;
|
||||
if (activityRequest.source.name === 'share') {
|
||||
addImages(activityRequest.source.data);
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('ok').onclick = done;
|
||||
};
|
||||
|
||||
var activity;
|
||||
|
||||
function done() {
|
||||
activity.postResult('shared');
|
||||
}
|
||||
|
||||
function addImages(data) {
|
||||
var blobs = data.blobs, filenames = data.filenames;
|
||||
console.log('share receiver: got', blobs.length, 'images');
|
||||
blobs.forEach(function(blob, index) {
|
||||
var url = URL.createObjectURL(blob);
|
||||
var img = document.createElement('img');
|
||||
img.style.width = '100px';
|
||||
img.src = url;
|
||||
img.onload = function() { URL.revokeObjectURL(url); };
|
||||
document.body.appendChild(img);
|
||||
var label = document.createElement('span');
|
||||
label.textContent = filenames[index];
|
||||
document.body.appendChild(label);
|
||||
});
|
||||
}
|
||||
25
gaia/dev_apps/share-receiver/manifest.webapp
Executable file
25
gaia/dev_apps/share-receiver/manifest.webapp
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "Share Receiver",
|
||||
"description": "Dummy app to respond to Share web activities",
|
||||
"developer": {
|
||||
"name": "The Gaia Team",
|
||||
"url": "https://github.com/mozilla-b2g/gaia"
|
||||
},
|
||||
"activities": {
|
||||
"share": {
|
||||
"filters": {
|
||||
"type": "image/*"
|
||||
},
|
||||
"disposition": "inline",
|
||||
"returnValue": true,
|
||||
"href": "/index.html"
|
||||
}
|
||||
},
|
||||
"icons": {
|
||||
"84": "/style/icons/default_84.png",
|
||||
"126": "/style/icons/default_126.png",
|
||||
"142": "/style/icons/default_142.png",
|
||||
"189": "/style/icons/default_189.png",
|
||||
"284": "/style/icons/default_284.png"
|
||||
}
|
||||
}
|
||||
BIN
gaia/dev_apps/share-receiver/style/icons/default_126.png
Executable file
BIN
gaia/dev_apps/share-receiver/style/icons/default_126.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
BIN
gaia/dev_apps/share-receiver/style/icons/default_142.png
Executable file
BIN
gaia/dev_apps/share-receiver/style/icons/default_142.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
BIN
gaia/dev_apps/share-receiver/style/icons/default_189.png
Executable file
BIN
gaia/dev_apps/share-receiver/style/icons/default_189.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
gaia/dev_apps/share-receiver/style/icons/default_284.png
Executable file
BIN
gaia/dev_apps/share-receiver/style/icons/default_284.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
BIN
gaia/dev_apps/share-receiver/style/icons/default_84.png
Executable file
BIN
gaia/dev_apps/share-receiver/style/icons/default_84.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Loading…
Reference in a new issue