-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat/add preference to set high resolution in multi column mode #22
Open
Netlighter
wants to merge
3
commits into
kurozenzen:main
Choose a base branch
from
Netlighter:feat/high-resolution-in-multi-col
base: main
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.
Open
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
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
6 changes: 3 additions & 3 deletions
6
src/lib/store/high-resolution-enabled.ts → ...tore/high-resolution-multi-col-enabled.ts
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,15 +1,15 @@ | ||
import { boolParser, boolSerializer, persistentWritable } from './persistent-store'; | ||
import { StoreKey } from './store-keys'; | ||
|
||
const createHighResolutionEnabledStore = () => { | ||
const createHighResolutionMultiColEnabledStore = () => { | ||
const initial = false; | ||
const { subscribe, set } = persistentWritable( | ||
StoreKey.HighResolutionEnabled, | ||
StoreKey.HighResolutionMultiColEnabled, | ||
initial, | ||
boolSerializer, | ||
boolParser | ||
); | ||
return { subscribe, set, reset: () => set(initial) }; | ||
}; | ||
|
||
export default createHighResolutionEnabledStore(); | ||
export default createHighResolutionMultiColEnabledStore(); |
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,15 @@ | ||
import { boolParser, boolSerializer, persistentWritable } from './persistent-store'; | ||
import { StoreKey } from './store-keys'; | ||
|
||
const createHighResolutionSingleColEnabledStore = () => { | ||
const initial = false; | ||
const { subscribe, set } = persistentWritable( | ||
StoreKey.HighResolutionSingleColEnabled, | ||
initial, | ||
boolSerializer, | ||
boolParser | ||
); | ||
return { subscribe, set, reset: () => set(initial) }; | ||
}; | ||
|
||
export default createHighResolutionSingleColEnabledStore(); |
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 |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
import resultColumns from '$lib/store/result-columns-store'; | ||
import ConfirmDialog from '$lib/components/kurosearch/dialog-confirm/ConfirmDialog.svelte'; | ||
import cookiesAccepted from '$lib/store/cookies-accepted-store'; | ||
import highResolutionEnabled from '$lib/store/high-resolution-enabled'; | ||
import highResolutionSingleColEnabled from '$lib/store/high-resolution-single-col-enabled'; | ||
import resultsStore from '$lib/store/results-store'; | ||
import activeTagsStore from '$lib/store/active-tags-store'; | ||
import autoplayFullscreenEnabled from '$lib/store/autoplay-fullscreen-enabled-store'; | ||
|
@@ -38,6 +38,7 @@ | |
import { addHistory } from '$lib/logic/use/onpopstate'; | ||
import NumberInput from '$lib/components/kurosearch/dialog-sort-filter/NumberInput.svelte'; | ||
import openTagsOnPostClick from '$lib/store/tags-shortcut-store'; | ||
import highResolutionMultiColEnabled from "$lib/store/high-resolution-multi-col-enabled" | ||
|
||
let resetDialog: HTMLDialogElement; | ||
|
||
|
@@ -48,7 +49,7 @@ | |
alwaysLoop.reset(); | ||
resultColumns.reset(); | ||
cookiesAccepted.reset(); | ||
highResolutionEnabled.reset(); | ||
highResolutionSingleColEnabled.reset(); | ||
wideLayoutEnabled.reset(); | ||
}; | ||
</script> | ||
|
@@ -122,7 +123,7 @@ | |
</div> | ||
</Preference> | ||
|
||
<Preference title="Result layout" description="Save active tags and posts between sessions."> | ||
<Preference title="Result layout" description="Change posts grid in result layout."> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch 👍 thanks for correcting it. |
||
<div class="flex"> | ||
<Select bind:value={$resultColumns} options={RESULT_COLUMNS_OPTIONS} /> | ||
<Checkbox id="checkbox-wide-layout" bind:checked={$wideLayoutEnabled}> | ||
|
@@ -135,8 +136,14 @@ | |
title="Higher Resolution" | ||
description="When enabled, the app will always load the highest resolution available. This causes increased network consumption and can impact performance." | ||
> | ||
<Checkbox id="checkbox-high-resolution-enabled" bind:checked={$highResolutionEnabled}> | ||
{$highResolutionEnabled ? 'Enabled' : 'Disabled'} | ||
<p>{"For single column mode"}</p> | ||
<Checkbox id="checkbox-high-resolution-single-col-enabled" bind:checked={$highResolutionSingleColEnabled}> | ||
{$highResolutionSingleColEnabled ? 'Enabled' : 'Disabled'} | ||
</Checkbox> | ||
<br> | ||
<p>{"For multi column mode"}</p> | ||
<Checkbox id="checkbox-high-resolution-multi-col-enabled" bind:checked={$highResolutionMultiColEnabled}> | ||
{$highResolutionMultiColEnabled ? 'Enabled' : 'Disabled'} | ||
</Checkbox> | ||
</Preference> | ||
|
||
|
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.
Please leave the value of the storekey as it was. Changing the value will effectively reset the preference for all users.