GithubHelp home page GithubHelp logo

soapdog / patchfox Goto Github PK

View Code? Open in Web Editor NEW
168.0 11.0 28.0 211.2 MB

A client for scuttlebutt network as a Firefox WebExtension

License: MIT License

JavaScript 65.74% HTML 3.26% CSS 22.25% Svelte 8.65% SCSS 0.10%
webextensions firefox-webextension scuttlebutt nodejs

patchfox's Introduction

Patchfox

Build/release

This is a client for Secure Scuttlebutt. It is available on:

Patchfox has a rich set of documentation

Head over to the Patchfox website for the documentation.

Requirements for development

Setup & Building

Patchfox uses Mithril, Electron and requires NodeJS for development. After you have NodeJS installed, you can install the dependencies with:

$ npm install

And run a development version of the app using:

$ npm run start

To build use:

$ npm run build

Setup inside Patchfox

Patchfox will use your default SSB data folder if available (the .ssb folder inside your home folder). If this is your first time using SSB, Patchfox will create that folder for you and place new keys inside.

Testing the protocol schemas

After installing and configuring patchfox, try browsing to:

ssb://message/sha256/Acm4sCjCDGWADCw773gfQyQ03tVYmxQLhyUWET8wLPc%3D

Commentary, getting help

If you're interested in learning more about the technologies behind this add-on, check out:

Don't hesitate to reach out to me at:

Sponsorship

Do you want a decentralized internet too? Are you worried about the loss of net neutrality and realized that radical decentralization is the way to fight back? If you want to make a financial contribution to help me fund development of this and other dex focused software, I would love to receive contributions through these channels:

Artwork attribution

Patchfox is using artwork by many artists including:

  • Art made by Angelica.

  • Some icons made by Eucalyp from www.flaticon.com.

  • Artwork for the 2020.2.1 release poster was done by: Photo by Krista Stucchio on Unsplash

Dependencies Licenses

Check licenses.html

patchfox's People

Contributors

camdendotlol avatar dependabot[bot] avatar gtim avatar johanbove avatar soapdog avatar zachmandeville avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

patchfox's Issues

gulp: no gulpfile found

$ gulp 
[18:53:55] No gulpfile found

$ gulp --version
[18:55:27] CLI version 2.0.0
[18:55:27] Local version 4.0.0

Is the readme out of date?

DAT pinning with Hashbase

Ideally when a user attach a file using DAT, we pin the file to Hashbase. I don't have a clue how to do that.

Navigation needs more horizontal space

The main menu is getting cramped for users using the short column view (which is the default). It could benefit from a reorg with dropdowns and a wider horizontal space.

implement `ContentWarning` spec v3

Implement the strict set or rules (sugestions?) in v3 of the Content Warning spec that was detailed in the following images:

c1

c2

c3

Message: %ldtPAbOKmOj8UkF+Xw7VTgXefg3W4BAluLDs4Lv53mk=.sha256

Add documentation on how to setup on mac

Mac users have trouble showing hidden files on their systems. It is a frustrating job to find ~/.ssb/secret on a mac unless they know magic keyboard incantations or have setup their mac to show them by default.

There should be a quick blurb on the settings page on how to do it and also a longer explanation on the /docs/troubleshooting/.

IPFS pinning with Pinata

Add support to use Pinata pinning service when attaching files using IPFS.

Needed:

  • New settings to enter Pinata credentials.
  • Add toggle to activate Pinata.
  • If pinata support is active and credentials are good, pin files when attaching them with IPFS.

patchfox hijacks any search that begins with "ssb"

Let's assume i want to find a list of SSB pubs on the web. I might search for "ssb pubs" in my address bar.

HOWEVER, because the search starts with "ssb" it is hijacked by Patchfox. As I usually do not have a SSB back end running this results in no results.

This makes searching for anything involving scuttlebutt on the web very frustrating. You search, say "damn it" and then rearrange your search terms if you have figured out why this is happening.

I think it should be registering itself as a search engine and show up in the "one-click search engines" pane where users can specify a helpful short keyword if they want.

