* updated contributing.md with better explanations
* added clandestine endpoint and web files, basic page layout * better comply with gplv3 in pgpwords modulemaster
parent
f52ece371e
commit
075467ad20
|
@ -6,7 +6,7 @@ This file serves to provide guidelines on how to successfully contribute to Onio
|
||||||
|
|
||||||
## Code of Conduct
|
## Code of Conduct
|
||||||
|
|
||||||
See our [Code of Conduct](https://github.com/beardog108/onionr/blob/master/CODE_OF_CONDUCT.md)
|
Contributors in project-related spaces/contexts are expected to follow the [Code of Conduct](https://github.com/beardog108/onionr/blob/master/CODE_OF_CONDUCT.md)
|
||||||
|
|
||||||
## Reporting Bugs
|
## Reporting Bugs
|
||||||
|
|
||||||
|
@ -23,11 +23,13 @@ Please provide the following information when reporting a bug:
|
||||||
|
|
||||||
If a bug is a security issue, please contact us privately.
|
If a bug is a security issue, please contact us privately.
|
||||||
|
|
||||||
And most importantly, please be patient. Onionr is an open source project done by volunteers.
|
And most importantly, please be patient. Onionr is a free open source project maintained by volunteers in their free time.
|
||||||
|
|
||||||
## Asking Questions
|
## Asking Questions
|
||||||
|
|
||||||
If you need help with Onionr, you can contact the devs (be polite and remember this is a volunteer-driven non-profit project).
|
If you need help with Onionr, you can contact the devs (be polite and remember this is a volunteer-driven project).
|
||||||
|
|
||||||
|
Do your best to use good english.
|
||||||
|
|
||||||
## Contributing Code
|
## Contributing Code
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,8 @@ class API:
|
||||||
|
|
||||||
# Be extremely mindful of this. These are endpoints available without a password
|
# Be extremely mindful of this. These are endpoints available without a password
|
||||||
self.whitelistEndpoints = ('site', 'www', 'onionrhome', 'homedata', 'board', 'profiles', 'profilesindex',
|
self.whitelistEndpoints = ('site', 'www', 'onionrhome', 'homedata', 'board', 'profiles', 'profilesindex',
|
||||||
'boardContent', 'sharedContent', 'mail', 'mailindex', 'friends', 'friendsindex')
|
'boardContent', 'sharedContent', 'mail', 'mailindex', 'friends', 'friendsindex',
|
||||||
|
'clandestine', 'clandestineIndex')
|
||||||
|
|
||||||
self.clientToken = config.get('client.webpassword')
|
self.clientToken = config.get('client.webpassword')
|
||||||
self.timeBypassToken = base64.b16encode(os.urandom(32)).decode()
|
self.timeBypassToken = base64.b16encode(os.urandom(32)).decode()
|
||||||
|
@ -240,6 +241,13 @@ class API:
|
||||||
def loadMailIndex():
|
def loadMailIndex():
|
||||||
return send_from_directory('static-data/www/mail/', 'index.html')
|
return send_from_directory('static-data/www/mail/', 'index.html')
|
||||||
|
|
||||||
|
@app.route('/clandestine/<path:path>', endpoint='clandestine')
|
||||||
|
def loadClandestine(path):
|
||||||
|
return send_from_directory('static-data/www/clandestine/', path)
|
||||||
|
@app.route('/clandestine/', endpoint='clandestineIndex')
|
||||||
|
def loadClandestineIndex():
|
||||||
|
return send_from_directory('static-data/www/clandestine/', 'index.html')
|
||||||
|
|
||||||
@app.route('/friends/<path:path>', endpoint='friends')
|
@app.route('/friends/<path:path>', endpoint='friends')
|
||||||
def loadContacts(path):
|
def loadContacts(path):
|
||||||
return send_from_directory('static-data/www/friends/', path)
|
return send_from_directory('static-data/www/friends/', path)
|
||||||
|
|
|
@ -3,6 +3,14 @@
|
||||||
|
|
||||||
'''This file is adapted from https://github.com/thblt/pgp-words by github user 'thblt' ('Thibault Polge), GPL v3 license'''
|
'''This file is adapted from https://github.com/thblt/pgp-words by github user 'thblt' ('Thibault Polge), GPL v3 license'''
|
||||||
|
|
||||||
|
'''
|
||||||
|
Changes made for Onionr:
|
||||||
|
Minor changes such as slight word adjustment, line breaks
|
||||||
|
|
||||||
|
CLI commands/usage function removed
|
||||||
|
hexify function added
|
||||||
|
'''
|
||||||
|
|
||||||
import os, re, sys, binascii
|
import os, re, sys, binascii
|
||||||
|
|
||||||
_words = [
|
_words = [
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
'''
|
'''
|
||||||
import json
|
import json
|
||||||
from flask import Response, request, redirect, Blueprint, g
|
from flask import Response, request, redirect, Blueprint, send_from_directory
|
||||||
import core
|
import core
|
||||||
|
|
||||||
core_inst = core.Core()
|
core_inst = core.Core()
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,26 @@
|
||||||
|
friendList = []
|
||||||
|
convoListElement = document.getElementsByClassName('conversationList')[0]
|
||||||
|
|
||||||
|
function createConvoList(){
|
||||||
|
for (var x = 0; x < friendList.length; x++){
|
||||||
|
var convoEntry = document.createElement('div')
|
||||||
|
convoEntry.classList.add('convoEntry')
|
||||||
|
convoEntry.setAttribute('data-pubkey', friendList[x])
|
||||||
|
convoEntry.innerText = friendList[x]
|
||||||
|
convoListElement.append(convoEntry)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch('/friends/list', {
|
||||||
|
headers: {
|
||||||
|
"token": webpass
|
||||||
|
}})
|
||||||
|
.then((resp) => resp.json()) // Transform the data into json
|
||||||
|
.then(function(resp) {
|
||||||
|
var keys = []
|
||||||
|
for(var k in resp) keys.push(k)
|
||||||
|
for (var i = 0; i < keys.length; i++){
|
||||||
|
friendList.push(keys[i])
|
||||||
|
}
|
||||||
|
createConvoList()
|
||||||
|
})
|
|
@ -26,7 +26,8 @@
|
||||||
<h2>Onionr Services</h2>
|
<h2>Onionr Services</h2>
|
||||||
<label>Open Site: <input type='text' id='siteViewer' placeholder='Site Hash'> <button id='openSite' class='primaryBtn openSiteBtn'>Open Onionr Site</button></label>
|
<label>Open Site: <input type='text' id='siteViewer' placeholder='Site Hash'> <button id='openSite' class='primaryBtn openSiteBtn'>Open Onionr Site</button></label>
|
||||||
<br>
|
<br>
|
||||||
<br><br><a class='idLink' href='/mail/'>Mail</a> - <a class='idLink' href='/friends/'>Friend Manager</a> - <a class='idLink' href='/board/'>Boards</a>
|
<br><br><a class='idLink' href='/mail/'>Mail</a> - <a class='idLink' href='/friends/'>Friend Manager</a> - <a class='idLink' href='/board/'>Boards</a> -
|
||||||
|
<a class='idLink' href='/clandestine/'>Clandestine</a>
|
||||||
<br><br><hr>
|
<br><br><hr>
|
||||||
<details class='configArea'>
|
<details class='configArea'>
|
||||||
<summary><b>Edit Configuration</b></summary>
|
<summary><b>Edit Configuration</b></summary>
|
||||||
|
|
Loading…
Reference in New Issue