Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarmo committed Mar 12, 2024
1 parent f69e0f6 commit dddcd10
Show file tree
Hide file tree
Showing 6 changed files with 355 additions and 118 deletions.
122 changes: 72 additions & 50 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,12 @@
<meta name="theme-color" content="#3367d6">
<meta name="color-scheme" content="dark light">
<meta name="apple-mobile-web-app-capable" content="no">
<meta name="apple-mobile-web-app-title" content="Snapdrop">
<meta name="apple-mobile-web-app-title" content="NearDrop">
<!-- Descriptions -->
<meta name="description" content="Instantly share images, videos, PDFs, and links with people nearby. Peer2Peer and Open Source. No Setup, No Signup.">
<meta name="keywords" content="File, Transfer, Share, Peer2Peer">
<meta name="author" content="RobinLinus">
<meta property="og:title" content="Snapdrop">
<meta property="og:type" content="article">
<meta property="og:url" content="https://snapdrop.net/">
<meta property="og:author" content="https://facebook.com/RobinLinus">
<meta name="twitter:author" content="@RobinLinus">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:description" content="Instantly share images, videos, PDFs, and links with people nearby. Peer2Peer and Open Source. No Setup, No Signup.">
<meta name="og:description" content="Instantly share images, videos, PDFs, and links with people nearby. Peer2Peer and Open Source. No Setup, No Signup.">
Expand Down Expand Up @@ -48,7 +44,6 @@
<use xlink:href="#icon-theme" />
</svg>
</a>
<!--
<a href="#" id="notification" class="icon-button" title="Enable Notifications" hidden>
<svg class="icon">
<use xlink:href="#notifications" />
Expand All @@ -59,7 +54,6 @@
<use xlink:href="#homescreen" />
</svg>
</a>
-->
</header>
<!-- Peers -->
<x-peers class="center"></x-peers>
Expand All @@ -72,26 +66,31 @@ <h2>Open Snapdrop on other devices to send files</h2>
<svg class="icon logo">
<use xlink:href="#wifi-tethering" />
</svg>
<div id="displayName" placeholder="The easiest way to transfer data across devices"></div>
<div class="font-body2">You can be discovered by everyone on this network</div>
<div >
<span data-lang="text_display_name"></span>
<span id="displayName"></span>
<div class="icon edit-name" style="cursor: pointer;vertical-align: middle" id="editNameBt" >
<use xlink:href="#pencil"></use>
</div>
</div>
<div class="font-body2" > <span id="body-text-area">You can be discovered by everyone on this network</span></div>
</footer>
<!-- Receive Dialog -->
<x-dialog id="receiveDialog">
<x-background class="full center">
<x-paper shadow="2">
<h3>File Received</h3>
<div class="font-subheading" id="fileName">Filename</div>
<h3 data-lang="receive_dialog_title">File Received</h3>
<h4 class="sender-h4"><span data-lang="from">From:</span> <span id="fileSender"></span></h4>
<div class="font-subheading" id="fileName" data-lang="file_name">Filename</div>
<div class="font-body2" id="fileSize"></div>
<div class='preview' style="visibility: hidden;">
<img id='img-preview' src="">
</div>
<div class='preview' style="visibility: hidden;"></div>
<div class="row">
<label for="autoDownload" class="grow">Ask to save each file before downloading</label>
<input type="checkbox" id="autoDownload" checked="">
</div>
<div class="row-reverse">
<a class="button" close id="download" title="Download File" autofocus>Save</a>
<button class="button" close>Ignore</button>
<a class="button" close id="download" title="Download File" autofocus data-lang="button_save">Save</a>
<button class="button" close data-lang="button_ignore">Ignore</button>
</div>
</x-paper>
</x-background>
Expand All @@ -101,11 +100,11 @@ <h3>File Received</h3>
<form action="#">
<x-background class="full center">
<x-paper shadow="2">
<h3>Send a Message</h3>
<div id="textInput" class="textarea" role="textbox" placeholder="Send a message" autocomplete="off" autofocus contenteditable></div>
<h3 data-lang="send_meaasge_dialog_title">Send a Message</h3>
<div id="textInput" class="textarea" role="textbox" data-placeholder="send_meaasge_dialog_title" autocomplete="off" autofocus contenteditable></div>
<div class="row-reverse">
<button class="button" type="submit" close>Send</button>
<a class="button" close>Cancel</a>
<button class="button" type="submit" close data-lang="button_send">Send</button>
<a class="button" close data-lang="button_cancel">Cancel</a>
</div>
</x-paper>
</x-background>
Expand All @@ -115,18 +114,50 @@ <h3>Send a Message</h3>
<x-dialog id="receiveTextDialog">
<x-background class="full center">
<x-paper shadow="2">
<h3>Message Received</h3>
<h3 data-lang="receive_text_dialog_title">Message Received</h3>
<h4 class="sender-h4"><span data-lang="from">From:</span> <span id="sender"></span></h4>
<div class="font-subheading" id="text"></div>
<div class="row-reverse">
<button class="button" id="copy" close autofocus>Copy</button>
<button class="button" close>Close</button>
<button class="button" id="copy" close autofocus data-lang="button_copy">Copy</button>
<button class="button" close data-lang="button_close">Close</button>
</div>
</x-paper>
</x-background>
</x-dialog>
<!-- Edit Name Dialog -->
<x-dialog id="editNameDialog">
<form action="#">
<x-background class="full center">
<x-paper shadow="2">
<h3 data-lang="edit_name_dialog_title">You are known as</h3>
<div id="nameTextInput" class="textarea" role="textbox" data-placeholder="edit_nameplaceholder" autocomplete="off" autofocus contenteditable></div>
<div class="row-reverse">
<button class="button" type="submit" close data-lang="button_sure">Sure</button>
<a class="button" close data-lang="button_cancel">Cancel</a>
</div>
</x-paper>
</x-background>
</form>
</x-dialog>
<!-- Create or Join a room-->
<x-dialog id="roomDialog">
<form action="#">
<x-background class="full center">
<x-paper shadow="2">
<h3 data-lang="room_dialog_title">Room Number(6 Digits)</h3>
<div class="room-tip" data-lang="room_dialog_note" >Note: No need to input to create a room.</div>
<input id="roomNumberInput" class="textarea" maxlength="6" oninput="value=value.replace(/\D/g,'');let btn=$('roomDialog').querySelector('button');if(value.length==6){btn.textContent=jQuery.i18n.prop('button_join');}else{btn.textContent=jQuery.i18n.prop('button_create');}" autocomplete="off" autofocus contenteditable />
<div class="row-reverse">
<button class="button" type="submit" close data-lang="button_create" >Create</button>
<a class="button" close data-lang="button_cancel">Cancel</a>
</div>
</x-paper>
</x-background>
</form>
</x-dialog>
<!-- Toast -->
<div class="toast-container full center">
<x-toast class="row" shadow="1" id="toast">File Transfer Completed</x-toast>
<x-toast class="row" shadow="1" id="toast" data-lang="transfer_completed_toast">File Transfer Completed</x-toast>
</div>
<!-- About Page -->
<x-about id="about" class="full center column">
Expand All @@ -138,39 +169,29 @@ <h3>Message Received</h3>
</svg>
</a>
</header>
<svg class="icon logo">
<use xlink:href="#wifi-tethering" />
</svg>
<div class="icon logo">
<!--use xlink:href="#wifi-tethering" /-->
<img src="./images/android-chrome-192x192.png" class="logo-icon about-logo" />
</div>
<h1>Snapdrop</h1>
<div class="font-subheading">Local file transfers.</div>
<div class="font-subheading" data-lang="about_subheading"></div>
<div class="row">
<a href="#" id="restart" class="icon-button" title="Ask the server to restart" >
<a href="#" id="restart" class="icon-button" title="Restart server" >
<svg class="icon">
<use xlink:href="#close" />
</svg>
</a>
<!--
<a class="icon-button" target="_blank" href="https://github.com/RobinLinus/snapdrop" title="Snapdrop on Github" rel="noreferrer">
<svg class="icon">
<use xlink:href="#github" />
</svg>
</a>
<a class="icon-button" target="_blank" href="https://www.paypal.com/donate?hosted_button_id=FTP9DXUR7LA7Q" title="Help cover the server costs!" rel="noreferrer">
<svg class="icon">
<use xlink:href="#monetarization" />
</svg>
</a>
<a class="icon-button" target="_blank" href="https://twitter.com/intent/tweet?text=https://snapdrop.net%20by%20@robin_linus%20&" title="Tweet about Snapdrop" rel="noreferrer">
<svg class="icon">
<use xlink:href="#twitter" />
</svg>
</a>
<a class="icon-button" target="_blank" href="https://github.com/RobinLinus/snapdrop/blob/master/docs/faq.md" title="Frequently asked questions" rel="noreferrer">

