snapdrop

A Progressive Web App for local file sharing
git clone http://git.hanabi.in/repos/snapdrop.git
Log | Files | Refs | README | LICENSE

commit 288be1fa497f29fab3ab044b482853a487a0d20e
parent bb3277652c45336cbbee250c4c3bd6f3921d34d9
Author: RobinLinus <robinlinus@users.noreply.github.com>
Date:   Wed, 16 Dec 2020 06:04:58 +0100

Preserve line breaks in text messages

Diffstat:
Mclient/index.html | 2+-
Mclient/styles.css | 8++++++--
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/client/index.html b/client/index.html @@ -84,7 +84,7 @@ <x-background class="full center"> <x-paper shadow="2"> <h3>Send a Message</h3> - <input id="textInput" placeholder="Send a message" autocomplete="off" autofocus> + <textarea id="textInput" placeholder="Send a message" autocomplete="off" autofocus></textarea> <div class="row-reverse"> <button class="button" type="submit" close>Send</button> <a class="button" close>Cancel</a> diff --git a/client/styles.css b/client/styles.css @@ -367,6 +367,7 @@ x-dialog a{ -webkit-user-select: all; -moz-user-select: all; user-select: all; + white-space: pre; } #receiveTextDialog #text a { @@ -463,17 +464,20 @@ button::-moz-focus-inner { /* Text Input */ -input { +input, +textarea { width: 100%; box-sizing: border-box; border: none; outline: none; padding: 16px 24px; background: #f1f3f4; - border-radius: 50px; + border-radius: 16px; margin: 8px 0; line-height: 16px; font-size: 14px; + font-family: inherit; + resize: none; }