We need a way to detect that the connection to sbot is broken

Currently there is no way to detect when the connection to sbot is lost. The page just stops. A simple refresh will reestablish it but this currently requires the user to notice and do it. This is a bug,.

  • change online indicator in the avatar when connection is lost.
  • reestablish connection on the background.

adopt ssb-uri

Just do it!

Meaning I know where still discussing it in this message (and that the previous link is not using it) but I should just be able to adopt it and use both.

Other extensions can't run on Patchfox pages

Firefox won't run other extensions on Patchfox pages. (For example: Vimperator, Stylus)

This is probably because they're moz-extension:// pages? Is there any workaround to this?

Back button in the sidebar view

If the user is in sidebar view mode, there is no way to go back in the history or to the public feed after navigating to a thread. The window commands doesn't apply there.

It would be awesome to have a "back" button similar to the screenshot below.

0C+I5+BbmYtMg72Hro8joqbLSTu0r++XT+8PKaGW3Y4= sha256

Translating this into Persian

I am willing t help you translate this wonderful project into Persian, but I don't see any local files or similar options to do it.
How can I help with the project in that regard?

View full thread: URIError: malformed URI sequence

With the two patches from #12 I can now browse /public but when I try to click [View full profile] it doesn't do anything but print this error:

URIError: malformed URI sequence src.a2b27638.js:1925:54

resolveRoute moz-extension://25782a02-b75f-4838-a8d0-f3db07a51f91/src.a2b27638.js:1925 
RegExpGetFunctionalReplacement self-hosted:4956
RegExpLocalReplaceOptFunc self-hosted:5253
Symbol.replace self-hosted:4851
replace self-hosted:5590
resolveRoute moz-extension://25782a02-b75f-4838-a8d0-f3db07a51f91/src.a2b27638.js:1920
asyncId moz-extension://25782a02-b75f-4838-a8d0-f3db07a51f91/src.a2b27638.js:1833 

copy link location gave me this: moz-extension://25782a02-b75f-4838-a8d0-f3db07a51f91/index.html#/thread/%8qyJ1ywzjoi8ENkCNFRSTqC0Td8VX0nC5sZ3EHfyFcM=.sha256

[[ calendar ]] missing `about` message handling for gathering metadata.

The calendar package is not prepared to handle the about messages that are used to edit the metadata about a gathering. Due to our usage of scuttle-gatherings we can always have a comprehensive view of a gathering but as those about messages appear in threads from hub package they are being shown wrong.

Running on linux, all ssb links are empty

I am trying to get patchfox running on linux and it somehow seems to work, apart from the fact that every "ssb:" link ends up on a page like this on firefox

image

I made some changes to the setup.js so that it takes the right path urls (based on what i could figure out). hardfire@e5c9321

Here's what the log looks like when i run node server.js and try to access a url via localhost:3013

...
        sqsum: 3380082.25 } } }
Connected post.tableflip.io:8008:@YXquIbh1OqCCdMuqCO4tSJuYR7RL811CTuu59n7G0pk=.ed25519
**************************........................ (indexes:100%, ooo:100%, ebt:50.2%)EBT failed, fallback to legacy { message: 'method:ebt,replicate is not on whitelist',
  name: 'Error',
  stack: 'Error: method:ebt,replicate is not on whitelist\n    at Function.perms.pre (/usr/lib/node_modules/scuttlebot/node_modules/muxrpc/permissions.js:88:14)\n    at Object.<anonymous> (/usr/lib/node_modules/scuttlebot/node_modules/muxrpc/local-api.js:35:21)\n    at PacketStreamSubstream.stream.read (/usr/lib/node_modules/scuttlebot/node_modules/muxrpc/stream.js:67:23)\n    at PacketStream._onstream (/usr/lib/node_modules/scuttlebot/node_modules/packet-stream/index.js:230:11)\n    at PacketStream.write (/usr/lib/node_modules/scuttlebot/node_modules/packet-stream/index.js:135:41)\n    at /usr/lib/node_modules/scuttlebot/node_modules/muxrpc/pull-weird.js:56:15\n    at /usr/lib/node_modules/scuttlebot/node_modules/pull-stream/sinks/drain.js:24:37\n    at /usr/lib/node_modules/scuttlebot/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11\n    at Object.cb (/usr/lib/node_modules/scuttlebot/node_modules/packet-stream-codec/index.js:111:11)\n    at drain (/usr/lib/node_modules/scuttlebot/node_modules/pull-reader/index.js:39:14)' }
