-
-
Notifications
You must be signed in to change notification settings - Fork 838
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from qunash/dev
main <- dev
- Loading branch information
Showing
28 changed files
with
376 additions
and
216 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": [ | ||
"development" | ||
], | ||
"hints": { | ||
"axe/forms": "off" | ||
} | ||
} |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { h } from "preact" | ||
import { useEffect, useState } from "preact/hooks" | ||
import { getTranslation, localizationKeys } from "src/util/localization" | ||
import { getUserConfig, updateUserConfig } from "src/util/userConfig" | ||
|
||
|
||
|
||
const OptionsEditor = () => { | ||
|
||
const [trimLongText, setTrimLongText] = useState<boolean>(null) | ||
|
||
useEffect(() => { | ||
getUserConfig().then(config => { | ||
setTrimLongText(config.trimLongText) | ||
}) | ||
}, []) | ||
|
||
return ( | ||
|
||
<div className="wcg-flex wcg-w-4/5 wcg-flex-col wcg-gap-2"> | ||
<h1 className="wcg-m-0 wcg-p-0 wcg-text-2xl"> | ||
{getTranslation(localizationKeys.UI.options)} | ||
</h1 > | ||
<div class="wcg-form-control"> | ||
<label className="wcg-label wcg-flex wcg-w-fit wcg-cursor-pointer wcg-items-center wcg-gap-2"> | ||
<span className="wcg-label-text wcg-text-lg">{getTranslation(localizationKeys.UI.trimLongText)}</span> | ||
<input type="checkbox" | ||
checked={trimLongText} | ||
onChange={(e: Event) => { | ||
const checkbox: HTMLInputElement = e.target as HTMLInputElement | ||
setTrimLongText(checkbox.checked) | ||
updateUserConfig({ trimLongText: checkbox.checked }) | ||
}} | ||
/> | ||
</label> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default OptionsEditor |
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
Oops, something went wrong.