m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-09 05:33:51 -05:00

5 Commits

Author SHA1 Message Date
Sergio
98dafb8ba4 chore: bump project version 2025-03-10 16:49:07 +02:00
Sergio
2addfca1b4 fix: code block component copying was working incorrectly (#62) 2025-03-10 16:47:47 +02:00
dependabot[bot]
e3b05923ae Bump ring from 0.17.11 to 0.17.13 (#60)
Bumps [ring](https://github.com/briansmith/ring) from 0.17.11 to 0.17.13.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07 19:26:28 +02:00
Sergio
aa4195f8d6 chore: bump project version 2025-03-07 18:25:00 +02:00
Sergio
1b94629c79 fix: overflowing image references in web UI 2025-03-07 18:01:32 +02:00
4 changed files with 9 additions and 7 deletions

6
Cargo.lock generated
View File

@@ -355,7 +355,7 @@ dependencies = [
[[package]] [[package]]
name = "cup" name = "cup"
version = "3.0.2" version = "3.0.4"
dependencies = [ dependencies = [
"bollard", "bollard",
"chrono", "chrono",
@@ -1505,9 +1505,9 @@ dependencies = [
[[package]] [[package]]
name = "ring" name = "ring"
version = "0.17.11" version = "0.17.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da5349ae27d3887ca812fb375b45a4fbb36d8d12d2df394968cd86e35683fe73" checksum = "70ac5d832aa16abd7d1def883a8545280c20a60f523a370aa3a9617c2b8550ee"
dependencies = [ dependencies = [
"cc", "cc",
"cfg-if", "cfg-if",

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "cup" name = "cup"
version = "3.0.2" version = "3.0.4"
edition = "2021" edition = "2021"
[dependencies] [dependencies]

View File

@@ -21,6 +21,8 @@ export function CodeBlock({
}; };
}; };
const copyText = children instanceof Array ? children.join("") : children;
return ( return (
<div <div
className={`group relative flex w-full items-center rounded-lg bg-${theme}-100 px-3 py-2 font-mono text-${theme}-700 dark:bg-${theme}-950 dark:text-${theme}-300`} className={`group relative flex w-full items-center rounded-lg bg-${theme}-100 px-3 py-2 font-mono text-${theme}-700 dark:bg-${theme}-950 dark:text-${theme}-300`}
@@ -35,7 +37,7 @@ export function CodeBlock({
) : ( ) : (
<button <button
className={`duration-50 absolute right-3 bg-${theme}-100 py-1 pl-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-${theme}-950`} className={`duration-50 absolute right-3 bg-${theme}-100 py-1 pl-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-${theme}-950`}
onClick={handleCopy(`docker pull ${children}`)} onClick={handleCopy(`${copyText}`)}
> >
<Clipboard className="size-5" /> <Clipboard className="size-5" />
</button> </button>

View File

@@ -82,14 +82,14 @@ export default function Image({ data }: { data: Image }) {
> >
<div className="mb-4 flex items-center gap-3"> <div className="mb-4 flex items-center gap-3">
<Box className={`size-6 shrink-0 text-${theme}-500`} /> <Box className={`size-6 shrink-0 text-${theme}-500`} />
<DialogTitle className="font-mono text-black dark:text-white"> <DialogTitle className="font-mono text-black dark:text-white break-all">
{url ? ( {url ? (
<> <>
<a <a
href={url} href={url}
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
className={`group w-fit text-black hover:underline dark:text-white`} className={`group w-fit hover:underline`}
> >
<span> <span>
{data.reference} {data.reference}