replication ended: @YXquIbh1OqCCdMuqCO4tSJuYR7RL811CTuu59n7G0pk=.ed25519 Error: method:ebt,replicate is not on whitelist
    at Function.perms.pre (/usr/lib/node_modules/scuttlebot/node_modules/muxrpc/permissions.js:88:14)
    at Object.<anonymous> (/usr/lib/node_modules/scuttlebot/node_modules/muxrpc/local-api.js:35:21)
    at PacketStreamSubstream.stream.read (/usr/lib/node_modules/scuttlebot/node_modules/muxrpc/stream.js:67:23)
    at PacketStream._onstream (/usr/lib/node_modules/scuttlebot/node_modules/packet-stream/index.js:230:11)
    at PacketStream.write (/usr/lib/node_modules/scuttlebot/node_modules/packet-stream/index.js:135:41)
    at /usr/lib/node_modules/scuttlebot/node_modules/muxrpc/pull-weird.js:56:15
    at /usr/lib/node_modules/scuttlebot/node_modules/pull-stream/sinks/drain.js:24:37
    at /usr/lib/node_modules/scuttlebot/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11
    at Object.cb (/usr/lib/node_modules/scuttlebot/node_modules/packet-stream-codec/index.js:111:11)
    at drain (/usr/lib/node_modules/scuttlebot/node_modules/pull-reader/index.js:39:14)

any ideas? :D

French translation & blob question

Hi,
New to ssb universe, I really love it!!! I am also intensively using ipfs...
I am willing to help.

  • First making translations (please could you tell me how to provide it?)
  • Second: lbob is the solution to sotre & exchange large amount of data.
    I am working on a file container along with #g1 (https://duniter.org) contracts stored in ipfs... It is really looking and almost working like blob's. I am still looking on how to use it as a sidechain for ssb messages...

Allow account restoration like Maniverse

Hi @soapdog,

