-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ removed unused component + cleanup
- Loading branch information
Showing
9 changed files
with
89 additions
and
55 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
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 was deleted.
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
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
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
18 changes: 11 additions & 7 deletions
18
qrshare/client/src/pages/main/components/OrderSelector.svelte
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,20 +1,24 @@ | ||
<script> | ||
import { ComboGroup } from "../../../components/list"; | ||
import { SwitchGroup } from "../../../components/list"; | ||
import { isSorted } from "../store"; | ||
const options = ["Relevance", "None"]; | ||
let selected = options[0]; | ||
let selected = [true, false]; | ||
function toggle(e) { | ||
const { option } = e.detail; | ||
const { index } = e.detail; | ||
/* clicked currently selected, skiiip */ | ||
if (option === selected) return; | ||
if (selected[index]) return; | ||
isSorted.set(options[0] === option); | ||
selected = option; | ||
/* invert selected */ | ||
selected = selected.map((v) => !v); | ||
/* since there is only one options, it either is or isnt | ||
and this code will only run it there is a change */ | ||
isSorted.flip(); | ||
} | ||
</script> | ||
|
||
<label for="order-by">Order by</label> | ||
<ComboGroup {options} {selected} on:toggle={toggle} /> | ||
<SwitchGroup {options} {selected} on:toggle={toggle} /> |