Fix html, add captive portal message, tweak defaults
This commit is contained in:
parent
d648f19042
commit
816e4886eb
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
pkgname=piratebox
|
pkgname=piratebox
|
||||||
pkgver=1.1.4_mod_haskal
|
pkgver=1.1.4_mod_haskal
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc="PirateBox - Share Freely"
|
pkgdesc="PirateBox - Share Freely"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
license=('GPL3')
|
license=('GPL3')
|
||||||
|
|
13
index.html
13
index.html
|
@ -2,16 +2,16 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="stylesheet" href="css/page_style.css">
|
<link rel="stylesheet" href="/css/page_style.css">
|
||||||
<title>PirateBox - Share Freely!</title>
|
<title>PirateBox - Share Freely!</title>
|
||||||
<script src="js/jquery.min.js"></script>
|
<script src="/js/jquery.min.js"></script>
|
||||||
<script src="js/scripts.js"></script>
|
<script src="/js/scripts.js"></script>
|
||||||
<link rel="stylesheet" href="/css/jquery-ui.min.css">
|
<link rel="stylesheet" href="/css/jquery-ui.min.css">
|
||||||
<script src="js/jquery-ui.min.js"></script>
|
<script src="/js/jquery-ui.min.js"></script>
|
||||||
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
|
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
|
||||||
|
|
||||||
<link rel="prefetch" type="application/l10n" href="locales/locales.ini" />
|
<link rel="prefetch" type="application/l10n" href="/locales/locales.ini" />
|
||||||
<script type="text/javascript" src="js/l10n.js"></script>
|
<script type="text/javascript" src="/js/l10n.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body id="main-index">
|
<body id="main-index">
|
||||||
|
@ -39,6 +39,7 @@
|
||||||
<div id="greeting" class="card">
|
<div id="greeting" class="card">
|
||||||
<h2 data-l10n-id="welcomeWelcome">Welcome</h2>
|
<h2 data-l10n-id="welcomeWelcome">Welcome</h2>
|
||||||
<p data-l10n-id="welcomeDescription">Now, first of all, there is nothing illegal or scary going on here. This is a social place where you can chat and share files with people around you, <strong data-l10n-id="anonymously">anonymously</strong>! This is an off-line network, specially designed and developed for file-sharing and chat services. Staying off the grid is a precaution to maintain your full anonymity. Please have fun, chat with people, and feel free to share any files you may like.</p>
|
<p data-l10n-id="welcomeDescription">Now, first of all, there is nothing illegal or scary going on here. This is a social place where you can chat and share files with people around you, <strong data-l10n-id="anonymously">anonymously</strong>! This is an off-line network, specially designed and developed for file-sharing and chat services. Staying off the grid is a precaution to maintain your full anonymity. Please have fun, chat with people, and feel free to share any files you may like.</p>
|
||||||
|
<p><strong>Note to mobile users:</strong> If you're seeing this as a "login page", select <em>"Use this network as-is"</em> or the equivalent, then open <strong>http://piratebox.lan</strong> in your regular browser.</p>
|
||||||
<input id="thanks" class="button" type="submit" value="Thanks" data-l10n-id="welcomeThanksButton">
|
<input id="thanks" class="button" type="submit" value="Thanks" data-l10n-id="welcomeThanksButton">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,8 +16,8 @@ import aiofiles.os as aios
|
||||||
aios.statvfs = aios.wrap(os.statvfs)
|
aios.statvfs = aios.wrap(os.statvfs)
|
||||||
aios.listdir = aios.wrap(os.listdir)
|
aios.listdir = aios.wrap(os.listdir)
|
||||||
|
|
||||||
STORAGE_PATH = os.environ.get("PIRATEBOX_STORAGE", "/storage")
|
STORAGE_PATH = os.environ.get("PIRATEBOX_STORAGE", "/storage/piratebox")
|
||||||
WAP_INTERFACE = os.environ.get("PIRATEBOX_IF", "wlan0")
|
WAP_INTERFACE = os.environ.get("PIRATEBOX_IF", "piratebox0")
|
||||||
SERVER_SOCK = os.environ.get("PIRATEBOX_SOCK", "/run/piratebox/piratebox.sock")
|
SERVER_SOCK = os.environ.get("PIRATEBOX_SOCK", "/run/piratebox/piratebox.sock")
|
||||||
CHUNK_SIZE = 256 * 1024
|
CHUNK_SIZE = 256 * 1024
|
||||||
|
|
||||||
|
@ -215,11 +215,13 @@ async def browse(request):
|
||||||
st = await aios.stat(fp)
|
st = await aios.stat(fp)
|
||||||
if stat.S_ISDIR(st.st_mode):
|
if stat.S_ISDIR(st.st_mode):
|
||||||
size = "-"
|
size = "-"
|
||||||
name = escape(file) + "/"
|
link = escape(file) + "/"
|
||||||
|
name = f"<strong>{link}</strong>"
|
||||||
else:
|
else:
|
||||||
size = sizeof_fmt(st.st_size)
|
size = sizeof_fmt(st.st_size)
|
||||||
name = escape(file)
|
link = escape(file)
|
||||||
content += f"<li><a href=\"{name}\">{name}</a><span class='filesize'>{size}</span></li>"
|
name = link
|
||||||
|
content += f"<li><a href=\"{link}\">{name}</a><span class='filesize'>{size}</span></li>"
|
||||||
content += "</ul>"
|
content += "</ul>"
|
||||||
content += res[1]
|
content += res[1]
|
||||||
return web.Response(text=content, content_type="text/html")
|
return web.Response(text=content, content_type="text/html")
|
||||||
|
|
|
@ -1,13 +1,19 @@
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
<footer id="about">
|
<footer id="about">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<p class="to-top"><a href="#header">Back to top</a></p>
|
<div id="details">
|
||||||
<h2>About PirateBox</h2>
|
<p class="to-top"><a href="#header" data-l10n-id="footerBackToTop">Back to top</a></p>
|
||||||
<p>Inspired by pirate radio and the free culture movement, PirateBox is a self-contained mobile collaboration and file sharing device. PirateBox utilizes Free, Libre and Open Source software (FLOSS) to create mobile wireless file sharing networks where users can anonymously share images, video, audio, documents, and other digital content.</p>
|
<h2 data-l10n-id="footerAbout">About PirateBox</h2>
|
||||||
<p>PirateBox is designed to be safe and secure. No logins are required and no user data is logged. The system is purposely not connected to the Internet in order to prevent tracking and preserve user privacy.</p>
|
<p data-l10n-id="footerInspired">Inspired by pirate radio and the free culture movement, PirateBox is a self-contained mobile collaboration and file sharing device. PirateBox utilizes Free, Libre and Open Source software (FLOSS) to create mobile wireless file sharing networks where users can anonymously share images, video, audio, documents, and other digital content.</p>
|
||||||
<small>PirateBox is licensed under GPLv3.</small>
|
<p data-l10n-id="footerFilesTopSafety">PirateBox is designed to be safe and secure. No logins are required and no user data is logged. The system is purposely not connected to the Internet in order to prevent tracking and preserve user privacy.</p>
|
||||||
<small class="piratebox-version">Version 1.1.4-mod-haskal</small>
|
<small data-l10n-id="footerLicenceMain">PirateBox is licensed under GPLv3.</small>
|
||||||
|
<small class="piratebox-version">Version 1.1.4-mod-haskal</small>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
@ -1,34 +1,34 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
|
<link rel="stylesheet" href="/css/page_style.css">
|
||||||
<title>PirateBox - Share Freely!</title>
|
<title>PirateBox - Share Freely!</title>
|
||||||
<script src="/js/jquery.min.js"></script>
|
<script src="/js/jquery.min.js"></script>
|
||||||
<script src="/js/scripts.js"></script>
|
<script src="/js/scripts.js"></script>
|
||||||
|
<link rel="stylesheet" href="/css/jquery-ui.min.css">
|
||||||
|
<script src="/js/jquery-ui.min.js"></script>
|
||||||
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
|
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
|
||||||
<link rel="stylesheet" href="/css/page_style.css">
|
|
||||||
<script src="/js/jquery.min.js"></script>
|
|
||||||
<script src="/js/scripts.js"></script>
|
|
||||||
<link rel="stylesheet" href="/css/jquery-ui.min.css">
|
|
||||||
<script src="/js/jquery-ui.min.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
<body id="main-index">
|
||||||
|
|
||||||
<header id="header">
|
<header id="header">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div id="logo">
|
<a href="/">
|
||||||
<h1>
|
<div id="logo" scrolling="no" > </div>
|
||||||
<a href="/">
|
</a>
|
||||||
<img src="/img/piratebox-logo-horizontal-white.png" alt="PirateBox" title="PirateBox - Share Freely">
|
<div id="menu-icon"></div>
|
||||||
</a>
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div id="menu-icon"><img src="/img/menu.png" alt="Menu"></div>
|
|
||||||
<nav id="top-nav">
|
<nav id="top-nav">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/">Home</a></li>
|
<li><a href="/" data-l10n-id="navbarHome">Home</a></li>
|
||||||
<!-- <li><a href="/board/">Forum</a></li> -->
|
<!-- <li><a href="/board/" data-l10n-id="navbarForum">Forum</a></li> -->
|
||||||
<li><a href="/Shared/" class="current">Files</a></li>
|
<li><a href="/Shared/" class="current" data-l10n-id="navbarFiles">Files</a></li>
|
||||||
<li><a href="#about">About</a></li>
|
<li><a href="#about" data-l10n-id="navbarAbout">About</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="container">
|
|
||||||
|
<section id="content">
|
||||||
|
<div class="container">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|
Loading…
Reference in New Issue