Radish alpha
r
rad:z4D5UCArafTzTQpDZNQRuqswh3ury
Radicle desktop app
Radicle
Git
Don't show hover styling when a line can't be commented on
Rūdolfs Ošiņš committed 1 year ago
commit a3c143070e67006e8351c34d059644b8dd6262ac
parent 7b28e42
1 file changed +9 -4
modified src/components/Diff.svelte
@@ -273,10 +273,13 @@
    position: relative;
    cursor: cell;
  }
-
  .left:hover,
-
  .right:hover,
-
  .left:active,
-
  .right:active {
+
  .selection-disabled {
+
    cursor: default;
+
  }
+
  .left:hover:not(.selection-disabled),
+
  .right:hover:not(.selection-disabled),
+
  .left:active:not(.selection-disabled),
+
  .right:active:not(.selection-disabled) {
    color: var(--color-foreground-contrast);
  }
  .sign {
@@ -356,6 +359,7 @@
              isSelected(filePath(file, "left"), hunkIdx, lineIdx)}>
            <div
              class="left"
+
              class:selection-disabled={!codeComments || thread}
              class:marker={selection?.start.side === "left" &&
                selection.start.lineNumber === lineNumber(line, "left")}
              onpointerdown={e => {
@@ -368,6 +372,7 @@

            <div
              class="right"
+
              class:selection-disabled={!codeComments || thread}
              class:marker={selection?.start.side === "right" &&
                selection.start.lineNumber === lineNumber(line, "right")}
              onpointerdown={e => {