feat: initial release of Brightwheel Memories & Reports Exporter Chrome extension
This commit is contained in:
+186
@@ -0,0 +1,186 @@
|
||||
:root {
|
||||
--primary-color: #FF6B35;
|
||||
--primary-hover: #E85820;
|
||||
--primary-gradient: linear-gradient(135deg, #FF6B35 0%, #FF8E53 100%);
|
||||
--bg-color: #FAFAF9;
|
||||
--card-bg: #FFFFFF;
|
||||
--text-main: #1C1917;
|
||||
--text-muted: #78716C;
|
||||
--border-color: #E7E5E4;
|
||||
--success-color: #10B981;
|
||||
--warning-color: #F59E0B;
|
||||
--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
width: 320px;
|
||||
background-color: var(--bg-color);
|
||||
font-family: var(--font-family);
|
||||
color: var(--text-main);
|
||||
padding: 16px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.popup-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.logo-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.logo-icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background: var(--primary-gradient);
|
||||
color: #FFFFFF;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 10px rgba(255, 107, 53, 0.25);
|
||||
}
|
||||
|
||||
.title-group h1 {
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: var(--text-main);
|
||||
letter-spacing: -0.2px;
|
||||
}
|
||||
|
||||
.badge {
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
background: #FEE2E2;
|
||||
color: #DC2626;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
display: inline-block;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.status-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 10px;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
|
||||
.status-indicator-dot {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
background-color: var(--warning-color);
|
||||
flex-shrink: 0;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.status-indicator-dot.online {
|
||||
background-color: var(--success-color);
|
||||
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
|
||||
}
|
||||
|
||||
.status-text-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.status-title {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--text-main);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.status-subtitle {
|
||||
font-size: 11px;
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.features-summary {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 10px;
|
||||
padding: 10px 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.feature-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 11.5px;
|
||||
color: #44403C;
|
||||
}
|
||||
|
||||
.feature-bullet {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.primary-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
padding: 11px 16px;
|
||||
background: var(--primary-gradient);
|
||||
color: #FFFFFF;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
font-size: 13.5px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.primary-btn:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
|
||||
}
|
||||
|
||||
.primary-btn:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
font-size: 10.5px;
|
||||
color: var(--text-muted);
|
||||
border-top: 1px dashed var(--border-color);
|
||||
padding-top: 8px;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Brightwheel Exporter</title>
|
||||
<link rel="stylesheet" href="popup.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="popup-container">
|
||||
<header class="header">
|
||||
<div class="logo-wrapper">
|
||||
<div class="logo-icon">
|
||||
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
|
||||
<polyline points="7 10 12 15 17 10"></polyline>
|
||||
<line x1="12" y1="15" x2="12" y2="3"></line>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="title-group">
|
||||
<h1>Brightwheel Exporter</h1>
|
||||
<span class="badge">v1.0</span>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="content">
|
||||
<div class="status-card" id="statusCard">
|
||||
<div class="status-indicator-dot" id="statusDot"></div>
|
||||
<div class="status-text-group">
|
||||
<div class="status-title" id="statusTitle">Checking Brightwheel...</div>
|
||||
<div class="status-subtitle" id="statusSubtitle">Connecting to active tab</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="features-summary">
|
||||
<div class="feature-item">
|
||||
<span class="feature-bullet">✨</span>
|
||||
<span>High-Res Photos & Videos with Captions</span>
|
||||
</div>
|
||||
<div class="feature-item">
|
||||
<span class="feature-bullet">📋</span>
|
||||
<span>Daily Care Logs (Meals, Naps, Potty)</span>
|
||||
</div>
|
||||
<div class="feature-item">
|
||||
<span class="feature-bullet">📦</span>
|
||||
<span>ZIP Archive + Offline Interactive Timeline</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="openDashboardBtn" class="primary-btn">
|
||||
<span>Open Exporter Dashboard</span>
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="5" y1="12" x2="19" y2="12"></line>
|
||||
<polyline points="12 5 19 12 12 19"></polyline>
|
||||
</svg>
|
||||
</button>
|
||||
</main>
|
||||
|
||||
<footer class="footer">
|
||||
<span>Runs 100% locally in your browser</span>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="popup.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,36 @@
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
const statusDot = document.getElementById('statusDot');
|
||||
const statusTitle = document.getElementById('statusTitle');
|
||||
const statusSubtitle = document.getElementById('statusSubtitle');
|
||||
const openDashboardBtn = document.getElementById('openDashboardBtn');
|
||||
|
||||
// Check active tab
|
||||
try {
|
||||
const [activeTab] = await chrome.tabs.query({ active: true, currentWindow: true });
|
||||
|
||||
if (activeTab && activeTab.url && activeTab.url.includes('schools.mybrightwheel.com')) {
|
||||
statusDot.classList.add('online');
|
||||
statusTitle.textContent = 'Brightwheel Active Tab';
|
||||
statusSubtitle.textContent = 'Logged in session detected';
|
||||
} else {
|
||||
// Check if any Brightwheel tab exists in the browser
|
||||
const bwTabs = await chrome.tabs.query({ url: 'https://schools.mybrightwheel.com/*' });
|
||||
if (bwTabs && bwTabs.length > 0) {
|
||||
statusDot.classList.add('online');
|
||||
statusTitle.textContent = 'Brightwheel Tab Found';
|
||||
statusSubtitle.textContent = 'Ready to export';
|
||||
} else {
|
||||
statusTitle.textContent = 'Brightwheel Not Open';
|
||||
statusSubtitle.textContent = 'Dashboard will open login tab';
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('Error querying tabs:', err);
|
||||
}
|
||||
|
||||
// Open Dashboard Button Handler
|
||||
openDashboardBtn.addEventListener('click', async () => {
|
||||
await chrome.runtime.sendMessage({ action: 'OPEN_DASHBOARD' });
|
||||
window.close();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user