mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-06-19 12:47:28 -04:00
Add text-input files
This commit is contained in:
parent
c8111e37bb
commit
3fb735e901
8 changed files with 201 additions and 27 deletions
|
@ -1,4 +1,5 @@
|
|||
<link rel="import" href="../../bower_components/paper-icon-button/paper-icon-button.html">
|
||||
<link rel="import" href="../file-sharing/file-input-behavior.html">
|
||||
<dom-module id="buddy-avatar">
|
||||
<template>
|
||||
<style>
|
||||
|
@ -47,6 +48,13 @@
|
|||
user-select: none;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
:host([only1]) {
|
||||
@apply(--layout-fit);
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-center-center);
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<paper-icon-button icon="{{_displayIcon}}"></paper-icon-button>
|
||||
<div class="paper-font-subhead">{{_displayName}}</div>
|
||||
|
@ -56,6 +64,7 @@
|
|||
'use strict';
|
||||
Polymer({
|
||||
is: 'buddy-avatar',
|
||||
behaviors: [Chat.FileInputBehavior],
|
||||
properties: {
|
||||
contact: Object,
|
||||
_displayName: {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<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="buddy-avatar.html">
|
||||
<link rel="import" href="personal-avatar.html">
|
||||
<dom-module id="buddy-finder">
|
||||
|
@ -61,18 +60,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
[only] {
|
||||
@apply(--layout-fit);
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-center-center);
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<div class="buddies">
|
||||
<template is="dom-repeat" items="{{buddies}}">
|
||||
<file-input on-file-selected="_fileSelected" only$="{{!buddies.1}}">
|
||||
<buddy-avatar contact="{{item}}" class="buddy"></buddy-avatar>
|
||||
</file-input>
|
||||
<buddy-avatar on-file-selected="_fileSelected" only$="{{!buddies.1}}" contact="{{item}}" class="buddy"></buddy-avatar>
|
||||
</template>
|
||||
</div>
|
||||
<div hidden$="{{buddies.0}}" class="explanation">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue