mirror of https://github.com/garrytan/gstack.git
feat: move cookies button to quick actions toolbar
Cookies now sits next to Cleanup and Screenshot as a primary action
button (🍪 Cookies) instead of buried in the footer. Same behavior,
more discoverable.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7d54453eeb
commit
9ab2b9a745
|
|
@ -1630,13 +1630,13 @@ describe('cookie import button (sidebar)', () => {
|
||||||
const html = fs.readFileSync(path.join(ROOT, '..', 'extension', 'sidepanel.html'), 'utf-8');
|
const html = fs.readFileSync(path.join(ROOT, '..', 'extension', 'sidepanel.html'), 'utf-8');
|
||||||
const js = fs.readFileSync(path.join(ROOT, '..', 'extension', 'sidepanel.js'), 'utf-8');
|
const js = fs.readFileSync(path.join(ROOT, '..', 'extension', 'sidepanel.js'), 'utf-8');
|
||||||
|
|
||||||
test('sidebar footer has cookies button', () => {
|
test('quick actions toolbar has cookies button', () => {
|
||||||
expect(html).toContain('id="copy-cookies"');
|
expect(html).toContain('id="chat-cookies-btn"');
|
||||||
expect(html).toContain('cookies');
|
expect(html).toContain('Cookies');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('cookies button navigates to cookie-picker', () => {
|
test('cookies button navigates to cookie-picker', () => {
|
||||||
expect(js).toContain("'copy-cookies'");
|
expect(js).toContain("'chat-cookies-btn'");
|
||||||
expect(js).toContain('cookie-picker');
|
expect(js).toContain('cookie-picker');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,7 @@
|
||||||
<div class="quick-actions" id="quick-actions">
|
<div class="quick-actions" id="quick-actions">
|
||||||
<button id="chat-cleanup-btn" class="quick-action-btn" title="Remove ads, banners, popups">🧹 Cleanup</button>
|
<button id="chat-cleanup-btn" class="quick-action-btn" title="Remove ads, banners, popups">🧹 Cleanup</button>
|
||||||
<button id="chat-screenshot-btn" class="quick-action-btn" title="Take a screenshot">📸 Screenshot</button>
|
<button id="chat-screenshot-btn" class="quick-action-btn" title="Take a screenshot">📸 Screenshot</button>
|
||||||
|
<button id="chat-cookies-btn" class="quick-action-btn" title="Import cookies from your browser">🍪 Cookies</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Command Bar -->
|
<!-- Command Bar -->
|
||||||
|
|
@ -156,7 +157,6 @@
|
||||||
<button class="debug-toggle" id="debug-toggle" title="Toggle debug panels">debug</button>
|
<button class="debug-toggle" id="debug-toggle" title="Toggle debug panels">debug</button>
|
||||||
<button class="footer-btn" id="clear-chat" title="Clear chat">clear</button>
|
<button class="footer-btn" id="clear-chat" title="Clear chat">clear</button>
|
||||||
<button class="footer-btn" id="reload-sidebar" title="Reload sidebar">reload</button>
|
<button class="footer-btn" id="reload-sidebar" title="Reload sidebar">reload</button>
|
||||||
<button class="footer-btn" id="copy-cookies" title="Import cookies from your browser">cookies</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-right">
|
<div class="footer-right">
|
||||||
<span class="dot" id="footer-dot"></span>
|
<span class="dot" id="footer-dot"></span>
|
||||||
|
|
|
||||||
|
|
@ -660,7 +660,7 @@ document.getElementById('reload-sidebar').addEventListener('click', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// ─── Copy Cookies ───────────────────────────────────────────────
|
// ─── Copy Cookies ───────────────────────────────────────────────
|
||||||
document.getElementById('copy-cookies').addEventListener('click', async () => {
|
document.getElementById('chat-cookies-btn').addEventListener('click', async () => {
|
||||||
if (!serverUrl) return;
|
if (!serverUrl) return;
|
||||||
// Navigate the browser to the cookie picker page hosted by the browse server
|
// Navigate the browser to the cookie picker page hosted by the browse server
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue