Skip to content

Commit f5fc1b6

Browse files
authored
feat: add RTL support to PackageVulnerabilityTree (#351)
1 parent 428a020 commit f5fc1b6

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

app/components/PackageVulnerabilityTree.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ const summaryText = computed(() => {
3939
// Styling for each depth level - using accessible colors for both themes
4040
const depthStyles = {
4141
root: {
42-
bg: 'bg-amber-500/5 border-l-2 border-l-amber-600',
42+
bg: 'bg-amber-500/5 border-is-2 border-is-amber-600',
4343
text: 'text-fg',
4444
},
4545
direct: {
46-
bg: 'bg-amber-500/5 border-l-2 border-l-amber-500',
46+
bg: 'bg-amber-500/5 border-is-2 border-is-amber-500',
4747
text: 'text-fg-muted',
4848
},
4949
transitive: {
50-
bg: 'bg-amber-500/5 border-l-2 border-l-amber-400',
50+
bg: 'bg-amber-500/5 border-is-2 border-is-amber-400',
5151
text: 'text-fg-muted',
5252
},
5353
} as const
@@ -72,13 +72,13 @@ function getDepthStyle(depth: string | undefined) {
7272
<!-- Header -->
7373
<button
7474
type="button"
75-
class="w-full flex items-center justify-between gap-3 px-4 py-3 text-left transition-colors duration-200 hover:bg-white/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-fg/50"
75+
class="w-full flex items-center justify-between gap-3 px-4 py-3 text-start transition-colors duration-200 hover:bg-white/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-fg/50"
7676
:aria-expanded="isExpanded"
7777
aria-controls="vuln-tree-details"
7878
@click="isExpanded = !isExpanded"
7979
>
8080
<div class="flex items-center gap-2 min-w-0">
81-
<span class="i-carbon-warning-alt w-4 h-4 shrink-0" aria-hidden="true" />
81+
<span class="i-carbon:warning-alt w-4 h-4 shrink-0" aria-hidden="true" />
8282
<span class="font-mono text-sm font-medium truncate">
8383
{{
8484
$t(
@@ -96,7 +96,7 @@ function getDepthStyle(depth: string | undefined) {
9696
<div class="flex items-center gap-2 shrink-0">
9797
<span class="text-xs opacity-80 hidden sm:inline">{{ summaryText }}</span>
9898
<span
99-
class="i-carbon-chevron-down w-4 h-4 transition-transform duration-200"
99+
class="i-carbon:chevron-down w-4 h-4 transition-transform duration-200"
100100
:class="{ 'rotate-180': isExpanded }"
101101
aria-hidden="true"
102102
/>
@@ -181,7 +181,7 @@ function getDepthStyle(depth: string | undefined) {
181181
v-if="vulnTree!.failedQueries"
182182
class="px-4 py-2 text-xs text-fg-subtle border-t border-border flex items-center gap-2"
183183
>
184-
<span class="i-carbon-warning w-3 h-3" aria-hidden="true" />
184+
<span class="i-carbon:warning w-3 h-3" aria-hidden="true" />
185185
<span>{{ $t('package.vulnerabilities.packages_failed', vulnTree!.failedQueries) }}</span>
186186
</div>
187187
</div>
@@ -196,7 +196,7 @@ function getDepthStyle(depth: string | undefined) {
196196
<section v-else-if="status === 'error'" aria-labelledby="vuln-tree-error">
197197
<div class="rounded-lg border border-border bg-bg-subtle px-4 py-3">
198198
<div class="flex items-center gap-2">
199-
<span class="i-carbon-warning w-4 h-4 text-fg-subtle" aria-hidden="true" />
199+
<span class="i-carbon:warning w-4 h-4 text-fg-subtle" aria-hidden="true" />
200200
<span class="text-sm text-fg-muted">
201201
{{ $t('package.vulnerabilities.scan_failed') }}
202202
</span>

0 commit comments

Comments
 (0)