added dark mode

This commit is contained in:
Kevin Froman 2019-10-04 16:49:35 -05:00
parent 14334e7197
commit 215c8d2c3a
14 changed files with 51 additions and 13 deletions

View File

@ -28,7 +28,7 @@
# About # About
Onionr ("Onion Relay") is a decentralized, peer-to-peer communication network, designed to be anonymous and resistant to (meta)data analysis, spam, and corruption. Onionr ("Onion Relay") is a decentralized/distributed peer-to-peer communication network, designed to be anonymous and resistant to (meta)data analysis, spam, and corruption.
Onionr stores data in independent packages referred to as 'blocks'. The blocks are synced to all other nodes in the network. Blocks and user IDs cannot be easily proven to have been created by a particular user. Even if there is enough evidence to believe that a specific user created a block, nodes still operate behind Tor or I2P and as such cannot be trivially unmasked. Onionr stores data in independent packages referred to as 'blocks'. The blocks are synced to all other nodes in the network. Blocks and user IDs cannot be easily proven to have been created by a particular user. Even if there is enough evidence to believe that a specific user created a block, nodes still operate behind Tor or I2P and as such cannot be trivially unmasked.

View File

@ -2,6 +2,6 @@
After installing Onionr, there are several things to do: After installing Onionr, there are several things to do:
1. Setup a [deterministic address](usage/deterministic.md) (optional) 1. Setup a [deterministic address](deterministic.md) (optional)
2. Start your node `/path/to/onionr.sh start` 2. Start your node `/path/to/onionr.sh start`
3. Copy your ID and share it with friends 3. Copy your ID and share it with friends

View File

@ -25,11 +25,11 @@ import filepaths
DENIABLE_PEER_ADDRESS = "OVPCZLOXD6DC5JHX4EQ3PSOGAZ3T24F75HQLIUZSDSMYPEOXCPFA====" DENIABLE_PEER_ADDRESS = "OVPCZLOXD6DC5JHX4EQ3PSOGAZ3T24F75HQLIUZSDSMYPEOXCPFA===="
PASSWORD_LENGTH = 25 PASSWORD_LENGTH = 25
ONIONR_TAGLINE = 'Private P2P Communication - GPLv3 - https://Onionr.net' ONIONR_TAGLINE = 'Private P2P Communication - GPLv3 - https://Onionr.net'
ONIONR_VERSION = '0.0.0' # for debugging and stuff ONIONR_VERSION = '0.1.0' # for debugging and stuff
ONIONR_VERSION_TUPLE = tuple(ONIONR_VERSION.split('.')) # (MAJOR, MINOR, VERSION) ONIONR_VERSION_TUPLE = tuple(ONIONR_VERSION.split('.')) # (MAJOR, MINOR, VERSION)
API_VERSION = '0' # increments of 1; only change when something fundamental about how the API works changes. This way other nodes know how to communicate without learning too much information about you. API_VERSION = '0' # increments of 1; only change when something fundamental about how the API works changes. This way other nodes know how to communicate without learning too much information about you.
MIN_PY_VERSION = 7 MIN_PY_VERSION = 7
DEVELOPMENT_MODE = True DEVELOPMENT_MODE = False
MAX_BLOCK_TYPE_LENGTH = 15 MAX_BLOCK_TYPE_LENGTH = 15
MAX_BLOCK_CLOCK_SKEW = 120 MAX_BLOCK_CLOCK_SKEW = 120
MAIN_PUBLIC_KEY_SIZE = 32 MAIN_PUBLIC_KEY_SIZE = 32

View File

