-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
refactor: solid settings (@miodec) #7816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Miodec
wants to merge
59
commits into
master
Choose a base branch
from
solid-settings2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
de3e120
brrap
Miodec a204e40
brbrrrr
Miodec 4925702
bbrrr
Miodec ec86cb6
spacer
Miodec 84113ac
asdf
Miodec 60187d0
asdf
Miodec 03d0947
min speed
Miodec 1362330
customs
Miodec 976d31c
language
Miodec 3eb51e7
funbox
Miodec 4bc52cd
order
Miodec 0981406
always auto
Miodec 0aed268
rename
Miodec ec6fac7
rename
Miodec 822e158
only set overflow when necessary
Miodec a48b61a
ballon size
Miodec 15439ba
custom poly, custom layoutfluid
Miodec b373dc3
compare
Miodec 44a645f
quicknav, tip, account settings notice
Miodec 238b068
LS
Miodec 1edae42
layout
Miodec b87048c
options metadata
Miodec 471ed0f
last one for today
Miodec b34a52f
aiaiai
Miodec dee659b
Merge branch 'master' into solid-settings2
Miodec 9d0126e
meta
Miodec d93676f
filter
Miodec 9a81eb0
pace caret
Miodec d881bcd
more
Miodec 25fbc1b
mooore
Miodec 2a5b7e9
hide
Miodec c0e61f3
nevermind
Miodec 88c2d90
fix
Miodec d98cce1
yap
Miodec 5b61fdb
Merge branch 'master' into solid-settings2
Miodec eb41d04
aaa
Miodec 1bc43d2
remove console log
Miodec aa0593f
yayo
Miodec 7dfc5d4
custom background
Miodec 04559d0
ref oneverychange
Miodec a361e62
custom backogrund filters
Miodec cf32b38
reactive file storage
Miodec 78fc491
asdf
Miodec c4d661a
auto switch themes
Miodec fdd4c0f
yaya
Miodec 985f01e
Merge branch 'master' into solid-settings2
Miodec 793adec
yeya
Miodec bd9d55d
limit cookie import export reset
Miodec 9a983c3
meta
Miodec c110c01
fiiix
Miodec 8f1f9d0
cookies
Miodec db39cd0
cookies
Miodec 3d19347
comment
Miodec d19a148
REMOVE DUPLICATES FROM HERE, RESET TO HERE IF NEED BE
Miodec e0ab2d0
review
Miodec 7ca3b60
ignore the 'reset to here' commit lol
Miodec 288206d
asdf
Miodec 102bcf9
yeet
Miodec 2d1478e
hide
Miodec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,46 @@ | ||
| import { createEffect, createSignal, JSXElement } from "solid-js"; | ||
|
|
||
| type Props = { | ||
| ref?: (el: HTMLInputElement) => void; | ||
| value: number; | ||
| min: number; | ||
| max: number; | ||
| step?: number; | ||
| onChange?: (value: number) => void; | ||
| onEveryChange?: (value: number) => void; | ||
| text?: (value: number) => string | JSXElement; | ||
| }; | ||
|
|
||
| export function Slider(props: Props): JSXElement { | ||
| // oxlint-disable-next-line solid/reactivity props.value only used as the initial value, not tracked. | ||
| const [value, setValue] = createSignal(props.value); | ||
|
|
||
| createEffect(() => setValue(props.value)); | ||
|
|
||
| const textToDisplay = () => { | ||
| if (props.text) { | ||
| return props.text(value()); | ||
| } | ||
| return value(); | ||
| }; | ||
|
|
||
| return ( | ||
| <div class="grid grid-cols-[3ch_1fr] items-center gap-4"> | ||
| <div>{textToDisplay()}</div> | ||
| <input | ||
| ref={props.ref} | ||
| type="range" | ||
| min={props.min} | ||
| max={props.max} | ||
| value={value()} | ||
| step={props.step} | ||
| onInput={(e) => { | ||
| const newValue = Number(e.target.value); | ||
| setValue(newValue); | ||
| props.onEveryChange?.(newValue); | ||
| }} | ||
| onChange={(e) => props.onChange?.(Number(e.target.value))} | ||
| /> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new Todo was discovered. If it is not a priority right now,consider marking it for later attention.
todo check if wrapper and dialog can be merged into one