feat: add card layout controls to extension popup
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -28,6 +28,27 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Card Layout</h2>
|
||||
<label class="toggle-row">
|
||||
<span>Enable card layout</span>
|
||||
<input type="checkbox" id="cardLayout">
|
||||
</label>
|
||||
<label for="cardBackground">Background Style</label>
|
||||
<select id="cardBackground">
|
||||
<option value="reddit">Reddit Default</option>
|
||||
<option value="shadcn">shadcn Style</option>
|
||||
</select>
|
||||
<label for="cardGap">Card Spacing</label>
|
||||
<select id="cardGap">
|
||||
<option value="8">8px</option>
|
||||
<option value="12">12px</option>
|
||||
<option value="16">16px</option>
|
||||
<option value="24">24px</option>
|
||||
<option value="32">32px</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Light Mode Colors</h2>
|
||||
<fieldset>
|
||||
|
||||
@@ -70,6 +70,9 @@
|
||||
document.getElementById("enabled").checked = settings.enabled;
|
||||
document.getElementById("badgeLayout").checked = settings.badgeLayout;
|
||||
document.getElementById("darkMode").value = settings.darkMode;
|
||||
document.getElementById("cardLayout").checked = settings.cardLayout;
|
||||
document.getElementById("cardBackground").value = settings.cardBackground;
|
||||
document.getElementById("cardGap").value = String(settings.cardGap);
|
||||
|
||||
COLOR_KEYS.forEach(function (key) {
|
||||
var el = document.getElementById(key);
|
||||
@@ -283,6 +286,9 @@
|
||||
enabled: document.getElementById("enabled").checked,
|
||||
badgeLayout: document.getElementById("badgeLayout").checked,
|
||||
darkMode: document.getElementById("darkMode").value,
|
||||
cardLayout: document.getElementById("cardLayout").checked,
|
||||
cardBackground: document.getElementById("cardBackground").value,
|
||||
cardGap: parseInt(document.getElementById("cardGap").value, 10),
|
||||
subredditColors: collectSubredditOverrides(),
|
||||
};
|
||||
|
||||
@@ -305,6 +311,9 @@
|
||||
document.getElementById("enabled").addEventListener("change", saveFromControls);
|
||||
document.getElementById("badgeLayout").addEventListener("change", saveFromControls);
|
||||
document.getElementById("darkMode").addEventListener("change", saveFromControls);
|
||||
document.getElementById("cardLayout").addEventListener("change", saveFromControls);
|
||||
document.getElementById("cardBackground").addEventListener("change", saveFromControls);
|
||||
document.getElementById("cardGap").addEventListener("change", saveFromControls);
|
||||
|
||||
COLOR_KEYS.forEach(function (key) {
|
||||
var el = document.getElementById(key);
|
||||
|
||||
Reference in New Issue
Block a user