Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline Merge RTL #167

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions renderer/src/layouts/projects/Import/ConflictEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
import ConflictSection from './ConflictSection';

function ConflictEditor({
selectedFileContent, setSelectedFileContent, selectedFileName, FileContentOrginal, setEnableSave, resolvedFileNames,
selectedFileContent, setSelectedFileContent, selectedFileName, FileContentOrginal, setEnableSave, resolvedFileNames, conflictData,
}) {
const [resolveAllActive, setResolveALlActive] = useState();
const [resetAlll, setResetAll] = useState();
Expand Down Expand Up @@ -166,14 +166,23 @@ function ConflictEditor({
{/* Content */}
<div className="divide-y divide-gray-100 max-h-[71vh] overflow-y-scroll scrollbars-width">
{selectedFileContent.map((content, index) => (
<div key={content.id} className="flex px-2 py-6 gap-4">
<div
key={content.id}
className={`flex px-2 py-6 gap-4
${conflictData.data.incomingMeta.languages[0].scriptDirection?.toLowerCase() === 'rtl' ? 'flex-row-reverse' : 'flex-row'}`}
>
{(index !== 0 && index !== selectedFileContent.length - 1) && (
<div className="h-4 w-4 py-1 px-2 mt-1 flex items-center justify-center bg-primary rounded-full text-xxs text-white">
{index}
</div>
)}

<div className={` w-full ${(index === 0 || index === selectedFileContent.length - 1) && 'ml-8'} `}>
<div
className={` w-full ${(index === 0 || index === selectedFileContent.length - 1) && 'ml-8'}`}
style={{
direction: `${conflictData.data.incomingMeta.languages[0].scriptDirection?.toLowerCase() === 'rtl' ? 'rtl' : 'auto'}`,
}}
>
<ConflictSection
text={
content?.title
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ function ConflictResolverUI({ conflictData, setConflictPopup }) {
FileContentOrginal={FileContentOrginal}
setEnableSave={setEnableSave}
resolvedFileNames={resolvedFileNames}
conflictData={conflictData}
/>
<div className="h-[6vh] w-full flex justify-end items-center pr-10 gap-5">
{conflictData?.data?.files?.filepaths?.length === resolvedFileNames?.length && (
Expand Down
Loading