diff --git a/CHANGELOG.md b/CHANGELOG.md index e450d53a..c1b99cd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- A dev setting to clear the cache + ### Fixed - A bug where bookmarked channels can be duplicated - A bug where video cast from web app would not play if there's an error dialog on screen +### Changed + +- Font weight to be less bold + ## [0.23.5] - 2024-05-19 ### Fixed diff --git a/playlet-lib/src/components/Screens/SettingsScreen/ClearCacheControl.bs b/playlet-lib/src/components/Screens/SettingsScreen/ClearCacheControl.bs new file mode 100644 index 00000000..a3231197 --- /dev/null +++ b/playlet-lib/src/components/Screens/SettingsScreen/ClearCacheControl.bs @@ -0,0 +1,27 @@ +import "pkg:/components/Dialog/DialogUtils.bs" +import "pkg:/source/utils/CacheUtils.bs" +import "pkg:/source/utils/FocusManagement.bs" +import "pkg:/source/utils/Locale.bs" + +function Init() + m.top.focusable = true + m.top.itemSpacings = [8] + m.button = m.top.findNode("Button") + m.button.observeField("buttonSelected", FuncName(OnButtonSelected)) +end function + +function OnFocusChange() as void + if not m.top.focus + return + end if + NodeSetFocus(m.button, true) +end function + +function BindPreference(_preferences as object, _key as string) + ' Do nothing +end function + +function OnButtonSelected() + CacheUtils.Clear() + DialogUtils.ShowDialog(Tr(Locale.Settings.CacheCleared), Tr(Locale.Generic.Success)) +end function diff --git a/playlet-lib/src/components/Screens/SettingsScreen/ClearCacheControl.xml b/playlet-lib/src/components/Screens/SettingsScreen/ClearCacheControl.xml new file mode 100644 index 00000000..3c8c6ff7 --- /dev/null +++ b/playlet-lib/src/components/Screens/SettingsScreen/ClearCacheControl.xml @@ -0,0 +1,19 @@ + + + + + + + + + diff --git a/playlet-web/src/lib/Screens/Settings/SettingsNode.svelte b/playlet-web/src/lib/Screens/Settings/SettingsNode.svelte index 0c94e58a..9070d321 100644 --- a/playlet-web/src/lib/Screens/Settings/SettingsNode.svelte +++ b/playlet-web/src/lib/Screens/Settings/SettingsNode.svelte @@ -7,6 +7,7 @@ import StringControl from "lib/Screens/Settings/SettingControls/StringControl.svelte"; import NumberControl from "./SettingControls/NumberControl.svelte"; import { tr } from "lib/Stores"; + import ClearCacheControl from "./SettingControls/ClearCacheControl.svelte"; const textSizes = ["text-2xl", "text-lg", "text-base", "text-sm", "text-xs"]; @@ -30,6 +31,7 @@ const customComponents = { ClearSearchHistoryControl, + ClearCacheControl, EditHomeScreenControl, PlayletLibVersionControl, };