mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-02 10:10:28 +08:00
36 lines
671 B
Svelte
36 lines
671 B
Svelte
<script lang="ts">
|
|
interface Props {
|
|
fullPath: string;
|
|
}
|
|
|
|
const { fullPath }: Props = $props();
|
|
</script>
|
|
|
|
<style>
|
|
.container {
|
|
white-space: nowrap;
|
|
-webkit-touch-callout: initial;
|
|
-webkit-user-select: text;
|
|
user-select: text;
|
|
}
|
|
.path {
|
|
color: var(--color-fill-gray);
|
|
font-weight: var(--font-weight-regular);
|
|
}
|
|
.filename {
|
|
font-weight: var(--font-weight-semibold);
|
|
}
|
|
</style>
|
|
|
|
<!-- prettier-ignore -->
|
|
<span class="txt-small container">
|
|
<span class="path">
|
|
{fullPath
|
|
.match(/^.*\/|/)
|
|
?.values()
|
|
.next().value}
|
|
</span><span class="filename">
|
|
{fullPath.split("/").slice(-1)}
|
|
</span>
|
|
</span>
|