Skip to content

Commit 274b0c8

Browse files
committed
refactor: slightly reword + align styling
1 parent 870aa88 commit 274b0c8

4 files changed

Lines changed: 26 additions & 12 deletions

File tree

app/pages/package/[[org]]/[name].vue

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,10 +1047,10 @@ onKeyStroke(
10471047
<div
10481048
v-if="publishSecurityDowngrade"
10491049
role="alert"
1050-
class="mb-4 rounded-lg border border-red-600/40 bg-red-500/10 px-4 py-3 text-red-800 dark:text-red-300"
1050+
class="mb-4 rounded-lg border border-amber-600/40 bg-amber-500/10 px-4 py-3 text-amber-700 dark:text-amber-400"
10511051
>
1052-
<h3 class="m-0 flex items-center gap-2 font-mono text-sm font-semibold tracking-wide">
1053-
<span class="i-carbon-warning-filled w-4 h-4 shrink-0" aria-hidden="true" />
1052+
<h3 class="m-0 flex items-center gap-2 font-mono text-sm font-medium">
1053+
<span class="i-carbon:warning-alt w-4 h-4 shrink-0" aria-hidden="true" />
10541054
{{ $t('package.security_downgrade.title') }}
10551055
</h3>
10561056
<p class="mt-2 mb-0 text-sm">
@@ -1063,6 +1063,17 @@ onKeyStroke(
10631063
})
10641064
}}
10651065
</p>
1066+
<p class="mt-2 mb-0 text-sm">
1067+
<a
1068+
href="https://docs.npmjs.com/generating-provenance-statements"
1069+
target="_blank"
1070+
rel="noopener noreferrer"
1071+
class="inline-flex items-center gap-1 rounded-sm underline underline-offset-4 decoration-amber-600/60 dark:decoration-amber-400/50 hover:decoration-fg focus-visible:decoration-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/70 transition-colors"
1072+
>
1073+
{{ $t('package.security_downgrade.learn_more') }}
1074+
<span class="i-carbon-launch w-3 h-3" aria-hidden="true" />
1075+
</a>
1076+
</p>
10661077
</div>
10671078
<TerminalInstall
10681079
:package-name="pkg.name"

i18n/locales/en.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,10 @@
256256
"error_loading": "Failed to load provenance details"
257257
},
258258
"security_downgrade": {
259-
"title": "Security downgrade detected",
260-
"description": "This package has been released using a stronger, more secure publishing method before. The version you are viewing was published using a weaker or less trusted method. Treat this as a potential supply-chain compromise until verified.",
261-
"fallback_install": "Install commands below are pinned to trusted version {version} by default."
259+
"title": "Provenance downgrade",
260+
"description": "An older version of this package was published with provenance or trusted publishing. This version was published without it.",
261+
"fallback_install": "Install commands below are pinned to version {version}, which was published with a stronger trust method.",
262+
"learn_more": "Learn more about provenance"
262263
},
263264
"keywords_title": "Keywords",
264265
"compatibility": "Compatibility",

lunaria/files/en-GB.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,10 @@
256256
"error_loading": "Failed to load provenance details"
257257
},
258258
"security_downgrade": {
259-
"title": "Security downgrade detected",
260-
"description": "This package has been released using a stronger, more secure publishing method before. The version you are viewing was published using a weaker or less trusted method. Treat this as a potential supply-chain compromise until verified.",
261-
"fallback_install": "Install commands below are pinned to trusted version {version} by default."
259+
"title": "Provenance downgrade",
260+
"description": "An older version of this package was published with provenance or trusted publishing. This version was published without it.",
261+
"fallback_install": "Install commands below are pinned to version {version}, which was published with a stronger trust method.",
262+
"learn_more": "Learn more about provenance"
262263
},
263264
"keywords_title": "Keywords",
264265
"compatibility": "Compatibility",

lunaria/files/en-US.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,10 @@
256256
"error_loading": "Failed to load provenance details"
257257
},
258258
"security_downgrade": {
259-
"title": "Security downgrade detected",
260-
"description": "This package has been released using a stronger, more secure publishing method before. The version you are viewing was published using a weaker or less trusted method. Treat this as a potential supply-chain compromise until verified.",
261-
"fallback_install": "Install commands below are pinned to trusted version {version} by default."
259+
"title": "Provenance downgrade",
260+
"description": "An older version of this package was published with provenance or trusted publishing. This version was published without it.",
261+
"fallback_install": "Install commands below are pinned to version {version}, which was published with a stronger trust method.",
262+
"learn_more": "Learn more about provenance"
262263
},
263264
"keywords_title": "Keywords",
264265
"compatibility": "Compatibility",

0 commit comments

Comments
 (0)