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

9 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
Sergio
8cd9cce94e chore: bump project version 2025-03-07 17:38:20 +02:00
Sergio
ddabd8c102 fix: strip hash when parsing image references 2025-03-07 17:37:56 +02:00
Sergio
0b0028ab6d Fix search in docs 2025-03-07 16:40:59 +02:00
Sergio
75509550b1 Fix CI Dockerfile 2025-03-03 11:35:58 +02:00
8 changed files with 14 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ ARG TARGETOS
COPY binaries/* /
RUN mv cup-$TARGETOS-$TARGETARCH cup
RUN chmod +x cup
FROM scratch
COPY --from=builder /cup /cup

6
Cargo.lock generated
View File

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

View File

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

Binary file not shown.

View File

@@ -4,7 +4,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"build": "next build && pagefind --site out --output-path out/_pagefind",
"start": "next start",
"lint": "next lint",
"fmt": "bun prettier --write ."
@@ -26,6 +26,7 @@
"@types/react-dom": "^19.0.3",
"eslint": "^9.18.0",
"eslint-config-next": "15.1.5",
"pagefind": "^1.3.0",
"postcss": "^8.5.1",
"prettier": "^3.4.2",
"prettier-plugin-tailwindcss": "^0.6.11",

View File

@@ -16,7 +16,7 @@ pub fn split(reference: &str) -> (String, String, String) {
}
}
};
let splits = repository_and_tag.split(':').collect::<Vec<&str>>();
let splits = repository_and_tag.split('@').next().unwrap().split(':').collect::<Vec<&str>>();
let (repository, tag) = match splits.len() {
1 | 2 => {
let repository_components = splits[0].split('/').collect::<Vec<&str>>();
@@ -38,7 +38,7 @@ pub fn split(reference: &str) -> (String, String, String) {
};
(repository, tag)
}
_ => unreachable!(),
_ => {dbg!(splits); panic!()},
};
(registry.to_string(), repository, tag.to_string())
}

View File

@@ -21,6 +21,8 @@ export function CodeBlock({
};
};
const copyText = children instanceof Array ? children.join("") : children;
return (
<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`}
@@ -35,7 +37,7 @@ export function CodeBlock({
) : (
<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`}
onClick={handleCopy(`docker pull ${children}`)}
onClick={handleCopy(`${copyText}`)}
>
<Clipboard className="size-5" />
</button>

View File

@@ -82,14 +82,14 @@ export default function Image({ data }: { data: Image }) {
>
<div className="mb-4 flex items-center gap-3">
<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 ? (
<>
<a
href={url}
target="_blank"
rel="noopener noreferrer"
className={`group w-fit text-black hover:underline dark:text-white`}
className={`group w-fit hover:underline`}
>
<span>
{data.reference}