Add 260+ Claude Code skills from skills.sh
Complete collection of AI agent skills including: - Frontend Development (Vue, React, Next.js, Three.js) - Backend Development (NestJS, FastAPI, Node.js) - Mobile Development (React Native, Expo) - Testing (E2E, frontend, webapp) - DevOps (GitHub Actions, CI/CD) - Marketing (SEO, copywriting, analytics) - Security (binary analysis, vulnerability scanning) - And many more... Synchronized from: https://skills.sh/ Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
23
dev-browser/extension/entrypoints/popup/index.html
Normal file
23
dev-browser/extension/entrypoints/popup/index.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Dev Browser</title>
|
||||
<link rel="stylesheet" href="./style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="popup">
|
||||
<h1>Dev Browser</h1>
|
||||
<div class="toggle-row">
|
||||
<label class="toggle">
|
||||
<input type="checkbox" id="active-toggle" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
<span id="status-text">Inactive</span>
|
||||
</div>
|
||||
<p id="connection-status" class="connection-status"></p>
|
||||
</div>
|
||||
<script type="module" src="./main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
52
dev-browser/extension/entrypoints/popup/main.ts
Normal file
52
dev-browser/extension/entrypoints/popup/main.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import type { GetStateMessage, SetStateMessage, StateResponse } from "../../utils/types";
|
||||
|
||||
const toggle = document.getElementById("active-toggle") as HTMLInputElement;
|
||||
const statusText = document.getElementById("status-text") as HTMLSpanElement;
|
||||
const connectionStatus = document.getElementById("connection-status") as HTMLParagraphElement;
|
||||
|
||||
function updateUI(state: StateResponse): void {
|
||||
toggle.checked = state.isActive;
|
||||
statusText.textContent = state.isActive ? "Active" : "Inactive";
|
||||
|
||||
if (state.isActive) {
|
||||
connectionStatus.textContent = state.isConnected ? "Connected to relay" : "Connecting...";
|
||||
connectionStatus.className = state.isConnected
|
||||
? "connection-status connected"
|
||||
: "connection-status connecting";
|
||||
} else {
|
||||
connectionStatus.textContent = "";
|
||||
connectionStatus.className = "connection-status";
|
||||
}
|
||||
}
|
||||
|
||||
function refreshState(): void {
|
||||
chrome.runtime.sendMessage<GetStateMessage, StateResponse>({ type: "getState" }, (response) => {
|
||||
if (response) {
|
||||
updateUI(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Load initial state
|
||||
refreshState();
|
||||
|
||||
// Poll for state updates while popup is open
|
||||
const pollInterval = setInterval(refreshState, 1000);
|
||||
|
||||
// Clean up on popup close
|
||||
window.addEventListener("unload", () => {
|
||||
clearInterval(pollInterval);
|
||||
});
|
||||
|
||||
// Handle toggle changes
|
||||
toggle.addEventListener("change", () => {
|
||||
const isActive = toggle.checked;
|
||||
chrome.runtime.sendMessage<SetStateMessage, StateResponse>(
|
||||
{ type: "setState", isActive },
|
||||
(response) => {
|
||||
if (response) {
|
||||
updateUI(response);
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
96
dev-browser/extension/entrypoints/popup/style.css
Normal file
96
dev-browser/extension/entrypoints/popup/style.css
Normal file
@@ -0,0 +1,96 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
font-size: 14px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.popup {
|
||||
width: 200px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 16px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.toggle-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
#status-text {
|
||||
font-weight: 500;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* Toggle switch */
|
||||
.toggle {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 44px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.toggle input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
transition: 0.2s;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
.slider::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
left: 3px;
|
||||
bottom: 3px;
|
||||
background-color: white;
|
||||
transition: 0.2s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
input:checked + .slider {
|
||||
background-color: #4caf50;
|
||||
}
|
||||
|
||||
input:checked + .slider::before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
/* Connection status */
|
||||
.connection-status {
|
||||
margin-top: 12px;
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
min-height: 16px;
|
||||
}
|
||||
|
||||
.connection-status.connected {
|
||||
color: #4caf50;
|
||||
}
|
||||
|
||||
.connection-status.connecting {
|
||||
color: #ff9800;
|
||||
}
|
||||
Reference in New Issue
Block a user