Skip to content

Commit b4a8824

Browse files
committed
feat(dependencies): add line-through to not applicable dependencies
1 parent 2528e84 commit b4a8824

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/helpers/color.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const predefinedColorMap: Readonly<Record<string, string>> = {
2626
"workbox": "#ee810f"
2727
};
2828

29-
export function composeHashColorFromString(name: string): string {
29+
export function composeHashColor(name: string): string {
3030
const mapKey = Object.keys(predefinedColorMap).find((key) => name.includes(key));
3131
if (mapKey) return predefinedColorMap[mapKey];
3232

src/pages/dependencies.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<button
77
v-for="dep in [...excludedDependencies].sort()"
88
:key="dep"
9-
:style="{ color: composeHashColorFromString(dep) }"
9+
:style="{ color: composeHashColor(dep), textDecoration: dependencies.includes(dep) ? '' : 'line-through' }"
1010
class="icon chip"
1111
@click="showDependency(dep)"
1212
>
@@ -33,7 +33,7 @@
3333
</thead>
3434
<tbody>
3535
<tr v-for="dep in dependencies.filter((dep) => !excludedDependencies.has(dep))" :key="dep">
36-
<td :title="dep" :style="{ color: composeHashColorFromString(dep) }" class="chip">
36+
<td :title="dep" :style="{ color: composeHashColor(dep) }" class="chip">
3737
<button class="icon" type="button" title="exclude dependency" @click="hideDependency(dep)">
3838
<icon-x />
3939
</button>
@@ -61,7 +61,7 @@
6161
import { IconX } from "@tabler/icons-vue";
6262
import { coerce, compare, diff, type ReleaseType } from "semver";
6363
import { useDependencyTable } from "@/composable/useDependencyTable";
64-
import { composeHashColorFromString } from "@/helpers/color";
64+
import { composeHashColor } from "@/helpers/color";
6565
import { useExcludedDependenciesStore } from "@/store/excluded-dependencies";
6666
import { useLatestVersionsStore } from "@/store/latest-versions";
6767
import { useSettingsStore } from "@/store/settings";

0 commit comments

Comments
 (0)