Skip to content

Commit 7697ce8

Browse files
committed
Add issue and support links to the popup
1 parent 1183f3c commit 7697ce8

2 files changed

Lines changed: 88 additions & 0 deletions

File tree

extension/src/popup.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ p[data-detected='true']::before {
5858

5959
.details {
6060
margin-top: 0.4rem;
61+
color: var(--lighter-dark);
6162
}
6263

6364
.versions {
@@ -67,6 +68,7 @@ p[data-detected='true']::before {
6768
ul {
6869
margin: 0;
6970
margin-left: 2ch;
71+
margin-top: 0.4rem;
7072
color: var(--lighter-dark);
7173
padding: 0;
7274
list-style: none;
@@ -75,3 +77,37 @@ li::before {
7577
content: '- ';
7678
margin-left: -2ch;
7779
}
80+
81+
.external-links {
82+
display: flex;
83+
flex-direction: column;
84+
gap: 0.4rem;
85+
}
86+
.external-links a {
87+
margin: 0 -0.4rem;
88+
padding: 0.2rem 0.4rem;
89+
transition: background-color 0.2s;
90+
display: flex;
91+
align-items: center;
92+
gap: 0.4rem;
93+
}
94+
95+
.external-links .icon {
96+
width: 0.8rem;
97+
height: 0.8rem;
98+
margin-bottom: 2px;
99+
}
100+
.external-links .icon path {
101+
stroke-width: 12;
102+
}
103+
104+
.issue-link:hover {
105+
background-color: #fb923c20;
106+
color: #f97316;
107+
text-decoration: none;
108+
}
109+
.support-link:hover {
110+
background-color: #ec489920;
111+
color: #ec4899;
112+
text-decoration: none;
113+
}

extension/src/popup.tsx

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,59 @@ const App: s.Component = () => {
8282
</div>
8383
)}
8484
</s.Show>
85+
<div class="external-links">
86+
<a
87+
href="https://github.com/thetarnav/solid-devtools/issues"
88+
target="_blank"
89+
class="issue-link"
90+
>
91+
<Icon_Bug />
92+
Report an Issue
93+
</a>
94+
<a
95+
href="https://github.com/sponsors/thetarnav"
96+
target="_blank"
97+
class="support-link"
98+
>
99+
<Icon_Heart />
100+
Support the Project
101+
</a>
102+
</div>
85103
</>
86104
}
87105

106+
function Icon_Heart() {
107+
return <svg
108+
class="icon"
109+
xmlns="http://www.w3.org/2000/svg"
110+
viewBox="0 0 256 256"
111+
fill="none">
112+
<path
113+
fill="none"
114+
stroke="currentColor"
115+
stroke-linecap="round"
116+
stroke-linejoin="round"
117+
stroke-width="16"
118+
d="M178,40c-20.65,0-38.73,8.88-50,23.89C116.73,48.88,98.65,40,78,40a62.07,62.07,0,0,0-62,62c0,70,103.79,126.66,108.21,129a8,8,0,0,0,7.58,0C136.21,228.66,240,172,240,102A62.07,62.07,0,0,0,178,40ZM128,214.8C109.74,204.16,32,155.69,32,102A46.06,46.06,0,0,1,78,56c19.45,0,35.78,10.36,42.6,27a8,8,0,0,0,14.8,0c6.82-16.67,23.15-27,42.6-27a46.06,46.06,0,0,1,46,46C224,155.61,146.24,204.15,128,214.8Z"
119+
/>
120+
</svg>
121+
}
122+
123+
function Icon_Bug() {
124+
return <svg
125+
class="icon"
126+
xmlns="http://www.w3.org/2000/svg"
127+
viewBox="0 0 256 256"
128+
fill="none">
129+
<path
130+
fill="none"
131+
stroke="currentColor"
132+
stroke-linecap="round"
133+
stroke-linejoin="round"
134+
stroke-width="16"
135+
d="M144,92a12,12,0,1,1,12,12A12,12,0,0,1,144,92ZM100,80a12,12,0,1,0,12,12A12,12,0,0,0,100,80Zm116,64A87.76,87.76,0,0,1,213,167l22.24,9.72A8,8,0,0,1,232,192a7.89,7.89,0,0,1-3.2-.67L207.38,182a88,88,0,0,1-158.76,0L27.2,191.33A7.89,7.89,0,0,1,24,192a8,8,0,0,1-3.2-15.33L43,167A87.76,87.76,0,0,1,40,144v-8H16a8,8,0,0,1,0-16H40v-8a87.76,87.76,0,0,1,3-23L20.8,79.33a8,8,0,1,1,6.4-14.66L48.62,74a88,88,0,0,1,158.76,0l21.42-9.36a8,8,0,0,1,6.4,14.66L213,89.05a87.76,87.76,0,0,1,3,23v8h24a8,8,0,0,1,0,16H216ZM56,120H200v-8a72,72,0,0,0-144,0Zm64,95.54V136H56v8A72.08,72.08,0,0,0,120,215.54ZM200,144v-8H136v79.54A72.08,72.08,0,0,0,200,144Z"
136+
/>
137+
</svg>
138+
}
139+
88140
render(() => <App />, document.getElementById('root')!)

0 commit comments

Comments
 (0)