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,50 @@
|
||||
import * as React from 'react';
|
||||
import { ShareInvitation } from '@joplin/lib/services/share/reducer';
|
||||
import invitationRespond from '@joplin/lib/services/share/invitationRespond';
|
||||
import { Button, Card, Icon, Text } from 'react-native-paper';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import { useCallback } from 'react';
|
||||
import { ViewStyle } from 'react-native';
|
||||
|
||||
interface Props {
|
||||
invitation: ShareInvitation;
|
||||
processing: boolean;
|
||||
containerStyle: ViewStyle;
|
||||
}
|
||||
|
||||
const ShareIcon = (props: { size: number }) => <Icon {...props} source='account-arrow-left'/>;
|
||||
|
||||
const IncomingShareItem: React.FC<Props> = props => {
|
||||
const invitation = props.invitation;
|
||||
|
||||
const onAcceptInvitation = useCallback(() => {
|
||||
void invitationRespond(invitation.id, invitation.share.folder_id, invitation.master_key, true);
|
||||
}, [invitation]);
|
||||
const onRejectInvitation = useCallback(() => {
|
||||
void invitationRespond(invitation.id, invitation.share.folder_id, invitation.master_key, false);
|
||||
}, [invitation]);
|
||||
|
||||
const sharer = invitation.share.user;
|
||||
if (!sharer) return <Text>Error: Share missing user</Text>; // Should not happen
|
||||
|
||||
return <Card style={props.containerStyle}>
|
||||
<Card.Title
|
||||
left={ShareIcon}
|
||||
title={_('Share from %s (%s)', sharer.full_name, sharer.email)}
|
||||
/>
|
||||
<Card.Actions>
|
||||
<Button
|
||||
icon='check'
|
||||
onPress={onAcceptInvitation}
|
||||
disabled={props.processing}
|
||||
>{_('Accept')}</Button>
|
||||
<Button
|
||||
icon='close'
|
||||
onPress={onRejectInvitation}
|
||||
disabled={props.processing}
|
||||
>{_('Reject')}</Button>
|
||||
</Card.Actions>
|
||||
</Card>;
|
||||
};
|
||||
|
||||
export default IncomingShareItem;
|
||||
在新工单中引用
屏蔽一个用户