Skip to content

Commit

Permalink
feat: config for status bar
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Feb 22, 2024
1 parent 7529f07 commit c229878
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 77 deletions.
146 changes: 73 additions & 73 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ export const App: React.FC = () => {
const themeConfig = useConfigStore(state => state.theme);
const colorScheme = useColorScheme();
const theme = (themeConfig === 'default' ? colorScheme : (themeConfig ?? colorScheme)) === 'light' ? lightTheme : darkTheme;
const [translucentStatusBar, hideStatusBar] = useConfigStore(state => [state.translucentStatusBar, state.hideStatusBar]);
useRegisterReceivingShareIntent();

return (
<I18nextProvider i18n={i18n}>
<PaperProvider theme={theme}>
<ThemeProvider theme={theme}>
<StatusBar hidden={false} />
<StatusBar translucent={translucentStatusBar} hidden={hideStatusBar} />
<NavigationContainer ref={navigationReference} theme={theme.reactNavigation}>
<Stack.Navigator initialRouteName='MainMenu'>
<Stack.Screen name='WikiWebView' component={WikiWebView} options={{ headerShown: false }} />
Expand Down
6 changes: 5 additions & 1 deletion src/i18n/localization/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,11 @@
"Available": "Available",
"NotAvailable": "Not Available",
"EnableQuickLoad": "Enable Quick Load",
"EnableQuickLoadDescription": "Enabled to load only the last few days' worth of tiddlers for quick opening of new content added to the giant wiki. Ideal for scenarios where you only need to add content quickly and don't need to look at old content."
"EnableQuickLoadDescription": "Enabled to load only the last few days' worth of tiddlers for quick opening of new content added to the giant wiki. Ideal for scenarios where you only need to add content quickly and don't need to look at old content.",
"TranslucentStatusBar": "Translucent Status Bar",
"TranslucentStatusBarDescription": "Allow the interface to be displayed below the status bar, overlapping with \n text on status bar, for more display space, but interface elements may be obscured by the status bar.",
"HideStatusBar": "Hide Status Bar",
"HideStatusBarDescription": "Completely hide the status bar, more display space is available when hidden, but opening the status bar may require additional action. Does not take effect on bangs screen dig hole screen."
},
"Error": {
"InitWikiGitError": "E-1 InitWikiGitError",
Expand Down
6 changes: 5 additions & 1 deletion src/i18n/localization/locales/zh_CN/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,11 @@
"Available": "可用",
"NotAvailable": "不可用",
"EnableQuickLoad": "启用快速加载",
"EnableQuickLoadDescription": "启用后仅加载最近几天的条目,以便快速打开巨型知识库新增内容。适合仅需快速添加内容,不需要查看旧有内容的场景。"
"EnableQuickLoadDescription": "启用后仅加载最近几天的条目,以便快速打开巨型知识库新增内容。适合仅需快速添加内容,不需要查看旧有内容的场景。",
"TranslucentStatusBar": "半透明状态栏",
"TranslucentStatusBarDescription": "让界面显示在状态栏之下,和状态栏重叠展示,获得更多展示空间,但界面元素有可能被状态栏遮挡。",
"HideStatusBar": "隐藏状态栏",
"HideStatusBarDescription": "完全隐藏状态栏,隐藏后可以获得更多展示空间,但打开状态栏可能需要额外操作。在刘海屏挖孔屏上不生效。"
},
"Error": {
"InitWikiGitError": "E-1 笔记仓库初始化失败错误",
Expand Down
Loading

0 comments on commit c229878

Please sign in to comment.