-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add p2p retrieval option (#391)
* feat: add config toggle for p2p retrieval * deps: add helia and bump verified fetch * feat: load p2p helia * chore: remove console.log * feat: try to make recursive gateways optional * fixup! feat: add config toggle for p2p retrieval * chore: aegir lint --fix * chore: install missing deps * feat: use esbuild for building * feat: remove webpack * test: fix e2e tests * chore: remove timeout only required on my network * chore: remove copyfiles * chore: suggestions from self code review * fix: gateways null when loading sw * fix: use code-splitting * fix: firefox doesn't like ESM service workers * fix: remove type in sw registration * feat: add git version into index.html * Revert "feat: try to make recursive gateways optional" This reverts commit eba97a4. * fix: bug returning an array with 1 el * ui: improve contrast for disabled toggle * feat: add granular config options * test: fix config layout test * deps: add missing deps * fix: unused deps * fix: make toggles smaller * fix: avoid setting defaults in inputs * feat: allow a single router for now * chore: rename to get verified fetch * feat: reorder config * feat: add additional title * fix: break config UI into sections * chore: output localhost as listening host * fix: allow multiple routers see #402 * fix: run validation onblur to allow editing * fix: log config as string otherwise it's not viewable in the console * feat: add ipip-484 filtering to delegated router * chore: more left padding on input section Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com> --------- Co-authored-by: Daniel N <2color@users.noreply.github.com> Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
- Loading branch information
1 parent
cb8c662
commit 0db6d94
Showing
16 changed files
with
16,369 additions
and
9,525 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react' | ||
|
||
export const InputDescription: React.FC<{ description?: string }> = ({ description }) => { | ||
if (description == null || description.length === 0) { | ||
return null | ||
} | ||
|
||
return (<span className="charcoal f6 fw1 db pt1 lh-copy mb2">{description}</span>) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from 'react' | ||
|
||
export const InputLabel: React.FC<{ label: string }> = ({ label }) => { | ||
return (<span className='f5 ma0 pt3 teal fw4 db'>{label}</span>) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
|
||
export const InputSection: React.FC<{ label: string, children: React.ReactNode[] }> = ({ label, children }) => { | ||
return ( | ||
<div className="bl bw2 br2 b--teal-muted pl3 mb3"> | ||
<span className='f3 ma0 teal fw4 db'>{label}</span> | ||
{children} | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,23 @@ | ||
/** | ||
Inspiration from https://dev.to/codebubb/create-a-simple-on-off-slide-toggle-with-css-db8 | ||
*/ | ||
|
||
.local-storage-toggle input.status { | ||
display: none; | ||
} | ||
/* .local-storage-toggle input.status + label { | ||
height: 100%; | ||
width: 100%; | ||
} */ | ||
.local-storage-toggle input.status + label > .status-switch { | ||
cursor: pointer; | ||
/* width: 100%; */ | ||
/* height: 100%; */ | ||
position: relative; | ||
background-color: #b7bbc8; | ||
color: white; | ||
transition: all 0.5s ease; | ||
padding: 3px; | ||
border-radius: 3px; | ||
} | ||
.local-storage-toggle input.status + label > .status-switch:before, .local-storage-toggle input.status + label > .status-switch:after { | ||
border-radius: 2px; | ||
height: calc(100% - 6px); | ||
width: calc(50% - 3px); | ||
display: flex; | ||
align-items: center; | ||
position: absolute; | ||
justify-content: center; | ||
transition: all 0.3s ease; | ||
} | ||
.local-storage-toggle input.status + label > .status-switch:before { | ||
background-color: white; | ||
color: black; | ||
box-shadow: 0 0 4px 4px rgba(0, 0, 0, 0.2); | ||
left: 3px; | ||
z-index: 10; | ||
content: attr(data-unchecked); | ||
.transition-all { | ||
transition-property: all; | ||
} | ||
.local-storage-toggle input.status + label > .status-switch:after { | ||
right: 0; | ||
content: attr(data-checked); | ||
/* add strikethrough to show to the user that it's disabled */ | ||
text-decoration: line-through; | ||
|
||
.transition-transform { | ||
transition-property: transform; | ||
} | ||
.local-storage-toggle input.status:checked + label > .status-switch { | ||
background-color: #40c253; | ||
|
||
.duration-200 { | ||
transition-duration: 200ms; | ||
} | ||
.local-storage-toggle input.status:checked + label > .status-switch:after { | ||
left: 0; | ||
content: attr(data-unchecked); | ||
/* add strikethrough to show to the user that it's disabled */ | ||
text-decoration: line-through; | ||
|
||
.ease-in-out { | ||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); | ||
} | ||
.local-storage-toggle input.status:checked + label > .status-switch:before { | ||
color: #40c253; | ||
left: 50%; | ||
content: attr(data-checked); | ||
|
||
.translate-x-0 { | ||
transform: translateX(0); | ||
} | ||
|
||
.h3-custom { | ||
height: 3rem; | ||
.translate-x-100 { | ||
transform: translateX(100%); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.