PairDrop/app/elements/buddy-finder/buddy-finder.html
Robin Linus e756a3fd0c Squashed commit of the following:
commit 5b7ac6f0f56f3888c01049f08b6b47dbeb3bcfb0
Author: Robin Linus <robin_woll@capira.de>
Date:   Wed Dec 30 18:06:48 2015 +0100

    Clean up about and social links

commit 9c7da37d1e8f58f1c45626289fbab336fc982a0f
Author: Robin Linus <robin_woll@capira.de>
Date:   Wed Dec 30 18:06:35 2015 +0100

    Change Slogan

commit fcea5cfb5c6928acabce44caacc1d75fafdab447
Author: Robin Linus <robin_woll@capira.de>
Date:   Wed Dec 30 18:06:22 2015 +0100

    Add shorturl

commit f09e9e42c30aa7b26df2a5fb00bec653f3ad68e1
Author: Robin Linus <robin_woll@capira.de>
Date:   Wed Dec 30 16:56:55 2015 +0100

    initial
2015-12-30 18:07:37 +01:00

90 lines
2.5 KiB
HTML

<link rel="import" href="../../bower_components/iron-ajax/iron-ajax.html">
<link rel="import" href="../../bower_components/paper-styles/paper-styles.html">
<link rel="import" href="../file-sharing/file-input.html">
<link rel="import" href="user-avatar.html">
<link rel="import" href="personal-avatar.html">
<dom-module id="buddy-finder">
<template>
<style>
:host {
background-color: transparent;
@apply(--layout-fit);
@apply(--layout-horizontal);
@apply(--layout-center-center);
overflow: hidden;
position: relative;
height: 100%;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
margin: 0;
}
.buddies {
z-index: 1;
@apply(--layout-horizontal);
@apply(--layout-center-center);
@apply(--layout-wrap);
}
.buddy {
cursor: pointer;
}
.me {
position: absolute;
bottom: 24px;
left: 50%;
margin-left: -180px;
}
.explanation {
@apply(--paper-font-headline);
color: #4E4E4E;
text-align: center;
}
.short {
@apply(--paper-font-body1);
color: #333;
}
.url {
color: #4285f4;
}
</style>
<div class="buddies">
<template is="dom-repeat" items="{{buddies}}">
<file-input on-file-selected="_fileSelected">
<user-avatar contact="{{item}}" class="buddy"></user-avatar>
</file-input>
</template>
</div>
<div hidden$="{{buddies.0}}" class="explanation">
Open <span class="url">dropc.at</span> on other devices
<br> to send files.
</div>
<personal-avatar class="me"></personal-avatar>
</template>
<script>
'use strict';
Polymer({
is: 'buddy-finder',
properties: {
buddies: {
type: Array,
notify: true
},
me: {
type: String,
},
},
_fileSelected: function(e) {
var peerId = e.model.item.peerId;
var file = e.detail;
app.p2p.sendFile(peerId, file);
}
});
</script>
</dom-module>