Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Don't show hover styling when a line can't be commented on
Rūdolfs Ošiņš committed 1 year ago
commit 8126980bd5045604c62a10f2b1882512c7bb9bf7
parent efe3c51d058e6c501b2b9ed698a9f138cc9d5ff6
1 file changed +9 -4
modified src/components/Diff.svelte
@@ -249,10 +249,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 {
@@ -332,6 +335,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 => {
@@ -344,6 +348,7 @@

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