feat: Initial clean release of CHM
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
这个提交包含在:
@@ -0,0 +1,57 @@
|
||||
import * as React from 'react';
|
||||
import { View, Text, TextInput } from 'react-native';
|
||||
import Setting, { AppType } from '@joplin/lib/models/Setting';
|
||||
import { ConfigScreenStyles } from './configScreenStyles';
|
||||
import { UpdateSettingValueCallback } from './types';
|
||||
import { themeStyle } from '../../global-style';
|
||||
import { FunctionComponent, ReactNode, useId, useState } from 'react';
|
||||
|
||||
interface Props {
|
||||
settingId: string;
|
||||
value: string;
|
||||
styles: ConfigScreenStyles;
|
||||
themeId: number;
|
||||
label: string;
|
||||
updateSettingValue: UpdateSettingValueCallback;
|
||||
description?: ReactNode;
|
||||
}
|
||||
|
||||
const SettingTextInput: FunctionComponent<Props> = props => {
|
||||
const [valueState, setValueState] = useState(props.value);
|
||||
const md = Setting.settingMetadata(props.settingId);
|
||||
const themeId = props.themeId;
|
||||
const theme = themeStyle(themeId);
|
||||
const settingDescription = md.description ? md.description(AppType.Mobile) : '';
|
||||
const styleSheet = props.styles.styleSheet;
|
||||
const containerStyles = props.styles.getContainerStyle(!!settingDescription);
|
||||
const labelId = useId();
|
||||
|
||||
return (
|
||||
<View key={props.settingId} style={containerStyles.outerContainer}>
|
||||
<View key={props.settingId} style={containerStyles.innerContainer}>
|
||||
<Text key="label" style={styleSheet.settingText} nativeID={labelId}>
|
||||
{md.label()}
|
||||
</Text>
|
||||
<TextInput
|
||||
autoCorrect={false}
|
||||
autoComplete="off"
|
||||
selectionColor={theme.textSelectionColor}
|
||||
keyboardAppearance={theme.keyboardAppearance}
|
||||
autoCapitalize="none"
|
||||
key="control"
|
||||
style={styleSheet.settingControl}
|
||||
value={valueState}
|
||||
onChangeText={(newValue: string) => {
|
||||
setValueState(newValue);
|
||||
void props.updateSettingValue(props.settingId, newValue);
|
||||
}}
|
||||
secureTextEntry={!!md.secure}
|
||||
aria-labelledby={labelId}
|
||||
/>
|
||||
</View>
|
||||
{props.description}
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default SettingTextInput;
|
||||
在新工单中引用
屏蔽一个用户