I just verified, that I could use a single identity across multiple devices [although the docs say, this isn't possible: https://www.scuttlebutt.nz/faq/applications/multiple-devices].

I managed to figure that out with the help of @staltz!

Manyverse asks you for an account recovery option on initial load.
After digging into the GitLab repository I've learned about a toWords invocation. Searching the repository for it led me to its implementation.

So if you manage to get ssb-keys-mnemonic shipped, you can generate a backup for other apps to use!

The code would look around these lines:

const path = require('path')
const fs = require('fs')

const mnemonic = require('ssb-keys-mnemonic')

const secret = path.join(process.env.HOME, '.ssb', 'secret')
fs.readFile(secret, 'utf8', function (error, content) {
  if (error) {
    console.error(error)
    return
  }
  // Somehow strip the comments now. Then
  const keys = JSON.parse(content)
  const words = mnemonic.keysToWords(keys)
  console.log(words)
})

search drain not working

search is finding matches but they are not appearing on the page until the whole feed is traversed. We're using a pull.drain() so they should be appearing. Need fix.

Ability to drag & drop secret file into settings

Users on macOS systems have a hard time finding the hidden ~/.ssb/secret file because Apple decided to make it harder to see dotfiles in the Finder and in the dialog windows.

Accepting a drag and drop operation so that the user could drag the file from the Finder into the settings would make it much easier to setup.

Dev environment / CONTRIBUTING docs

What is the development workflow for Patchfox?

It would be nice (if it's possible) to have a development environment where you can visualize your changes on the fly, something like React's HMR or at least an auto-reload feature.

A CONTRIBUTING guide would be appreciated.

Hub/Calendar/Contacts links not keyboard-accessible

Hello, blind screen reader user here. Thanks for Patchfox. Tried it out a while back, but having to reload the source folder as an extension was a blocker.

I notice that the links to the hub, composition screen, etc. can't be triggered by Enter. I can tab between them just fine, but nothing I do seems to make them appear.

If I tab to Compose, there does appear to be a Post item that I can activate via Enter, but that's about it.

Just skimmed your code. Maybe the global menu just needs a keydown handler for Enter on the links?

Thanks again.

manifest is not defined

After I entered my secret file,
I have the following message:
ReferenceError: manifest is not defined

  • Xubuntu
  • Firefox 72.0.1
  • Patchfox 2020.2.1

import from RSS

Patchfox can now post blog posts. It would be cool if it had a tool that you could use to add your own blog RSS and then allowed you to easily repost content on SSB

No new messages after following user

This is my first time using SSB.

I followed an user I found online and hit „Load more” after switching the „following” toggle to on. Then this appeared:

first-start

Is there some smarter way to handle it? It appears to me to be an „empty screen” UX problem.

Create client-side friendly version of `cpu throttle`

On this ssb message Andre Staltz announces a nifty little module called pull-cpu-throttle which I'd love to use in Patchfox. Unfortunately the browser doesn't support process.*, so another implementation is needed.

From a msg exchange on that thread, Staltz mentioned:

"@soapdog, you need to have something that tells you how much CPU is being used. Maybe requestIdleCallback? You can fork the codebase, it’s tiny. Or you can use pull-pausable directly, plus your own logic"

Which I plan to try once patchfox solidifies a bit more.

Check for leading hash in channel input field in compose window

Channel fields in post messages do not contain a leading hash character even though we're used to them by seeing them inline as hashtags in posts and in the UI. There needs to be code in the channel input field on the compose window to remove leading hashes.

columnSize setting has no effect

The columnSize ("short/long" column) setting seems to have no effect.

I'm thinking the setting should either be removed, or taken into account. What would be best @soapdog ? I'd be happy to try submitting a pull request for either.

avatar caching

The current avatar cache is temporary and per tab. This means that every time you launch a new patchfox tab you suffer as it caches avatars.

Avatars need to be saved to localStorage and brought back from there on add-on launch.

calendar is not showing anything

Hello!

Please help me collect info on this issue, as the only thing I can tell you now is that the calendar is not displaying anything, and there are no error messages in ssb-server console.

Indexing is completed, page reloading does not help.

OS: Windows 10
ssb-server: 15.3.0

installation process fails

i tried to follow the installation process. went to about:debugging and clicked Load Temporary Add-on. Then I selected the patchfox.json in the patchfox folder but was alerted with error

There was an error during installation: Directory /home/myf/...../patchfox/host_app does not contain a valid install manifest

please verify if it's the right method

can't open setup page / no config

After #12 I got this:

patchfox1

but when I click any of the links I get this permission error:

Access to the file was denied

The file at moz-extension://1d17aeee-5411-455d-a050-8858ba5ccbf8/setup is not readable.

    It may have been removed, moved, or file permissions may be preventing access.

[Try Again]

EDIT: Workaround: #13 (comment)

patchfox1 5

I peeked into the dev console of the plugin and the browser console. What stood out to me was this: error in silent test TypeError: "net.connect is not a function" I know this error from back when I used patchlite. When it wasn't correctly browserifed, there were remains of nodejs env code that just wouldn't work. But maybe this is just the missing config/ and thus no keys and remote: ws://..? Anyhow: How should I initialize the config?

EDIT yup - missing remote. workaround: craft a config to localStorage key config or overwrite src/packages/setup/model.js.

patchfox2
patchfox3

Connecting to a remote SSB-Server

It'd be really handy if it were possible to connect from Firefox on my machine to a ssb-server running on another machine in the network :)

This would mean I wouldn't need to keep my multi-GB profile files on my local laptop!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.