Skip to content

Commit

Permalink
Move folder indicator to the right (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmerckx authored Nov 30, 2023
1 parent f80d5aa commit b393b74
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/dashboard/view/EntryTree.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
align-items: center;
justify-content: center;
width: 20px;
margin-right: 4px;
margin-left: auto;
height: 20px;
flex-shrink: 0;
color: hsla(var(--alinea-negative), 0.5);
Expand Down
27 changes: 14 additions & 13 deletions src/dashboard/view/EntryTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,30 +71,31 @@ function EntryTreeItem({item, data}: EntryTreeItemProps) {
>
<button
className={styles.tree.item.label()}
title={selectedEntry(locale, itemData).title}
style={{paddingLeft: px((item.getItemMeta().level + 1) * 12)}}
>
{item.isFolder() ? (
<span className={styles.tree.item.icon()}>
<Icon
icon={
isUntranslated ? IcRoundTranslate : icon ?? IcOutlineDescription
}
/>
</span>

<span className={styles.tree.item.label.itemName()}>
{selectedEntry(locale, itemData).title}
</span>

{item.isFolder() && (
<span className={styles.tree.item.arrow()}>
{item.isExpanded() ? (
<Icon icon={IcRoundKeyboardArrowDown} size={18} />
) : (
<Icon icon={IcRoundKeyboardArrowRight} size={18} />
)}
</span>
) : (
<span className={styles.tree.item.icon()}>
<Icon
icon={
isUntranslated ? IcRoundTranslate : icon ?? IcOutlineDescription
}
/>
</span>
)}

<span className={styles.tree.item.label.itemName()}>
{selectedEntry(locale, itemData).title}
</span>

{/*isUntranslated && (
<span className={styles.tree.status()}>
<Icon icon={IcRoundTranslate} />
Expand Down

0 comments on commit b393b74

Please sign in to comment.