Skip to content

Commit fa1c698

Browse files
committed
show the extension version and a link to open issues at the bottom of the sidebar
1 parent 25117b2 commit fa1c698

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.about {
2+
display: flex;
3+
flex-wrap: wrap;
4+
justify-content: center;
5+
align-items: center;
6+
gap: 0 var(--size-2);
7+
8+
a {
9+
color: var(--text-2);
10+
text-align: center;
11+
line-height: normal;
12+
}
13+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import pkg from "../../../../package.json";
2+
import styles from "./AboutExtension.module.css";
3+
4+
export default function AboutExtension() {
5+
return (
6+
<div class={styles.about}>
7+
<a
8+
href="https://github.com/ghazi-git/indexeddb-browser/releases"
9+
title="https://github.com/ghazi-git/indexeddb-browser/releases"
10+
target="_blank"
11+
>
12+
v{pkg.version}
13+
</a>
14+
<a
15+
href="https://github.com/ghazi-git/indexeddb-browser/issues"
16+
title="https://github.com/ghazi-git/indexeddb-browser/issues"
17+
target="_blank"
18+
>
19+
(Report an issue)
20+
</a>
21+
</div>
22+
);
23+
}

src/devtools/components/sidebar/Sidebar.module.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
border-inline-end: none;
3535
}
3636

37+
.sidebar > :last-child {
38+
margin-block-start: auto;
39+
padding-inline: var(--sidebar-padding-inline);
40+
}
41+
3742
.no-databases {
3843
padding-inline: var(--sidebar-padding-inline);
3944
}

src/devtools/components/sidebar/Sidebar.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Match, Show, Switch } from "solid-js";
22

33
import { useIndexedDBContext } from "@/devtools/components/indexeddb-context";
4+
import AboutExtension from "@/devtools/components/sidebar/AboutExtension";
45
import DatabaseTree from "@/devtools/components/sidebar/database-tree/DatabaseTree";
56
import { useSidebarContext } from "@/devtools/components/sidebar/sidebar-context";
67
import SidebarHeader from "@/devtools/components/sidebar/SidebarHeader";
@@ -48,6 +49,7 @@ export default function Sidebar() {
4849
)}
4950
</Match>
5051
</Switch>
52+
<AboutExtension />
5153
</aside>
5254
);
5355
}

0 commit comments

Comments
 (0)