mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
fix merge editor ui
This commit is contained in:
@@ -69,6 +69,7 @@
|
|||||||
setTheme();
|
setTheme();
|
||||||
attachEditorListeners();
|
attachEditorListeners();
|
||||||
}
|
}
|
||||||
|
loadAction()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,7 @@
|
|||||||
setTheme();
|
setTheme();
|
||||||
attachEditorListeners();
|
attachEditorListeners();
|
||||||
}
|
}
|
||||||
|
loadAction()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,6 @@ const MergeEditor = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onMessageFromPrimaryWebView = (evt) => {
|
const onMessageFromPrimaryWebView = (evt) => {
|
||||||
|
|
||||||
if (evt.nativeEvent.data !== '') {
|
if (evt.nativeEvent.data !== '') {
|
||||||
let data = JSON.parse(evt.nativeEvent.data);
|
let data = JSON.parse(evt.nativeEvent.data);
|
||||||
|
|
||||||
@@ -152,11 +151,9 @@ const MergeEditor = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onMessageFromSecondaryWebView = (evt) => {
|
const onMessageFromSecondaryWebView = (evt) => {
|
||||||
|
|
||||||
if (evt.nativeEvent.data === '') {
|
if (evt.nativeEvent.data === '') {
|
||||||
let data = JSON.parse(evt.nativeEvent.data);
|
let data = JSON.parse(evt.nativeEvent.data);
|
||||||
if (data.type === 'delta') {
|
if (data.type === 'delta') {
|
||||||
|
|
||||||
secondaryData = data.data;
|
secondaryData = data.data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -362,6 +359,7 @@ const MergeEditor = () => {
|
|||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
|
maxWidth: '50%',
|
||||||
}}>
|
}}>
|
||||||
<Icon
|
<Icon
|
||||||
style={{
|
style={{
|
||||||
@@ -404,7 +402,10 @@ const MergeEditor = () => {
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
}}>
|
}}>
|
||||||
<Paragraph color={colors.icon} size={SIZE.xxs}>
|
<Paragraph
|
||||||
|
style={{maxWidth: '80%'}}
|
||||||
|
color={colors.icon}
|
||||||
|
size={SIZE.xs}>
|
||||||
Saved on {timeConverter(primaryData.dateEdited)}
|
Saved on {timeConverter(primaryData.dateEdited)}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
<Icon
|
<Icon
|
||||||
@@ -440,17 +441,21 @@ const MergeEditor = () => {
|
|||||||
onPress={onPressDiscardFromPrimaryWebView}
|
onPress={onPressDiscardFromPrimaryWebView}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
<View style={{width: 10}} />
|
|
||||||
{keepContentFrom === 'secondary' ? null : (
|
{keepContentFrom === 'secondary' ? null : (
|
||||||
|
<>
|
||||||
|
<View style={{width: 10}} />
|
||||||
<Button
|
<Button
|
||||||
width={null}
|
width={null}
|
||||||
height={40}
|
height={40}
|
||||||
title={keepContentFrom === 'primary' ? 'Undo' : 'Keep'}
|
title={keepContentFrom === 'primary' ? 'Undo' : 'Keep'}
|
||||||
onPress={onPressKeepFromPrimaryWebView}
|
onPress={onPressKeepFromPrimaryWebView}
|
||||||
color={
|
color={
|
||||||
keepContentFrom === 'primary' ? colors.errorText : 'accent'
|
keepContentFrom === 'primary'
|
||||||
|
? colors.errorText
|
||||||
|
: 'accent'
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -507,6 +512,7 @@ const MergeEditor = () => {
|
|||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
|
maxWidth: '50%',
|
||||||
}}>
|
}}>
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
@@ -537,7 +543,10 @@ const MergeEditor = () => {
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
}}>
|
}}>
|
||||||
<Paragraph color={colors.icon} size={SIZE.xs}>
|
<Paragraph
|
||||||
|
style={{maxWidth: '80%'}}
|
||||||
|
color={colors.icon}
|
||||||
|
size={SIZE.xs}>
|
||||||
Saved on {timeConverter(secondaryData.dateEdited)}
|
Saved on {timeConverter(secondaryData.dateEdited)}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
<Icon
|
<Icon
|
||||||
@@ -573,8 +582,10 @@ const MergeEditor = () => {
|
|||||||
onPress={onPressDiscardFromSecondaryWebView}
|
onPress={onPressDiscardFromSecondaryWebView}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
<View style={{width: 10}} />
|
|
||||||
{keepContentFrom === 'primary' ? null : (
|
{keepContentFrom === 'primary' ? null : (
|
||||||
|
<>
|
||||||
|
<View style={{width: 10}} />
|
||||||
<Button
|
<Button
|
||||||
width={null}
|
width={null}
|
||||||
title={keepContentFrom === 'secondary' ? 'Undo' : 'Keep'}
|
title={keepContentFrom === 'secondary' ? 'Undo' : 'Keep'}
|
||||||
@@ -585,6 +596,7 @@ const MergeEditor = () => {
|
|||||||
: 'accent'
|
: 'accent'
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user