mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-25 01:06:17 -04:00
Squashed commit of the following:
commit dd00d53895b824fbe4170c4a34b104303f722ccd
Merge: 2b3698e
cb9ea12
Author: Robin Linus <robin_woll@capira.de>
Date: Wed Feb 10 00:27:32 2016 -0600
Merge branch 'name-device' into merge123
# Conflicts:
# app/elements/buddy-finder/buddy-avatar.html
# app/elements/buddy-finder/buddy-finder.html
# app/elements/buddy-finder/personal-avatar.html
# app/index.html
commit cb9ea1235001f0cc23514cb622ce711cdc0538af
Author: Robin Linus <robin_woll@capira.de>
Date: Tue Feb 9 23:43:49 2016 -0600
#13 Feature Request: Name your device
commit 6fa43b56f4e705a19e68b62bc671a4948b6968fb
Author: Robin Linus <robin_woll@capira.de>
Date: Fri Jan 1 19:54:56 2016 +0100
Initial
commit fc55c86f5cf95039355d85be7409e68f27246696
Author: Robin Linus <robin_woll@capira.de>
Date: Fri Jan 1 18:06:27 2016 +0100
Fix fullscreen layout on iOS
This commit is contained in:
parent
2b3698ece0
commit
e66598d77f
8 changed files with 210 additions and 16 deletions
51
app/elements/buddy-finder/device-name-dialog.html
Normal file
51
app/elements/buddy-finder/device-name-dialog.html
Normal file
|
@ -0,0 +1,51 @@
|
|||
<link rel="import" href="../../bower_components/paper-dialog/paper-dialog.html">
|
||||
<link rel="import" href="../../bower_components/paper-input/paper-input.html">
|
||||
<dom-module id="device-name-dialog">
|
||||
<template>
|
||||
<style>
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
|
||||
paper-dialog {
|
||||
width: 400px;
|
||||
max-width: 90%
|
||||
}
|
||||
</style>
|
||||
<paper-dialog id="dialog" entry-animation="scale-up-animation" exit-animation="fade-out-animation" with-backdrop>
|
||||
<h2>Name this Device</h2>
|
||||
<p>
|
||||
<paper-input id="input" value="{{deviceName}}" label="Name this Device" char-counter maxlength="18" on-keypress="_keyPressed" autofocus></paper-input>
|
||||
</p>
|
||||
<div class="buttons">
|
||||
<paper-button dialog-dismiss>Cancel</paper-button>
|
||||
<paper-button on-tap="_save">Rename</paper-button>
|
||||
</div>
|
||||
</paper-dialog>
|
||||
</template>
|
||||
<script>
|
||||
'use strict';
|
||||
Polymer({
|
||||
is: 'device-name-dialog',
|
||||
properties: {
|
||||
deviceName: {
|
||||
notify: true
|
||||
}
|
||||
},
|
||||
open: function() {
|
||||
this.$.dialog.open();
|
||||
},
|
||||
_keyPressed: function(e) {
|
||||
if (e.which === 13 || e.charCode === 13) {
|
||||
this.$.input.inputElement.blur();
|
||||
this._save();
|
||||
}
|
||||
},
|
||||
_save: function() {
|
||||
this.$.dialog.close();
|
||||
this.fire('save-device-name', this.deviceName);
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</dom-module>
|
Loading…
Add table
Add a link
Reference in a new issue