@ -12,6 +12,7 @@ import coredb
import onionrproofs import onionrproofs
from onionrproofs import subprocesspow from onionrproofs import subprocesspow
import logger import logger
def insert_block(data: Union[str, bytes], header: str ='txt', def insert_block(data: Union[str, bytes], header: str ='txt',
sign: bool =False, encryptType:str ='', symKey:str ='', sign: bool =False, encryptType:str ='', symKey:str ='',
asymPeer:str ='', meta:dict = {}, asymPeer:str ='', meta:dict = {},
@ -161,4 +162,4 @@ def insert_block(data: Union[str, bytes], header: str ='txt',
else: else:
events.event('insertblock', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, threaded = True) events.event('insertblock', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, threaded = True)
coredb.daemonqueue.daemon_queue_add('remove_from_insert_list', data=dataNonce) coredb.daemonqueue.daemon_queue_add('remove_from_insert_list', data=dataNonce)
return retData return retData

View File

@ -40,4 +40,4 @@ def get_human_readable_ID(pub=''):
def get_base32(words): def get_base32(words):
'''converts mnemonic to base32''' '''converts mnemonic to base32'''
return unpaddedbase32.b32encode(niceware.passphrase_to_bytes(words.replace(DELIMITER, ' '))) return unpaddedbase32.b32encode(niceware.passphrase_to_bytes(words.split(DELIMITER)))

View File

@ -12,7 +12,7 @@
"insert_deniable_blocks": true, "insert_deniable_blocks": true,
"max_block_age": 2678400, "max_block_age": 2678400,
"public_key": "", "public_key": "",
"random_bind_ip": false, "random_bind_ip": true,
"use_bootstrap_list": true, "use_bootstrap_list": true,
"store_plaintext_blocks": true, "store_plaintext_blocks": true,
"show_notifications": true "show_notifications": true

View File

@ -12,6 +12,7 @@
<link rel='stylesheet' href='/shared/main/PNotifyBrightTheme.css'> <link rel='stylesheet' href='/shared/main/PNotifyBrightTheme.css'>
<link rel="stylesheet" href="/shared/fontawesome-free-5.10.2/css/all.min.css"> <link rel="stylesheet" href="/shared/fontawesome-free-5.10.2/css/all.min.css">
<link rel='stylesheet' href='/shared/main/bulma.min.css'> <link rel='stylesheet' href='/shared/main/bulma.min.css'>
<link rel='stylesheet' href='/shared/main/bulmaswatch.min.css'>
<link rel="stylesheet" href='/shared/main/styles-new.css'> <link rel="stylesheet" href='/shared/main/styles-new.css'>
<link rel="stylesheet" href="theme.css"> <link rel="stylesheet" href="theme.css">
<script defer src="/shared/base32.js"></script> <script defer src="/shared/base32.js"></script>
@ -23,6 +24,7 @@
<script defer src='/shared/misc.js'></script> <script defer src='/shared/misc.js'></script>
<script defer src="detect-plaintext-storage.js"></script> <script defer src="detect-plaintext-storage.js"></script>
<script defer src='sethumanreadable.js'></script> <script defer src='sethumanreadable.js'></script>
<script defer src="default-circle-picker.js"></script>
<script defer src='board.js'></script> <script defer src='board.js'></script>
<script defer src='autorefresh.js'></script> <script defer src='autorefresh.js'></script>
</head> </head>
@ -111,7 +113,7 @@
<div class="field"> <div class="field">
<div class="field has-addons"> <div class="field has-addons">
<p class="control"> <p class="control">
<a class="button is-static">Board Name</a> <a class="button is-static">Circle Name</a>
</p> </p>
<p class="control is-expanded"> <p class="control is-expanded">
<input id='feedIDInput' class="input" placeholder="Board name" value="global"> <input id='feedIDInput' class="input" placeholder="Board name" value="global">
@ -120,6 +122,20 @@
<a class="button is-success" id='refreshFeed'>Refresh Feed</a> <a class="button is-success" id='refreshFeed'>Refresh Feed</a>
</p> </p>
</div> </div>
<label for="recommendedBoards">Main Circles:</label>
<select id="recommendedBoards">
<option value="global">Global</option>
<option value="onionr">Onionr</option>
<option value="games">Games</option>
<option value="politics">Politics</option>
<option value="tech">Tech</option>
<option value="random">Random</option>
<option value="privacy">Privacy</option>
</select>
<p class="control">
<br>
Note: All posts in Circles are publicly accessible.
</p>
<input type="checkbox" class="checkbox" id="refreshCheckbox" checked> <input type="checkbox" class="checkbox" id="refreshCheckbox" checked>
<label for="refreshCheckbox">Auto refresh feed</label> <label for="refreshCheckbox">Auto refresh feed</label>
<br> <br>
@ -128,7 +144,7 @@
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<span id='loadingBoard'>Loading board... <i class="fas fa-yin-yang fa-spin"></i></span> <span id='loadingBoard'>Loading Circle... <i class="fas fa-yin-yang fa-spin"></i></span>
<div id='feed'> <div id='feed'>
<span id='none'>None yet, try refreshing 😃</span> <span id='none'>None yet, try refreshing 😃</span>
<!--Message Items are appended here based on template--> <!--Message Items are appended here based on template-->

View File

@ -4,3 +4,8 @@
word-break:break-word; word-break:break-word;
white-space: pre-wrap; white-space: pre-wrap;
} }
body{
background-color: #212224;
color: white;
}

View File

@ -11,6 +11,7 @@
<link rel="stylesheet" href="/shared/fontawesome-free-5.10.2/css/all.min.css"> <link rel="stylesheet" href="/shared/fontawesome-free-5.10.2/css/all.min.css">
<link rel='stylesheet' href="/shared/main/PNotifyBrightTheme.css"> <link rel='stylesheet' href="/shared/main/PNotifyBrightTheme.css">
<link rel="stylesheet" href="/shared/main/bulma.min.css"> <link rel="stylesheet" href="/shared/main/bulma.min.css">
<link rel='stylesheet' href='/shared/main/bulmaswatch.min.css'>
<link rel="stylesheet" href="/shared/main/styles-new.css"> <link rel="stylesheet" href="/shared/main/styles-new.css">
<link rel="stylesheet" href="/mail/mail.css"> <link rel="stylesheet" href="/mail/mail.css">
<script defer src='/shared/node_modules/pnotify/dist/iife/PNotify.js'></script> <script defer src='/shared/node_modules/pnotify/dist/iife/PNotify.js'></script>

View File

@ -23,9 +23,9 @@ to = document.getElementById('draftID')
subject = document.getElementById('draftSubject') subject = document.getElementById('draftSubject')
friendPicker = document.getElementById('friendSelect') friendPicker = document.getElementById('friendSelect')
function sendMail(to, message, subject){ function sendMail(toData, message, subject){
//postData = {"postData": '{"to": "' + to + '", "message": "' + message + '"}'} // galaxy brain //postData = {"postData": '{"to": "' + to + '", "message": "' + message + '"}'} // galaxy brain
postData = {'message': message, 'to': to, 'type': 'pm', 'encrypt': true, 'meta': JSON.stringify({'subject': subject})} postData = {'message': message, 'to': toData, 'type': 'pm', 'encrypt': true, 'meta': JSON.stringify({'subject': subject})}
postData = JSON.stringify(postData) postData = JSON.stringify(postData)
sendForm.style.display = 'none' sendForm.style.display = 'none'
fetch('/insertblock', { fetch('/insertblock', {
@ -41,6 +41,7 @@ function sendMail(to, message, subject){
PNotify.success({ PNotify.success({
text: 'Queued for sending!' text: 'Queued for sending!'
}) })
to.value = subject.value = messageContent.value = ""
}) })
} }

View File

@ -13,6 +13,7 @@
<link rel="stylesheet" href="/shared/fontawesome-free-5.10.2/css/all.min.css"> <link rel="stylesheet" href="/shared/fontawesome-free-5.10.2/css/all.min.css">
<link rel='stylesheet' href='/shared/main/PNotifyBrightTheme.css'> <link rel='stylesheet' href='/shared/main/PNotifyBrightTheme.css'>
<link rel="stylesheet" href="/shared/main/bulma.min.css"> <link rel="stylesheet" href="/shared/main/bulma.min.css">
<link rel='stylesheet' href='/shared/main/bulmaswatch.min.css'>
<link rel="stylesheet" href="/shared/main/styles-new.css"> <link rel="stylesheet" href="/shared/main/styles-new.css">
<script defer src="/shared/node_modules/pnotify/dist/iife/PNotify.js"></script> <script defer src="/shared/node_modules/pnotify/dist/iife/PNotify.js"></script>
<script defer src="/shared/node_modules/pnotify/dist/iife/PNotifyButtons.js"></script> <script defer src="/shared/node_modules/pnotify/dist/iife/PNotifyButtons.js"></script>

View File

@ -3,7 +3,6 @@
<p>Onionr is a private decentralized communication network</p> <p>Onionr is a private decentralized communication network</p>
<p><i class="fab fa-gitlab"></i> <a href="https://gitlab.com/beardog/onionr">Source code</a></p> <p><i class="fab fa-gitlab"></i> <a href="https://gitlab.com/beardog/onionr">Source code</a></p>
<br> <br>
<b>Core developers:</b> <b>Core developers:</b>
@ -12,6 +11,12 @@
<li><a href="https://www.aaronesau.com/">Aaron Esau</a></li> <li><a href="https://www.aaronesau.com/">Aaron Esau</a></li>
</ul> </ul>
<b>Contributors:</b>
<ul>
<li><a href="https://invisamage.com/">Travis Kipp</a> (web UI and CSS)</li>
<li><a href="https://k7dxs.net/">Duncan Simpson</a> Packaging help</li>
</ul>
<br> <br>
<b>Onionr is built with:</b> <b>Onionr is built with:</b>

View File

@ -58,4 +58,12 @@ html {
.aboutLogo{ .aboutLogo{
max-width: 25%; max-width: 25%;
margin-bottom: 1em; margin-bottom: 1em;
}
html{
background-color: #212224;
color: white;
}
.textarea{
background-color: #212224;
color: white;
} }

View File

@ -16,7 +16,7 @@ async function userIcon(pubkey, imgSize=64){
pubkey = await sha256(base32.decode.asBytes(pubkey)) pubkey = await sha256(base32.decode.asBytes(pubkey))
let options = { let options = {
//foreground: [0,0,0,1], // rgba black //foreground: [0,0,0,1], // rgba black
background: [255, 255, 255, 255], // rgba white background: [0, 0, 0, 0], // rgba white
//margin: 0.1, //margin: 0.1,
size: imgSize, size: imgSize,
format: 'svg' // use SVG instead of PNG format: 'svg' // use SVG instead of PNG