<a class="icon-button" target="_blank" href="https://github.com/omniashare/snapdrop/blob/master/docs/faq.md" title="Frequently asked questions" rel="noreferrer" data-title="about_help_title">
<svg class="icon">
<use xlink:href="#help-outline" />
</svg>
</a>
-->
</div>
</section>
<x-background></x-background>
Expand All @@ -189,9 +210,6 @@ <h1>Snapdrop</h1>
<symbol id=tablet-mac viewBox="0 0 24 24">
<path d="M18.5 0h-14C3.12 0 2 1.12 2 2.5v19C2 22.88 3.12 24 4.5 24h14c1.38 0 2.5-1.12 2.5-2.5v-19C21 1.12 19.88 0 18.5 0zm-7 23c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm7.5-4H4V3h15v16z"></path>
</symbol>
<symbol id=info-outline viewBox="0 0 24 24">
<path d="M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 9h2V7h-2v2z"></path>
</symbol>
<symbol id=close viewBox="0 0 24 24">
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path>
</symbol>
Expand All @@ -204,9 +222,7 @@ <h1>Snapdrop</h1>
<symbol id="github">
<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />
</symbol>
<g id="notifications">
<path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z" />
</g>

<symbol id="homescreen">
<path fill="none" d="M0 0h24v24H0V0z" />
<path d="M18 1.01L8 1c-1.1 0-2 .9-2 2v3h2V5h10v14H8v-1H6v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM10 15h2V8H5v2h3.59L3 15.59 4.41 17 10 11.41z" />
Expand All @@ -217,10 +233,16 @@ <h1>Snapdrop</h1>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21V4h2.67v1.95c1.86.45 2.79 1.86 2.85 3.39H14.3c-.05-1.11-.64-1.87-2.22-1.87-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.01 1.83-1.38 2.83-3.12 3.16z" />
</symbol>
<symbol id="icon-theme" viewBox="0 0 24 24">
<rect fill="none" height="24" width="24"/><path d="M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36c-0.98,1.37-2.58,2.26-4.4,2.26 c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"/>
<rect fill="none" height="24" width="24"/><path d="M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36c-0.98,1.37-2.58,2.26-4.4,2.26 c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"/>
</symbol>
<symbol id="pencil" viewBox="0 0 24 24">
<path d="M21.5,21.5v129h64.5v-32.25v-64.5v-32.25zM86,53.75c0,17.7805 14.4695,32.25 32.25,32.25c17.7805,0 32.25,-14.4695 32.25,-32.25c0,-17.7805 -14.4695,-32.25 -32.25,-32.25c-17.7805,0 -32.25,14.4695 -32.25,32.25zM118.25,86c-17.7805,0 -32.25,14.4695 -32.25,32.25c0,17.7805 14.4695,32.25 32.25,32.25c17.7805,0 32.25,-14.4695 32.25,-32.25c0,-17.7805 -14.4695,-32.25 -32.25,-32.25z"></path>
</symbol>
<symbol id="icon-edit-fill" viewBox="0 0 1024 1024"><path d="M880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32zM257.7 752c2 0 4-0.2 6-0.5L431.9 722c2-0.4 3.9-1.3 5.3-2.8l423.9-423.9c3.9-3.9 3.9-10.2 0-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2c-1.9 11.1 1.5 21.9 9.4 29.8 6.6 6.4 14.9 9.9 23.8 9.9z" fill="#1296db" ></path></symbol>
</svg>

<!-- Scripts -->
<script src="scripts/jquery.min.js"></script>
<script src="scripts/network.js"></script>
<script src="scripts/ui.js"></script>
<script src="scripts/theme.js" async></script>
Expand Down Expand Up @@ -248,4 +270,4 @@ <h3>Snapdrop works only with JavaScript</h3>
}
</style>
</noscript>
</body>
</body>
2 changes: 2 additions & 0 deletions client/scripts/jquery.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit dddcd10

Please sign in to comment.