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,45 @@
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import * as React from 'react';
|
||||
import { Portal, Snackbar } from 'react-native-paper';
|
||||
import { connect } from 'react-redux';
|
||||
import { AppState } from '../../utils/types';
|
||||
import { Toast } from '@joplin/lib/services/plugins/api/types';
|
||||
import { useCallback } from 'react';
|
||||
import { Dispatch } from 'redux';
|
||||
import { ViewStyle } from 'react-native';
|
||||
|
||||
interface Props {
|
||||
dispatch: Dispatch;
|
||||
toast: Toast;
|
||||
}
|
||||
|
||||
const snackbarAction = {
|
||||
label: _('Close'),
|
||||
};
|
||||
|
||||
const wrapperStyle: ViewStyle = {
|
||||
maxWidth: 600,
|
||||
alignSelf: 'center',
|
||||
};
|
||||
|
||||
const PluginNotification: React.FC<Props> = props => {
|
||||
const onDismiss = useCallback(() => {
|
||||
props.dispatch({ type: 'TOAST_HIDE' });
|
||||
}, [props.dispatch]);
|
||||
|
||||
// Reload the <Portal> for each new toast. This keeps the toast notification on top
|
||||
// of other <Portal> components and resets the toast timestamp when its message changes.
|
||||
return <Portal key={`toast-${props.toast?.timestamp}`}>
|
||||
<Snackbar
|
||||
visible={!!props.toast}
|
||||
onDismiss={onDismiss}
|
||||
duration={props.toast?.duration}
|
||||
wrapperStyle={wrapperStyle}
|
||||
action={snackbarAction}
|
||||
>{props.toast?.message ?? ''}</Snackbar>
|
||||
</Portal>;
|
||||
};
|
||||
|
||||
export default connect((state: AppState) => ({
|
||||
toast: state.toast,
|
||||
}))(PluginNotification);
|
||||
在新工单中引用
屏蔽一个用户