-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: setting to hide accessible captions (#1792)
- Loading branch information
Showing
7 changed files
with
72 additions
and
3 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 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,23 @@ | ||
import { IonItem, IonToggle } from "@ionic/react"; | ||
|
||
import { useAppDispatch, useAppSelector } from "#/store"; | ||
|
||
import { setHideAltText } from "../../settingsSlice"; | ||
|
||
export default function HideAltText() { | ||
const dispatch = useAppDispatch(); | ||
const hideAltText = useAppSelector( | ||
(state) => state.settings.general.media.hideAltText, | ||
); | ||
|
||
return ( | ||
<IonItem> | ||
<IonToggle | ||
checked={hideAltText} | ||
onIonChange={(e) => dispatch(setHideAltText(e.detail.checked))} | ||
> | ||
Hide Accessible Captions | ||
</IonToggle> | ||
</IonItem> | ||
); | ||
} |
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,19 @@ | ||
import { IonLabel } from "@ionic/react"; | ||
import { IonList } from "@ionic/react"; | ||
|
||
import { ListHeader } from "#/features/settings/shared/formatting"; | ||
|
||
import HideAltText from "./HideAltText"; | ||
|
||
export default function Media() { | ||
return ( | ||
<> | ||
<ListHeader> | ||
<IonLabel>Media</IonLabel> | ||
</ListHeader> | ||
<IonList inset> | ||
<HideAltText /> | ||
</IonList> | ||
</> | ||
); | ||
} |
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