Skip to content

Commit 47f7d1a

Browse files
committed
feat: add link column
1 parent 6db65ed commit 47f7d1a

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/plugin.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ function generateHTML(results: Result[], root: string) {
114114
<tr>
115115
<th>File</th>
116116
<th>Transform mode</th>
117+
<th>Link</th>
117118
</tr>
118119
</thead>
119120
@@ -128,6 +129,11 @@ function generateHTML(results: Result[], root: string) {
128129
<td>
129130
${result.ssr ? "SSR" : "Web"}
130131
</td>
132+
<td class="center">
133+
<a title="Open in source-map-visualization" target="_blank" href="https://evanw.github.io/source-map-visualization#${result.hash}">
134+
<svg class="icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g data-name="Layer 2"><g data-name="external-link"><rect width="24" height="24" opacity="0"/><path d="M20 11a1 1 0 0 0-1 1v6a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h6a1 1 0 0 0 0-2H6a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1z"/><path d="M16 5h1.58l-6.29 6.28a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0L19 6.42V8a1 1 0 0 0 1 1 1 1 0 0 0 1-1V4a1 1 0 0 0-1-1h-4a1 1 0 0 0 0 2z"/></g></g></svg>
135+
</a>
136+
</td>
131137
</tr>
132138
`.trim()).join("\n")}
133139
</tbody>

src/styles.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@ td {
9595
padding: 1.5rem 1rem;
9696
}
9797

98+
.center {
99+
text-align: center;
100+
}
101+
102+
svg.icon {
103+
fill: var(--text);
104+
height: 2rem;
105+
width: 2rem;
106+
}
107+
98108
iframe {
99109
height: 100%;
100110
margin: 1rem;

0 commit comments

Comments
 (0)