mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-22 07:46:17 -04:00
Change button and dialog style and add soft gradients to make it more "airy" and give it overall a more modern look; Make dark mode real black; Add overflow shadow to ReceiveText, SendText and EditPairedDevices Dialog
This commit is contained in:
parent
f53832ead1
commit
e99f841067
4 changed files with 340 additions and 232 deletions
|
@ -94,7 +94,7 @@
|
||||||
<use xlink:href="#public-room-icon"></use>
|
<use xlink:href="#public-room-icon"></use>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div id="cancel-paste-mode" class="button" data-i18n-key="header.cancel-paste-mode" data-i18n-attrs="text" hidden></div>
|
<div id="cancel-paste-mode" class="btn" data-i18n-key="header.cancel-paste-mode" data-i18n-attrs="text" hidden></div>
|
||||||
</header>
|
</header>
|
||||||
<!-- Center -->
|
<!-- Center -->
|
||||||
<div id="center" class="opacity-0">
|
<div id="center" class="opacity-0">
|
||||||
|
@ -112,7 +112,13 @@
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<footer class="column opacity-0">
|
<footer class="column opacity-0">
|
||||||
<svg class="icon logo">
|
<svg class="icon logo">
|
||||||
<use xlink:href="#wifi-tethering"></use>
|
<defs>
|
||||||
|
<linearGradient id="primaryGradient" gradientTransform="rotate(90)">
|
||||||
|
<stop offset="0%" class="start-color" />
|
||||||
|
<stop offset="100%" class="stop-color" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<use xlink:href="#wifi-tethering" style="fill: url(#primaryGradient);"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="known-as-wrapper">
|
<div class="known-as-wrapper">
|
||||||
|
@ -127,9 +133,9 @@
|
||||||
<span data-i18n-key="footer.discovery" data-i18n-attrs="text"></span>
|
<span data-i18n-key="footer.discovery" data-i18n-attrs="text"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="row center">
|
<div class="row center">
|
||||||
<span class="badge badge-room-ip" data-i18n-key="footer.on-this-network" data-i18n-attrs="text title"></span>
|
<span class="badge badge-gradient badge-room-ip" data-i18n-key="footer.on-this-network" data-i18n-attrs="text title"></span>
|
||||||
<span class="badge badge-room-secret pointer" data-i18n-key="footer.paired-devices" data-i18n-attrs="text title" hidden></span>
|
<span class="badge badge-gradient badge-room-secret pointer" data-i18n-key="footer.paired-devices" data-i18n-attrs="text title" hidden></span>
|
||||||
<span class="badge badge-room-public-id pointer" data-i18n-key="footer.public-room-devices" data-i18n-attrs="title" hidden>in room IAIAI</span>
|
<span class="badge badge-gradient badge-room-public-id pointer" data-i18n-key="footer.public-room-devices" data-i18n-attrs="title" hidden>in room IAIAI</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -142,78 +148,78 @@
|
||||||
<h2 class="center" data-i18n-key="dialogs.language-selector-title" data-i18n-attrs="text"></h2>
|
<h2 class="center" data-i18n-key="dialogs.language-selector-title" data-i18n-attrs="text"></h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="language-buttons">
|
<div class="language-buttons">
|
||||||
<button class="button fw" data-i18n-key="dialogs.system-language" data-i18n-attrs="text"></button>
|
<button class="btn fw" data-i18n-key="dialogs.system-language" data-i18n-attrs="text"></button>
|
||||||
<button class="button fw" value="ar">
|
<button class="btn fw" value="ar">
|
||||||
<span>العربية</span>
|
<span>العربية</span>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<span>(Arabic)</span>
|
<span>(Arabic)</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button fw" value="de">
|
<button class="btn fw" value="de">
|
||||||
<span>Deutsch</span>
|
<span>Deutsch</span>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<span>(German)</span>
|
<span>(German)</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button fw" value="en">
|
<button class="btn fw" value="en">
|
||||||
<span>English</span>
|
<span>English</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button fw" value="es">
|
<button class="btn fw" value="es">
|
||||||
<span>Español</span>
|
<span>Español</span>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<span>(Spanish)</span>
|
<span>(Spanish)</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button fw" value="fr">
|
<button class="btn fw" value="fr">
|
||||||
<span>Français</span>
|
<span>Français</span>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<span>(French)</span>
|
<span>(French)</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button fw" value="id">
|
<button class="btn fw" value="id">
|
||||||
<span>Bahasa Indonesia</span>
|
<span>Bahasa Indonesia</span>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<span>(Indonesian)</span>
|
<span>(Indonesian)</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button fw" value="it">
|
<button class="btn fw" value="it">
|
||||||
<span>Italiano</span>
|
<span>Italiano</span>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<span>(Italian)</span>
|
<span>(Italian)</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button fw" value="nl">
|
<button class="btn fw" value="nl">
|
||||||
<span>Nederlands</span>
|
<span>Nederlands</span>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<span>(Dutch)</span>
|
<span>(Dutch)</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button fw" value="nb">
|
<button class="btn fw" value="nb">
|
||||||
<span>Norsk</span>
|
<span>Norsk</span>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<span>(Norwegian)</span>
|
<span>(Norwegian)</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button fw" value="ro">
|
<button class="btn fw" value="ro">
|
||||||
<span>Română</span>
|
<span>Română</span>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<span>(Romanian)</span>
|
<span>(Romanian)</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button fw" value="ru">
|
<button class="btn fw" value="ru">
|
||||||
<span>Русский язык</span>
|
<span>Русский язык</span>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<span>(Russian)</span>
|
<span>(Russian)</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button fw" value="tr">
|
<button class="btn fw" value="tr">
|
||||||
<span>Türkçe</span>
|
<span>Türkçe</span>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<span>(Turkish)</span>
|
<span>(Turkish)</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button fw" value="zh-CN">
|
<button class="btn fw" value="zh-CN">
|
||||||
<span>中文</span>
|
<span>中文</span>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<span>(Chinese)</span>
|
<span>(Chinese)</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button fw" value="ja">
|
<button class="btn fw" value="ja">
|
||||||
<span>日本語</span>
|
<span>日本語</span>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<span>(Japanese)</span>
|
<span>(Japanese)</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="center row-reverse button-row">
|
<div class="center row-reverse button-row">
|
||||||
<button class="button" type="button" data-i18n-key="dialogs.close" data-i18n-attrs="text" close></button>
|
<button class="btn btn-rounded btn-grey" type="button" data-i18n-key="dialogs.close" data-i18n-attrs="text" close></button>
|
||||||
</div>
|
</div>
|
||||||
</x-paper>
|
</x-paper>
|
||||||
</x-background>
|
</x-background>
|
||||||
|
@ -243,7 +249,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row center">
|
<div class="row center">
|
||||||
<div class="column">
|
<div class="column fw">
|
||||||
<div class="input-key-container six-chars" dir="ltr">
|
<div class="input-key-container six-chars" dir="ltr">
|
||||||
<input type="tel" class="textarea center" aria-label="pair-key-char-1" maxlength="1" autocorrect="off" autocomplete="off" autocapitalize="none" spellcheck="false" autofocus contenteditable placeholder disabled>
|
<input type="tel" class="textarea center" aria-label="pair-key-char-1" maxlength="1" autocorrect="off" autocomplete="off" autocapitalize="none" spellcheck="false" autofocus contenteditable placeholder disabled>
|
||||||
<input type="tel" class="textarea center" aria-label="pair-key-char-2" maxlength="1" autocorrect="off" autocomplete="off" autocapitalize="none" spellcheck="false" contenteditable placeholder disabled>
|
<input type="tel" class="textarea center" aria-label="pair-key-char-2" maxlength="1" autocorrect="off" autocomplete="off" autocapitalize="none" spellcheck="false" contenteditable placeholder disabled>
|
||||||
|
@ -256,8 +262,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-row row-reverse">
|
<div class="button-row row-reverse">
|
||||||
<button class="button" type="submit" data-i18n-key="dialogs.pair" data-i18n-attrs="text" disabled></button>
|
<button class="btn btn-rounded btn-grey" type="submit" data-i18n-key="dialogs.pair" data-i18n-attrs="text" disabled></button>
|
||||||
<button class="button" type="button" data-i18n-key="dialogs.cancel" data-i18n-attrs="text" close></button>
|
<button class="btn btn-rounded btn-grey" type="button" data-i18n-key="dialogs.cancel" data-i18n-attrs="text" close></button>
|
||||||
</div>
|
</div>
|
||||||
</x-paper>
|
</x-paper>
|
||||||
</x-background>
|
</x-background>
|
||||||
|
@ -280,7 +286,7 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="center row-reverse button-row">
|
<div class="center row-reverse button-row">
|
||||||
<button class="button" type="button" data-i18n-key="dialogs.close" data-i18n-attrs="text" close></button>
|
<button class="btn btn-rounded btn-grey" type="button" data-i18n-key="dialogs.close" data-i18n-attrs="text" close></button>
|
||||||
</div>
|
</div>
|
||||||
</x-paper>
|
</x-paper>
|
||||||
</x-background>
|
</x-background>
|
||||||
|
@ -313,7 +319,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row center">
|
<div class="row center">
|
||||||
<div class="column">
|
<div class="column fw">
|
||||||
<div class="input-key-container" dir="ltr">
|
<div class="input-key-container" dir="ltr">
|
||||||
<input type="text" class="textarea center" aria-label="room-id-char-1" maxlength="1" autocorrect="off" autocomplete="off" autocapitalize="none" spellcheck="false" autofocus contenteditable placeholder disabled>
|
<input type="text" class="textarea center" aria-label="room-id-char-1" maxlength="1" autocorrect="off" autocomplete="off" autocapitalize="none" spellcheck="false" autofocus contenteditable placeholder disabled>
|
||||||
<input type="text" class="textarea center" aria-label="room-id-char-2" maxlength="1" autocorrect="off" autocomplete="off" autocapitalize="none" spellcheck="false" contenteditable placeholder disabled>
|
<input type="text" class="textarea center" aria-label="room-id-char-2" maxlength="1" autocorrect="off" autocomplete="off" autocapitalize="none" spellcheck="false" contenteditable placeholder disabled>
|
||||||
|
@ -325,9 +331,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="center row-reverse button-row">
|
<div class="center row-reverse button-row">
|
||||||
<button class="button" type="submit" data-i18n-key="dialogs.join" data-i18n-attrs="text" disabled></button>
|
<button class="btn btn-rounded btn-grey" type="submit" data-i18n-key="dialogs.join" data-i18n-attrs="text" disabled></button>
|
||||||
<button class="button" type="button" data-i18n-key="dialogs.close" data-i18n-attrs="text" close></button>
|
<button class="btn btn-rounded btn-grey" type="button" data-i18n-key="dialogs.close" data-i18n-attrs="text" close></button>
|
||||||
<button class="button leave-room" type="button" data-i18n-key="dialogs.leave" data-i18n-attrs="text"></button>
|
<button class="btn btn-rounded btn-grey leave-room" type="button" data-i18n-key="dialogs.leave" data-i18n-attrs="text"></button>
|
||||||
</div>
|
</div>
|
||||||
</x-paper>
|
</x-paper>
|
||||||
</x-background>
|
</x-background>
|
||||||
|
@ -342,10 +348,10 @@
|
||||||
<h2 class="center"></h2>
|
<h2 class="center"></h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row center">
|
<div class="row center p1">
|
||||||
<div class="column center file-description">
|
<div class="column center file-description">
|
||||||
<div>
|
<div>
|
||||||
<span class="display-name badge"></span>
|
<span class="display-name badge badge-gradient"></span>
|
||||||
<span data-i18n-key="dialogs.would-like-to-share" data-i18n-attrs="text"></span>
|
<span data-i18n-key="dialogs.would-like-to-share" data-i18n-attrs="text"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="row file-name">
|
<div class="row file-name">
|
||||||
|
@ -359,8 +365,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="center file-preview"></div>
|
<div class="center file-preview"></div>
|
||||||
<div class="row-reverse center button-row">
|
<div class="row-reverse center button-row">
|
||||||
<button id="accept-request" class="button" title="ENTER" data-i18n-key="dialogs.accept" data-i18n-attrs="text" autofocus></button>
|
<button id="accept-request" class="btn btn-rounded btn-grey" title="ENTER" data-i18n-key="dialogs.accept" data-i18n-attrs="text" autofocus></button>
|
||||||
<button id="decline-request" class="button" title="ESCAPE" data-i18n-key="dialogs.decline" data-i18n-attrs="text"></button>
|
<button id="decline-request" class="btn btn-rounded btn-grey" title="ESCAPE" data-i18n-key="dialogs.decline" data-i18n-attrs="text"></button>
|
||||||
</div>
|
</div>
|
||||||
</x-paper>
|
</x-paper>
|
||||||
</x-background>
|
</x-background>
|
||||||
|
@ -374,10 +380,10 @@
|
||||||
<h2 class="center"></h2>
|
<h2 class="center"></h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row center">
|
<div class="row center p1">
|
||||||
<div class="column center file-description">
|
<div class="column center file-description">
|
||||||
<div>
|
<div>
|
||||||
<span class="display-name badge"></span>
|
<span class="display-name badge badge-gradient"></span>
|
||||||
<span data-i18n-key="dialogs.has-sent" data-i18n-attrs="text"></span>
|
<span data-i18n-key="dialogs.has-sent" data-i18n-attrs="text"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="row file-name">
|
<div class="row file-name">
|
||||||
|
@ -391,9 +397,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="center file-preview"></div>
|
<div class="center file-preview"></div>
|
||||||
<div class="row-reverse center button-row">
|
<div class="row-reverse center button-row">
|
||||||
<button id="share-btn" class="button" data-i18n-key="dialogs.share" data-i18n-attrs="text" hidden></button>
|
<button id="share-btn" class="btn btn-rounded btn-grey" data-i18n-key="dialogs.share" data-i18n-attrs="text" hidden></button>
|
||||||
<button id="download-btn" class="button" data-i18n-key="dialogs.download" data-i18n-attrs="text" autofocus></button>
|
<button id="download-btn" class="btn btn-rounded btn-grey" data-i18n-key="dialogs.download" data-i18n-attrs="text" autofocus></button>
|
||||||
<button class="button" data-i18n-key="dialogs.close" data-i18n-attrs="text" close></button>
|
<button class="btn btn-rounded btn-grey" data-i18n-key="dialogs.close" data-i18n-attrs="text" close></button>
|
||||||
</div>
|
</div>
|
||||||
</x-paper>
|
</x-paper>
|
||||||
</x-background>
|
</x-background>
|
||||||
|
@ -408,22 +414,22 @@
|
||||||
<h2 class="center" data-i18n-key="dialogs.send-message-title" data-i18n-attrs="text"></h2>
|
<h2 class="center" data-i18n-key="dialogs.send-message-title" data-i18n-attrs="text"></h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row center display-name-wrapper">
|
<div class="row center p1 display-name-wrapper">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<span data-i18n-key="dialogs.send-message-to" data-i18n-attrs="text"></span>
|
<span data-i18n-key="dialogs.send-message-to" data-i18n-attrs="text"></span>
|
||||||
<span class="display-name badge"></span>
|
<span class="display-name badge badge-gradient"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row p1">
|
||||||
<div class="column fw">
|
<div class="column fw">
|
||||||
<div id="text-input" class="fw textarea" role="textbox" data-i18n-key="dialogs.message" data-i18n-attrs="title placeholder" autofocus contenteditable></div>
|
<div id="text-input" class="fw textarea" role="textbox" data-i18n-key="dialogs.message" data-i18n-attrs="title placeholder" autofocus contenteditable></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-row row-reverse">
|
<div class="button-row row-reverse">
|
||||||
<button class="button" type="submit" title="CTRL/⌘ + ENTER" data-i18n-key="dialogs.send" data-i18n-attrs="text" disabled></button>
|
<button class="btn btn-rounded btn-grey" type="submit" title="CTRL/⌘ + ENTER" data-i18n-key="dialogs.send" data-i18n-attrs="text" disabled></button>
|
||||||
<button class="button" type="button" title="ESCAPE" data-i18n-key="dialogs.cancel" data-i18n-attrs="text" close></button>
|
<button class="btn btn-rounded btn-grey" type="button" title="ESCAPE" data-i18n-key="dialogs.cancel" data-i18n-attrs="text" close></button>
|
||||||
</div>
|
</div>
|
||||||
</x-paper>
|
</x-paper>
|
||||||
</x-background>
|
</x-background>
|
||||||
|
@ -436,20 +442,20 @@
|
||||||
<div class="row center">
|
<div class="row center">
|
||||||
<h2 class="text-center" data-i18n-key="dialogs.receive-text-title" data-i18n-attrs="text"></h2>
|
<h2 class="text-center" data-i18n-key="dialogs.receive-text-title" data-i18n-attrs="text"></h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="row center">
|
<div class="row center p1 display-name-wrapper">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<span class="display-name badge"></span>
|
<span class="display-name badge badge-gradient"></span>
|
||||||
<span data-i18n-key="dialogs.has-sent" data-i18n-attrs="text"></span>
|
<span data-i18n-key="dialogs.has-sent" data-i18n-attrs="text"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row center">
|
<div class="row center p1">
|
||||||
<div class="column fw">
|
<div class="column fw">
|
||||||
<div id="text" class="fw"></div>
|
<div id="text" class="textarea"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-reverse center button-row">
|
<div class="row-reverse center button-row">
|
||||||
<button id="copy" class="button" title="CTRL/⌘ + C" data-i18n-key="dialogs.copy" data-i18n-attrs="text"></button>
|
<button id="copy" class="btn btn-rounded btn-grey" title="CTRL/⌘ + C" data-i18n-key="dialogs.copy" data-i18n-attrs="text"></button>
|
||||||
<button id="close" class="button" title="ESCAPE" data-i18n-key="dialogs.close" data-i18n-attrs="text"></button>
|
<button id="close" class="btn btn-rounded btn-grey" title="ESCAPE" data-i18n-key="dialogs.close" data-i18n-attrs="text"></button>
|
||||||
</div>
|
</div>
|
||||||
</x-paper>
|
</x-paper>
|
||||||
</x-background>
|
</x-background>
|
||||||
|
@ -458,10 +464,10 @@
|
||||||
<x-dialog id="base64-paste-dialog">
|
<x-dialog id="base64-paste-dialog">
|
||||||
<x-background class="full center">
|
<x-background class="full center">
|
||||||
<x-paper shadow="2">
|
<x-paper shadow="2">
|
||||||
<button class="button center" id="base64-paste-btn" title="Paste"></button>
|
<button class="btn btn-rounded btn-grey center" id="base64-paste-btn" title="Paste"></button>
|
||||||
<div class="textarea" placeholder="Paste here to send files" title="CMD/⌘ + V" contenteditable hidden></div>
|
<div class="textarea" placeholder="Paste here to send files" title="CMD/⌘ + V" contenteditable hidden></div>
|
||||||
<div class="row-reverse center button-row">
|
<div class="row-reverse center button-row">
|
||||||
<button class="button" data-i18n-key="dialogs.close" data-i18n-attrs="text" close></button>
|
<button class="btn btn-rounded btn-grey" data-i18n-key="dialogs.close" data-i18n-attrs="text" close></button>
|
||||||
</div>
|
</div>
|
||||||
</x-paper>
|
</x-paper>
|
||||||
</x-background>
|
</x-background>
|
||||||
|
|
|
@ -69,9 +69,9 @@
|
||||||
"share": "Share",
|
"share": "Share",
|
||||||
"download": "Download",
|
"download": "Download",
|
||||||
"send-message-title": "Send Message",
|
"send-message-title": "Send Message",
|
||||||
"send-message-to": "Send a Message to",
|
"send-message-to": "To:",
|
||||||
"message_title": "Insert message to send",
|
"message_title": "Insert message to send",
|
||||||
"message_placeholder": "Message",
|
"message_placeholder": "Text",
|
||||||
"send": "Send",
|
"send": "Send",
|
||||||
"receive-text-title": "Message Received",
|
"receive-text-title": "Message Received",
|
||||||
"copy": "Copy",
|
"copy": "Copy",
|
||||||
|
|
|
@ -392,6 +392,8 @@ class PeersUI {
|
||||||
|
|
||||||
class PeerUI {
|
class PeerUI {
|
||||||
|
|
||||||
|
static _badgeClassNames = ["badge-room-ip", "badge-room-secret", "badge-room-public-id"];
|
||||||
|
|
||||||
constructor(peer, connectionHash) {
|
constructor(peer, connectionHash) {
|
||||||
this._peer = peer;
|
this._peer = peer;
|
||||||
this._connectionHash =
|
this._connectionHash =
|
||||||
|
@ -1266,8 +1268,8 @@ class PairDeviceDialog extends Dialog {
|
||||||
// Display the QR code for the url
|
// Display the QR code for the url
|
||||||
const qr = new QRCode({
|
const qr = new QRCode({
|
||||||
content: this._getPairUrl(),
|
content: this._getPairUrl(),
|
||||||
width: 150,
|
width: 130,
|
||||||
height: 150,
|
height: 130,
|
||||||
padding: 1,
|
padding: 1,
|
||||||
background: 'rgb(250,250,250)',
|
background: 'rgb(250,250,250)',
|
||||||
color: 'rgb(18, 18, 18)',
|
color: 'rgb(18, 18, 18)',
|
||||||
|
@ -1466,7 +1468,7 @@ class EditPairedDevicesDialog extends Dialog {
|
||||||
<label class="auto-accept pointer">${autoAcceptString}
|
<label class="auto-accept pointer">${autoAcceptString}
|
||||||
<input type="checkbox" ${roomSecretsEntry.auto_accept ? "checked" : ""}>
|
<input type="checkbox" ${roomSecretsEntry.auto_accept ? "checked" : ""}>
|
||||||
</label>
|
</label>
|
||||||
<button class="button" type="button">${unpairString}</button>
|
<button class="btn" type="button">${unpairString}</button>
|
||||||
</div>`
|
</div>`
|
||||||
|
|
||||||
$pairedDevice.querySelector('input[type="checkbox"]').addEventListener('click', e => {
|
$pairedDevice.querySelector('input[type="checkbox"]').addEventListener('click', e => {
|
||||||
|
@ -1500,7 +1502,19 @@ class EditPairedDevicesDialog extends Dialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
_onEditPairedDevices() {
|
_onEditPairedDevices() {
|
||||||
this._initDOM().then(_ => this.show());
|
this._initDOM()
|
||||||
|
.then(_ => {
|
||||||
|
this._evaluateOverflowing();
|
||||||
|
this.show();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
_evaluateOverflowing() {
|
||||||
|
if (this.$pairedDevicesWrapper.clientHeight < this.$pairedDevicesWrapper.scrollHeight) {
|
||||||
|
this.$pairedDevicesWrapper.classList.add('overflowing');
|
||||||
|
} else {
|
||||||
|
this.$pairedDevicesWrapper.classList.remove('overflowing');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_clearRoomSecrets() {
|
_clearRoomSecrets() {
|
||||||
|
@ -1617,8 +1631,8 @@ class PublicRoomDialog extends Dialog {
|
||||||
// Display the QR code for the url
|
// Display the QR code for the url
|
||||||
const qr = new QRCode({
|
const qr = new QRCode({
|
||||||
content: this._getShareRoomUrl(),
|
content: this._getShareRoomUrl(),
|
||||||
width: 150,
|
width: 130,
|
||||||
height: 150,
|
height: 130,
|
||||||
padding: 1,
|
padding: 1,
|
||||||
background: 'rgb(250,250,250)',
|
background: 'rgb(250,250,250)',
|
||||||
color: 'rgb(18, 18, 18)',
|
color: 'rgb(18, 18, 18)',
|
||||||
|
@ -1801,12 +1815,21 @@ class SendTextDialog extends Dialog {
|
||||||
} else {
|
} else {
|
||||||
this.$submit.removeAttribute('disabled');
|
this.$submit.removeAttribute('disabled');
|
||||||
}
|
}
|
||||||
|
this._evaluateOverflowing();
|
||||||
|
}
|
||||||
|
|
||||||
|
_evaluateOverflowing() {
|
||||||
|
if (this.$text.clientHeight < this.$text.scrollHeight) {
|
||||||
|
this.$text.classList.add('overflowing');
|
||||||
|
} else {
|
||||||
|
this.$text.classList.remove('overflowing');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onRecipient(peerId, deviceName) {
|
_onRecipient(peerId, deviceName) {
|
||||||
this.correspondingPeerId = peerId;
|
this.correspondingPeerId = peerId;
|
||||||
this.$peerDisplayName.innerText = deviceName;
|
this.$peerDisplayName.innerText = deviceName;
|
||||||
this.$peerDisplayName.classList.remove("badge-room-ip", "badge-room-secret", "badge-room-public-id");
|
this.$peerDisplayName.classList.remove(...PeerUI._badgeClassNames);
|
||||||
this.$peerDisplayName.classList.add($(peerId).ui._badgeClassName());
|
this.$peerDisplayName.classList.add($(peerId).ui._badgeClassName());
|
||||||
|
|
||||||
this.show();
|
this.show();
|
||||||
|
@ -1878,7 +1901,7 @@ class ReceiveTextDialog extends Dialog {
|
||||||
|
|
||||||
_showReceiveTextDialog(text, peerId) {
|
_showReceiveTextDialog(text, peerId) {
|
||||||
this.$displayName.innerText = $(peerId).ui._displayName();
|
this.$displayName.innerText = $(peerId).ui._displayName();
|
||||||
this.$displayName.classList.remove("badge-room-ip", "badge-room-secret", "badge-room-public-id");
|
this.$displayName.classList.remove(...PeerUI._badgeClassNames);
|
||||||
this.$displayName.classList.add($(peerId).ui._badgeClassName());
|
this.$displayName.classList.add($(peerId).ui._badgeClassName());
|
||||||
|
|
||||||
this.$text.innerText = text;
|
this.$text.innerText = text;
|
||||||
|
@ -1892,12 +1915,22 @@ class ReceiveTextDialog extends Dialog {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._evaluateOverflowing();
|
||||||
|
|
||||||
this._setDocumentTitleMessages();
|
this._setDocumentTitleMessages();
|
||||||
|
|
||||||
changeFavicon("images/favicon-96x96-notification.png");
|
changeFavicon("images/favicon-96x96-notification.png");
|
||||||
this.show();
|
this.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_evaluateOverflowing() {
|
||||||
|
if (this.$text.clientHeight < this.$text.scrollHeight) {
|
||||||
|
this.$text.classList.add('overflowing');
|
||||||
|
} else {
|
||||||
|
this.$text.classList.remove('overflowing');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_setDocumentTitleMessages() {
|
_setDocumentTitleMessages() {
|
||||||
document.title = !this._receiveTextQueue.length
|
document.title = !this._receiveTextQueue.length
|
||||||
? `${ Localization.getTranslation("document-titles.message-received") } - PairDrop`
|
? `${ Localization.getTranslation("document-titles.message-received") } - PairDrop`
|
||||||
|
@ -2774,8 +2807,8 @@ class BackgroundCanvas {
|
||||||
drawCircle(ctx, radius) {
|
drawCircle(ctx, radius) {
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.lineWidth = 2;
|
ctx.lineWidth = 2;
|
||||||
let opacity = Math.max(0, 0.3 * (1 - 1 * radius / Math.max(this.w, this.h)));
|
let opacity = Math.max(0, 0.3 * (1 - 1.2 * radius / Math.max(this.w, this.h)));
|
||||||
ctx.strokeStyle = `rgba(128, 128, 128, ${opacity})`;
|
ctx.strokeStyle = `rgba(165,165,165, ${opacity})`;
|
||||||
ctx.arc(this.x0, this.y0, radius, 0, 2 * Math.PI);
|
ctx.arc(this.x0, this.y0, radius, 0, 2 * Math.PI);
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,3 @@
|
||||||
/* Constants */
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--icon-size: 24px;
|
|
||||||
--primary-color: #4285f4;
|
|
||||||
--paired-device-color: #00a69c;
|
|
||||||
--public-room-color: #db8500;
|
|
||||||
--accent-color: var(--primary-color);
|
|
||||||
--peer-width: 120px;
|
|
||||||
color-scheme: light dark;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Layout */
|
/* Layout */
|
||||||
|
|
||||||
html,
|
html,
|
||||||
|
@ -47,6 +35,10 @@ html {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.p1 {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.row-reverse {
|
.row-reverse {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row-reverse;
|
flex-direction: row-reverse;
|
||||||
|
@ -94,7 +86,7 @@ header {
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
z-index: 2;
|
z-index: 20;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
@ -308,7 +300,7 @@ x-peers {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
transition: --bg-color 0.5s ease;
|
transition: background-color 0.5s ease;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overscroll-behavior-x: none;
|
overscroll-behavior-x: none;
|
||||||
|
@ -321,16 +313,17 @@ x-peers {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
x-peers.overflowing {
|
.overflowing {
|
||||||
background: /* Shadow covers */ linear-gradient(rgb(var(--bg-color)) 30%, rgba(var(--bg-color), 0)),
|
background:
|
||||||
linear-gradient(rgba(var(--bg-color), 0), rgb(var(--bg-color)) 70%) 0 100%,
|
/* Shadow covers */
|
||||||
/* Shadows */ radial-gradient(farthest-side at 50% 0, rgba(var(--text-color), .2), rgba(var(--text-color), 0)),
|
linear-gradient(rgb(var(--shadow-color-cover-rgb)) 30%, rgba(var(--shadow-color-cover-rgb), 0)),
|
||||||
radial-gradient(farthest-side at 50% 100%, rgba(var(--text-color), .2), rgba(var(--text-color), 0)) 0 100%;
|
linear-gradient(rgba(var(--shadow-color-cover-rgb), 0), rgb(var(--shadow-color-cover-rgb)) 70%) 0 100%,
|
||||||
|
/* Shadows */
|
||||||
|
radial-gradient(farthest-side at 50% 0, rgba(var(--shadow-color-rgb), .2), rgba(var(--shadow-color-rgb), 0)),
|
||||||
|
radial-gradient(farthest-side at 50% 100%, rgba(var(--shadow-color-rgb), .2), rgba(var(--shadow-color-rgb), 0))
|
||||||
|
0 100%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
|
background-size: 100% 60px, 100% 60px, 100% 24px, 100% 24px;
|
||||||
|
|
||||||
/* Opera doesn't support this in the shorthand */
|
|
||||||
background-attachment: local, local, scroll, scroll;
|
background-attachment: local, local, scroll, scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,48 +476,61 @@ x-peer .icon-wrapper {
|
||||||
width: var(--icon-size);
|
width: var(--icon-size);
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--primary-color);
|
background: var(--accent-color);
|
||||||
|
background-image: linear-gradient(45deg, var(--accent-color) 40%, color-mix(in srgb, var(--accent-color) 70%, white) 100%);
|
||||||
color: white;
|
color: white;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
x-peer.type-secret .icon-wrapper {
|
x-peer.type-secret .icon-wrapper {
|
||||||
background: var(--paired-device-color);
|
--accent-color: var(--paired-device-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
x-peer:not(.type-ip):not(.type-secret).type-public-id .icon-wrapper {
|
x-peer:not(.type-ip):not(.type-secret).type-public-id .icon-wrapper {
|
||||||
background: var(--public-room-color);
|
--accent-color: var(--public-room-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
x-peer x-icon > .highlight-wrapper {
|
.highlight-wrapper {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 7px auto 0;
|
margin: 7px auto 0;
|
||||||
height: 6px;
|
height: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
x-peer x-icon > .highlight-wrapper > .highlight {
|
.highlight {
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 6px;
|
height: 6px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-left: 1px;
|
margin-left: 1px;
|
||||||
margin-right: 1px;
|
margin-right: 1px;
|
||||||
|
--highlight-color: var(--badge-color);
|
||||||
|
background-color: var(--highlight-color);
|
||||||
|
background-image: linear-gradient(180deg, color-mix(in srgb, var(--highlight-color) 80%, white) 0%, var(--highlight-color) 50%);
|
||||||
|
background-image: linear-gradient(180deg, var(--highlight-color) 0%, color-mix(in srgb, var(--highlight-color) 90%, black));
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight-room-ip {
|
||||||
|
--highlight-color: var(--primary-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight-room-secret {
|
||||||
|
--highlight-color: var(--paired-device-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight-room-public-id {
|
||||||
|
--highlight-color: var(--public-room-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
x-peer:not(.type-ip) .highlight-room-ip {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
x-peer.type-ip x-icon > .highlight-wrapper > .highlight.highlight-room-ip {
|
x-peer:not(.type-secret) .highlight-room-secret {
|
||||||
background-color: var(--primary-color);
|
display: none;
|
||||||
display: inline;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
x-peer.type-secret x-icon > .highlight-wrapper > .highlight.highlight-room-secret {
|
x-peer:not(.type-public-id) .highlight-room-public-id {
|
||||||
background-color: var(--paired-device-color);
|
display: none;
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
x-peer.type-public-id x-icon > .highlight-wrapper > .highlight.highlight-room-public-id {
|
|
||||||
background-color: var(--public-room-color);
|
|
||||||
display: inline;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
x-peer:not([status]):hover x-icon,
|
x-peer:not([status]):hover x-icon,
|
||||||
|
@ -614,15 +620,22 @@ footer .logo {
|
||||||
|
|
||||||
.discovery-wrapper {
|
.discovery-wrapper {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin: 10px auto auto;
|
margin: 15px auto auto;
|
||||||
border: 3px solid var(--border-color);
|
border: 2px solid var(--border-color);
|
||||||
border-radius: 0.5rem;
|
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
background-color: rgb(var(--bg-color));
|
background-color: rgb(var(--bg-color));
|
||||||
transition: background-color 0.5s ease;
|
transition: background-color 0.5s ease;
|
||||||
min-height: 24px;
|
min-height: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.discovery-wrapper.column {
|
||||||
|
border-radius: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.discovery-wrapper.row {
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
/*You can be discovered wrapper*/
|
/*You can be discovered wrapper*/
|
||||||
.discovery-wrapper > div:first-of-type {
|
.discovery-wrapper > div:first-of-type {
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
|
@ -636,28 +649,28 @@ footer .logo {
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge {
|
.badge {
|
||||||
border-radius: 0.3rem/0.3rem;
|
border-radius: 0.4rem;
|
||||||
padding-right: 0.3rem;
|
padding-right: 0.3rem;
|
||||||
padding-left: 0.3em;
|
padding-left: 0.3em;
|
||||||
background-color: var(--badge-color);
|
background-color: var(--badge-color);
|
||||||
color: white;
|
color: white;
|
||||||
transition: background-color 0.5s ease;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.badge-gradient {
|
||||||
|
background-image: linear-gradient(180deg, color-mix(in srgb, var(--badge-color) 80%, white) 0%, var(--badge-color) 50%);
|
||||||
|
}
|
||||||
|
|
||||||
.badge-room-ip {
|
.badge-room-ip {
|
||||||
background-color: var(--primary-color);
|
--badge-color: var(--primary-color);
|
||||||
border-color: var(--primary-color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-room-secret {
|
.badge-room-secret {
|
||||||
background-color: var(--paired-device-color);
|
--badge-color: var(--paired-device-color);
|
||||||
border-color: var(--paired-device-color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-room-public-id {
|
.badge-room-public-id {
|
||||||
background-color: var(--public-room-color);
|
--badge-color: var(--public-room-color);
|
||||||
border-color: var(--public-room-color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.known-as-wrapper {
|
.known-as-wrapper {
|
||||||
|
@ -707,11 +720,10 @@ html[dir="rtl"] #edit-pen {
|
||||||
/* Dialog */
|
/* Dialog */
|
||||||
|
|
||||||
x-dialog x-background {
|
x-dialog x-background {
|
||||||
background: rgba(0, 0, 0, 0.61);
|
background: rgba(0, 0, 0, 0.8);
|
||||||
z-index: 10;
|
z-index: 30;
|
||||||
transition: opacity 300ms;
|
transition: opacity 300ms;
|
||||||
will-change: opacity;
|
will-change: opacity;
|
||||||
padding: 15px;
|
|
||||||
overflow: overlay;
|
overflow: overlay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -720,8 +732,7 @@ x-dialog x-paper {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: calc(100vw - 10px);
|
width: calc(100vw - 10px);
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
background: white;
|
border-radius: 30px;
|
||||||
border-radius: 8px;
|
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
@ -740,8 +751,8 @@ x-dialog x-paper {
|
||||||
|
|
||||||
x-paper > .row:first-of-type {
|
x-paper > .row:first-of-type {
|
||||||
background-color: var(--accent-color);
|
background-color: var(--accent-color);
|
||||||
border-bottom: solid 4px var(--border-color);
|
padding: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
x-paper > .row:first-of-type h2 {
|
x-paper > .row:first-of-type h2 {
|
||||||
|
@ -792,7 +803,6 @@ x-dialog a {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-key-container > input {
|
.input-key-container > input {
|
||||||
|
@ -825,20 +835,22 @@ x-dialog a {
|
||||||
-moz-user-select: text;
|
-moz-user-select: text;
|
||||||
user-select: text;
|
user-select: text;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 50px;
|
font-size: 45px;
|
||||||
letter-spacing: min(calc((100vw - 80px - 99px) / 100 * 7), 20px);
|
letter-spacing: min(calc((100vw - 80px - 99px) / 100 * 7), 20px);
|
||||||
text-indent: calc(0.5 * (11px + min(calc((100vw - 80px - 99px) / 100 * 6), 28px)));
|
text-indent: calc(0.5 * (11px + min(calc((100vw - 80px - 99px) / 100 * 6), 28px)));
|
||||||
margin: 25px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.key-qr-code {
|
.key-qr-code {
|
||||||
margin: 16px;
|
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
|
margin-top: 15px;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.key-instructions {
|
.key-instructions {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
x-dialog h2 {
|
x-dialog h2 {
|
||||||
|
@ -847,19 +859,19 @@ x-dialog h2 {
|
||||||
}
|
}
|
||||||
|
|
||||||
x-dialog hr {
|
x-dialog hr {
|
||||||
height: 3px;
|
height: 1px;
|
||||||
border: none;
|
border: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: var(--border-color);
|
background-color: var(--border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hr-note {
|
.hr-note {
|
||||||
margin-top: 10px;
|
margin-top: 23px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 31px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hr-note hr {
|
.hr-note hr {
|
||||||
margin-bottom: -2px;
|
margin-bottom: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hr-note > div {
|
.hr-note > div {
|
||||||
|
@ -870,9 +882,9 @@ x-dialog hr {
|
||||||
|
|
||||||
.hr-note > div > span {
|
.hr-note > div > span {
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
border-radius: 10px;
|
border-radius: 20px;
|
||||||
color: rgb(var(--text-color));
|
color: rgb(var(--text-color));
|
||||||
background-color: rgb(var(--bg-color));
|
background-color: var(--dialog-bg-color);
|
||||||
border: var(--border-color) solid 3px;
|
border: var(--border-color) solid 3px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
@ -891,20 +903,10 @@ x-dialog hr {
|
||||||
}
|
}
|
||||||
|
|
||||||
.paired-devices-wrapper {
|
.paired-devices-wrapper {
|
||||||
border-top: solid 4px var(--paired-device-color);
|
margin-top: -5px;
|
||||||
border-bottom: solid 4px var(--paired-device-color);
|
border-bottom: solid 4px var(--paired-device-color);
|
||||||
max-height: 65vh;
|
max-height: 65vh;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
background: /* Shadow covers */ linear-gradient(rgb(var(--bg-color)) 30%, rgba(var(--bg-color), 0)),
|
|
||||||
linear-gradient(rgba(var(--bg-color), 0), rgb(var(--bg-color)) 70%) 0 100%,
|
|
||||||
/* Shadows */ radial-gradient(farthest-side at 50% 0, rgba(var(--text-color), .3), rgba(var(--text-color), 0)),
|
|
||||||
radial-gradient(farthest-side at 50% 100%, rgba(var(--text-color), .3), rgba(var(--text-color), 0)) 0 100%;
|
|
||||||
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: 100% 80px, 100% 80px, 100% 24px, 100% 24px;
|
|
||||||
|
|
||||||
/* Opera doesn't support this in the shorthand */
|
|
||||||
background-attachment: local, local, scroll, scroll;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.paired-device {
|
.paired-device {
|
||||||
|
@ -968,44 +970,41 @@ x-dialog hr {
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Receive Dialog */
|
|
||||||
|
|
||||||
x-paper > .row {
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* button row*/
|
/* button row*/
|
||||||
x-paper > .button-row {
|
x-paper > .button-row {
|
||||||
border-top: solid 3px var(--border-color);
|
|
||||||
height: 50px;
|
height: 50px;
|
||||||
margin-top: 10px;
|
margin: 5px 10px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
x-paper > .button-row > .button {
|
x-paper > .button-row > .btn {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not([dir="rtl"]) x-paper > .button-row > .button:not(:first-child) {
|
html:not([dir="rtl"]) x-paper > .button-row > .btn:not(:first-child) {
|
||||||
border-right: solid 1.5px var(--border-color);
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not([dir="rtl"]) x-paper > .button-row > .button:not(:last-child) {
|
html:not([dir="rtl"]) x-paper > .button-row > .btn:not(:last-child) {
|
||||||
border-left: solid 1.5px var(--border-color);
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
html[dir="rtl"] x-paper > .button-row > .button:not(:first-child) {
|
html[dir="rtl"] x-paper > .button-row > .btn:not(:first-child) {
|
||||||
border-left: solid 1.5px var(--border-color);
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
html[dir="rtl"] x-paper > .button-row > .button:not(:last-child) {
|
html[dir="rtl"] x-paper > .button-row > .btn:not(:last-child) {
|
||||||
border-right: solid 1.5px var(--border-color);
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.language-buttons > button > span {
|
.language-buttons > button > span {
|
||||||
margin: 0 0.3em;
|
margin: 0 0.3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.language-buttons > button {
|
||||||
|
min-height: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
.file-description {
|
.file-description {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
@ -1034,13 +1033,20 @@ x-dialog .dialog-subheader {
|
||||||
padding-bottom: 16px;
|
padding-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#send-text-dialog .display-name-wrapper {
|
.display-name-wrapper {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#send-text-dialog,
|
#send-text-dialog,
|
||||||
#receive-text-dialog {
|
#receive-text-dialog {
|
||||||
font-size: 16px; /* prevents auto-zoom on edit */
|
font-size: 16px; /* prevents auto-zoom on edit */
|
||||||
|
--shadow-color-rgb: var(--shadow-color-secondary-rgb);
|
||||||
|
--shadow-color-cover-rgb: var(--shadow-color-secondary-cover-rgb);
|
||||||
|
}
|
||||||
|
|
||||||
|
#edit-paired-devices-dialog {
|
||||||
|
--shadow-color-rgb: var(--shadow-color-dialog-rgb);
|
||||||
|
--shadow-color-cover-rgb: var(--shadow-color-dialog-cover-rgb);
|
||||||
}
|
}
|
||||||
|
|
||||||
#text-input:before {
|
#text-input:before {
|
||||||
|
@ -1052,6 +1058,7 @@ x-dialog .dialog-subheader {
|
||||||
#receive-text-dialog #text {
|
#receive-text-dialog #text {
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
|
padding: 10px;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
-webkit-user-select: text;
|
-webkit-user-select: text;
|
||||||
|
@ -1073,17 +1080,12 @@ x-dialog .dialog-subheader {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row-separator {
|
|
||||||
border-bottom: solid 2.5px var(--border-color);
|
|
||||||
margin: auto -24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#base64-paste-btn,
|
#base64-paste-btn,
|
||||||
#base64-paste-dialog .textarea {
|
#base64-paste-dialog .textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40vh;
|
height: 40vh;
|
||||||
border: solid 12px #438cff;
|
border: solid 12px #438cff;
|
||||||
border-radius: 8px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#base64-paste-dialog .textarea {
|
#base64-paste-dialog .textarea {
|
||||||
|
@ -1105,10 +1107,9 @@ x-dialog .dialog-subheader {
|
||||||
|
|
||||||
/* Button */
|
/* Button */
|
||||||
|
|
||||||
.button {
|
.btn {
|
||||||
padding: 2px 16px 0;
|
padding: 2px 16px 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
min-height: 36px;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
@ -1122,13 +1123,13 @@ x-dialog .dialog-subheader {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button[disabled] {
|
.btn[disabled] {
|
||||||
color: #5B5B66;
|
color: var(--btn-disabled-color);
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.button,
|
.btn,
|
||||||
.icon-button {
|
.icon-button {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -1140,7 +1141,7 @@ x-dialog .dialog-subheader {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button:before,
|
.btn:before,
|
||||||
.icon-button:before {
|
.icon-button:before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -1148,41 +1149,33 @@ x-dialog .dialog-subheader {
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background: currentColor;
|
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
background-color: var(--accent-color);
|
||||||
transition: opacity 300ms;
|
transition: opacity 300ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button:not([disabled]):hover:before,
|
.btn:not([disabled]):hover:before,
|
||||||
.icon-button:hover:before {
|
.icon-button:hover:before {
|
||||||
opacity: 0.1;
|
opacity: 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button[selected],
|
.btn[selected],
|
||||||
.icon-button[selected] {
|
.icon-button[selected] {
|
||||||
opacity: 0.1;
|
opacity: 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#cancel-paste-mode {
|
.btn:focus:before,
|
||||||
z-index: 2;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100vw;
|
|
||||||
height: 56px;
|
|
||||||
background-color: var(--primary-color);
|
|
||||||
color: rgb(238, 238, 238);
|
|
||||||
}
|
|
||||||
|
|
||||||
.button:focus:before,
|
|
||||||
.icon-button:focus:before {
|
.icon-button:focus:before {
|
||||||
opacity: 0.2;
|
opacity: 0.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-rounded {
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-grey {
|
||||||
|
background-color: var(--bg-color-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
button::-moz-focus-inner {
|
button::-moz-focus-inner {
|
||||||
border: 0;
|
border: 0;
|
||||||
|
@ -1199,22 +1192,37 @@ button::-moz-focus-inner {
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Paste mode */
|
||||||
|
#cancel-paste-mode {
|
||||||
|
z-index: 21;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 56px;
|
||||||
|
background-color: var(--primary-color);
|
||||||
|
color: rgb(238, 238, 238);
|
||||||
|
}
|
||||||
|
|
||||||
/* Text Input */
|
/* Text Input */
|
||||||
.textarea {
|
.textarea {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
padding: 16px 24px;
|
padding: 16px 24px;
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
background: #f1f3f4;
|
|
||||||
display: block;
|
display: block;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
resize: none;
|
resize: none;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
max-height: calc(100vh - 254px);
|
max-height: 300px;
|
||||||
white-space: pre;
|
word-break: break-word;
|
||||||
|
word-wrap: anywhere;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1222,7 +1230,7 @@ button::-moz-focus-inner {
|
||||||
|
|
||||||
#about {
|
#about {
|
||||||
color: white;
|
color: white;
|
||||||
z-index: 11;
|
z-index: 32;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -1273,10 +1281,11 @@ button::-moz-focus-inner {
|
||||||
top: calc(28px - var(--size-half));
|
top: calc(28px - var(--size-half));
|
||||||
width: var(--size);
|
width: var(--size);
|
||||||
height: var(--size);
|
height: var(--size);
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--primary-color);
|
|
||||||
transform: scale(0);
|
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
|
background: var(--primary-color);
|
||||||
|
background-image: radial-gradient(circle at calc(50% - 36px), var(--accent-color) 0%, color-mix(in srgb, var(--accent-color) 40%, black) 80%);
|
||||||
|
--crop-size: 0px;
|
||||||
|
clip-path: circle(var(--crop-size));
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not([dir="rtl"]) #about x-background {
|
html:not([dir="rtl"]) #about x-background {
|
||||||
|
@ -1290,12 +1299,12 @@ html[dir="rtl"] #about x-background {
|
||||||
|
|
||||||
/* Hack such that initial scale(0) isn't animated */
|
/* Hack such that initial scale(0) isn't animated */
|
||||||
#about x-background {
|
#about x-background {
|
||||||
will-change: transform;
|
will-change: clip-path;
|
||||||
transition: transform 800ms cubic-bezier(0.77, 0, 0.175, 1);
|
transition: clip-path 800ms cubic-bezier(0.77, 0, 0.175, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#about:target x-background {
|
#about:target x-background {
|
||||||
transform: scale(1);
|
--crop-size: var(--size);
|
||||||
}
|
}
|
||||||
|
|
||||||
#about .row a {
|
#about .row a {
|
||||||
|
@ -1366,15 +1375,15 @@ x-toast {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 344px;
|
max-width: 344px;
|
||||||
background-color: rgb(var(--text-color));
|
background-color: rgb(var(--text-color));
|
||||||
color: rgb(var(--bg-color));
|
color: var(--dialog-bg-color);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 8px 24px;
|
padding: 8px 24px;
|
||||||
z-index: 20;
|
z-index: 40;
|
||||||
transition: opacity 200ms, transform 300ms ease-out;
|
transition: opacity 200ms, transform 300ms ease-out;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1454,27 +1463,93 @@ x-peers:empty~x-instructions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Constants */
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--icon-size: 24px;
|
||||||
|
--peer-width: 120px;
|
||||||
|
color-scheme: light dark;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Color Themes
|
Color Themes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Default colors */
|
/* Default colors */
|
||||||
body {
|
body {
|
||||||
|
/* Constant colors */
|
||||||
|
--primary-color: #4285f4;
|
||||||
|
--paired-device-color: #00a69c;
|
||||||
|
--public-room-color: #db8500;
|
||||||
|
--accent-color: var(--primary-color);
|
||||||
|
--btn-disabled-color: #5B5B66;
|
||||||
|
|
||||||
|
/* Light theme colors */
|
||||||
--text-color: 51,51,51;
|
--text-color: 51,51,51;
|
||||||
--bg-color: 250,250,250; /*rgb code*/
|
--dialog-bg-color: #fff;
|
||||||
--bg-color-test: 18,18,18;
|
--bg-color: 255,255,255;
|
||||||
--bg-color-secondary: #e4e4e4;
|
--bg-color-secondary: rgba(128, 128, 128, 0.1);
|
||||||
--border-color: rgb(169, 169, 169);
|
--border-color: rgb(169, 169, 169);
|
||||||
--badge-color: #a5a5a5;
|
--badge-color: #a5a5a5;
|
||||||
|
--bg-color-secondary: #f2f2f2;
|
||||||
|
|
||||||
|
/* shadows */
|
||||||
|
--shadow-color-rgb: var(--text-color);
|
||||||
|
--shadow-color-cover-rgb: var(--bg-color);
|
||||||
|
--shadow-color-secondary-rgb: 0,0,0;
|
||||||
|
--shadow-color-secondary-cover-rgb: 242,242,242;
|
||||||
|
--shadow-color-dialog-rgb: 0,0,0;
|
||||||
|
--shadow-color-dialog-cover-rgb: 242,242,242;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark theme colors */
|
/* Dark theme colors */
|
||||||
body.dark-theme {
|
body.dark-theme {
|
||||||
--text-color: 238,238,238;
|
--text-color: 238,238,238;
|
||||||
--bg-color: 18,18,18; /*rgb code*/
|
--dialog-bg-color: #121212;
|
||||||
--bg-color-secondary: #333;
|
--bg-color: 0,0,0;
|
||||||
--border-color: rgb(238,238,238);
|
--bg-color-secondary: #262628;
|
||||||
|
--border-color: rgb(91, 91, 91);
|
||||||
--badge-color: #717171;
|
--badge-color: #717171;
|
||||||
|
|
||||||
|
--shadow-color-secondary-rgb: 255,255,255;
|
||||||
|
--shadow-color-secondary-cover-rgb: 38,38,38;
|
||||||
|
--shadow-color-dialog-rgb: 255,255,255;
|
||||||
|
--shadow-color-dialog-cover-rgb: 38,38,38;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Styles for users who prefer dark mode at the OS level */
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
|
||||||
|
/* defaults to dark theme */
|
||||||
|
body {
|
||||||
|
--text-color: 238,238,238;
|
||||||
|
--dialog-bg-color: #121212;
|
||||||
|
--bg-color-secondary: #262628;
|
||||||
|
--bg-color: 0,0,0;
|
||||||
|
--border-color: rgb(91, 91, 91);
|
||||||
|
--badge-color: #717171;
|
||||||
|
|
||||||
|
--shadow-color-secondary-rgb: 255,255,255;
|
||||||
|
--shadow-color-secondary-cover-rgb: 38,38,38;
|
||||||
|
--shadow-color-dialog-rgb: 255,255,255;
|
||||||
|
--shadow-color-dialog-cover-rgb: 38,38,38;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Override dark mode with light mode styles if the user decides to swap */
|
||||||
|
body.light-theme {
|
||||||
|
--text-color: 51,51,51;
|
||||||
|
--dialog-bg-color: #fff;
|
||||||
|
--bg-color: 255,255,255;
|
||||||
|
--bg-color-secondary: #f2f2f2;
|
||||||
|
--border-color: rgb(169, 169, 169);
|
||||||
|
--badge-color: #a5a5a5;
|
||||||
|
|
||||||
|
--shadow-color-secondary-rgb: 0,0,0;
|
||||||
|
--shadow-color-secondary-cover-rgb: 242,242,242;
|
||||||
|
--shadow-color-dialog-rgb: 0,0,0;
|
||||||
|
--shadow-color-dialog-cover-rgb: 242,242,242;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Colored Elements */
|
/* Colored Elements */
|
||||||
|
@ -1485,7 +1560,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
x-dialog x-paper {
|
x-dialog x-paper {
|
||||||
background-color: rgb(var(--bg-color));
|
background-color: var(--dialog-bg-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.textarea {
|
.textarea {
|
||||||
|
@ -1524,28 +1599,6 @@ x-dialog x-paper {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Styles for users who prefer dark mode at the OS level */
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
|
|
||||||
/* defaults to dark theme */
|
|
||||||
body {
|
|
||||||
--text-color: 238,238,238;
|
|
||||||
--bg-color: 18,18,18; /*rgb code*/
|
|
||||||
--bg-color-secondary: #333;
|
|
||||||
--border-color: rgb(238,238,238);
|
|
||||||
--badge-color: #717171;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Override dark mode with light mode styles if the user decides to swap */
|
|
||||||
body.light-theme {
|
|
||||||
--text-color: 51,51,51;
|
|
||||||
--bg-color: 250,250,250; /*rgb code*/
|
|
||||||
--bg-color-secondary: #e4e4e4;
|
|
||||||
--border-color: rgb(169, 169, 169);
|
|
||||||
--badge-color: #a5a5a5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Edge specific styles
|
Edge specific styles
|
||||||
|
@ -1591,3 +1644,19 @@ See note here: https://developer.mozilla.org/en-US/docs/Web/CSS/user-select */
|
||||||
-webkit-user-select: text;
|
-webkit-user-select: text;
|
||||||
user-select: text;
|
user-select: text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Gradient for wifi-tether icon */
|
||||||
|
#primaryGradient .start-color {
|
||||||
|
stop-color: var(--primary-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
@supports (stop-color: color-mix(in srgb, blue 50%, black)) {
|
||||||
|
#primaryGradient .start-color {
|
||||||
|
stop-color: color-mix(in srgb, var(--primary-color) 80%, white);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#primaryGradient .stop-color {
|
||||||
|
stop-color: var(--primary-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue