Skip to content

Commit a9cb03b

Browse files
committed
feat: acrylic theme
1 parent c9b66f6 commit a9cb03b

3 files changed

Lines changed: 646 additions & 66 deletions

File tree

src/Auto-Image.js

Lines changed: 54 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,27 @@ import {
227227
'pixel-blink': true,
228228
},
229229
},
230+
'Acrylic': {
231+
primary: '#00000080',
232+
secondary: '#00000040',
233+
accent: 'rgba(0,0,0,0.75)',
234+
text: '#ffffff',
235+
highlight: '#ffffff',
236+
success: '#00e500',
237+
error: '#e50000',
238+
warning: '#e5e500',
239+
fontFamily: "'Inter', 'Apple Color Emoji'",
240+
borderRadius: '10px',
241+
borderStyle: 'solid',
242+
borderWidth: '0px',
243+
boxShadow: 'none',
244+
backdropFilter: 'blur(20px)',
245+
animations: {
246+
glow: false,
247+
scanline: false,
248+
'pixel-blink': false,
249+
},
250+
}
230251
},
231252
currentTheme: 'Classic Autobot',
232253
PAINT_UNAVAILABLE: true,
@@ -279,20 +300,17 @@ import {
279300
*/
280301
function applyTheme() {
281302
const theme = getCurrentTheme();
282-
// Toggle theme class on documentElement so CSS vars cascade to our UI
283-
document.documentElement.classList.remove(
284-
'wplace-theme-classic',
285-
'wplace-theme-classic-light',
286-
'wplace-theme-neon'
287-
);
288-
289303
// Map CONFIG theme names to CSS class names
290304
const themeClassMapping = {
291305
'Classic Autobot': 'wplace-theme-classic',
292306
'Classic Light': 'wplace-theme-classic-light',
293307
'Neon Retro': 'wplace-theme-neon',
308+
'Acrylic': 'wplace-theme-acrylic',
294309
};
295310

311+
// Toggle theme class on documentElement so CSS vars cascade to our UI
312+
document.documentElement.classList.remove(...Object.values(themeClassMapping));
313+
296314
const themeClass =
297315
themeClassMapping[CONFIG.currentTheme] || 'wplace-theme-classic';
298316

@@ -311,6 +329,7 @@ import {
311329
'Classic Autobot': 'classic',
312330
'Classic Light': 'classic-light',
313331
'Neon Retro': 'neon',
332+
'Acrylic': 'acrylic',
314333
};
315334

316335
const themeFileName = themeFileMapping[themeName] || 'classic';
@@ -4231,15 +4250,6 @@ import {
42314250
</div>
42324251
</div>
42334252
4234-
<!-- Automation Section -->
4235-
<div class="wplace-settings-section">
4236-
<label class="wplace-settings-section-label">
4237-
<i class="fas fa-robot wplace-icon-robot"></i>
4238-
${Utils.t('automation')}
4239-
</label>
4240-
<!-- Token generator is always enabled - settings moved to Token Source above -->
4241-
</div>
4242-
42434253
<!-- Overlay Settings Section -->
42444254
<div class="wplace-settings-section">
42454255
<label class="wplace-settings-section-label">
@@ -4423,12 +4433,13 @@ import {
44234433
</div>
44244434
44254435
<!-- Speed Control Toggle -->
4426-
<label class="wplace-speed-control-toggle">
4427-
<input type="checkbox" id="enableSpeedToggle" ${
4428-
CONFIG.PAINTING_SPEED_ENABLED ? 'checked' : ''
4429-
} class="wplace-speed-checkbox"/>
4430-
<span>${Utils.t('enablePaintingSpeedLimit')}</span>
4431-
</label>
4436+
<label class="wplace-settings-toggle">
4437+
<div>
4438+
<span class="wplace-settings-toggle-title">${Utils.t('enablePaintingSpeedLimit')}</span>
4439+
<p class="wplace-settings-toggle-description">Limits concurrent paint operations to prevent performance issues and ensure smoother rendering</p>
4440+
</div>
4441+
<input type="checkbox" id="enableSpeedToggle" ${CONFIG.PAINTING_SPEED_ENABLED ? 'checked' : ''} class="wplace-speed-checkbox"/>
4442+
</label>
44324443
</div>
44334444
44344445
<!-- Coordinate Generation Section -->
@@ -4518,23 +4529,28 @@ import {
45184529
Desktop Notifications
45194530
</label>
45204531
<div class="wplace-settings-section-wrapper wplace-notifications-wrapper">
4521-
<label class="wplace-notification-toggle">
4522-
<span>${Utils.t('enableNotifications')}</span>
4523-
<input type="checkbox" id="notifEnabledToggle" ${
4524-
state.notificationsEnabled ? 'checked' : ''
4525-
} class="wplace-notification-checkbox" />
4532+
<label class="wplace-settings-toggle">
4533+
<div>
4534+
<span class="wplace-settings-toggle-title">${Utils.t('enableNotifications')}</span>
4535+
<p class="wplace-settings-toggle-description">Receive browser notifications for important events and updates</p>
4536+
</div>
4537+
<input type="checkbox" id="notifEnabledToggle" ${state.notificationsEnabled ? 'checked' : ''} class="wplace-notification-checkbox" />
45264538
</label>
4527-
<label class="wplace-notification-toggle">
4528-
<span>${Utils.t('notifyOnChargesThreshold')}</span>
4529-
<input type="checkbox" id="notifOnChargesToggle" ${
4530-
state.notifyOnChargesReached ? 'checked' : ''
4531-
} class="wplace-notification-checkbox" />
4539+
4540+
<label class="wplace-settings-toggle">
4541+
<div>
4542+
<span class="wplace-settings-toggle-title">${Utils.t('notifyOnChargesThreshold')}</span>
4543+
<p class="wplace-settings-toggle-description">Get notified when your charges reach threshold limits</p>
4544+
</div>
4545+
<input type="checkbox" id="notifOnChargesToggle" ${state.notifyOnChargesReached ? 'checked' : ''} class="wplace-notification-checkbox" />
45324546
</label>
4533-
<label class="wplace-notification-toggle">
4534-
<span>${Utils.t('onlyWhenNotFocused')}</span>
4535-
<input type="checkbox" id="notifOnlyUnfocusedToggle" ${
4536-
state.notifyOnlyWhenUnfocused ? 'checked' : ''
4537-
} class="wplace-notification-checkbox" />
4547+
4548+
<label class="wplace-settings-toggle">
4549+
<div>
4550+
<span class="wplace-settings-toggle-title">${Utils.t('onlyWhenNotFocused')}</span>
4551+
<p class="wplace-settings-toggle-description">Only show notifications when the browser tab is not in focus</p>
4552+
</div>
4553+
<input type="checkbox" id="notifOnlyUnfocusedToggle" ${state.notifyOnlyWhenUnfocused ? 'checked' : ''} class="wplace-notification-checkbox" />
45384554
</label>
45394555
<div class="wplace-notification-interval">
45404556
<span>${Utils.t('repeatEvery')}</span>
@@ -4545,7 +4561,7 @@ import {
45454561
<button id="notifRequestPermBtn" class="wplace-btn wplace-btn-secondary wplace-notification-perm-btn"><i class="fas fa-unlock"></i><span>${Utils.t(
45464562
'grantPermission'
45474563
)}</span></button>
4548-
<button id="notifTestBtn" class="wplace-btn wplace-notification-test-btn"><i class="fas fa-bell"></i><span>${Utils.t(
4564+
<button id="notifTestBtn" class="wplace-btn wplace-btn-secondary wplace-notification-test-btn"><i class="fas fa-bell"></i><span>${Utils.t(
45494565
'test'
45504566
)}</span></button>
45514567
</div>

src/auto-image-styles.css

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2200,34 +2200,6 @@
22002200
transition: all 0.2s ease;
22012201
}
22022202

2203-
/* Theme and language selects */
2204-
#themeSelect:hover,
2205-
#languageSelect:hover {
2206-
border-color: rgba(255, 255, 255, 0.4);
2207-
background: rgba(255, 255, 255, 0.2);
2208-
transform: translateY(-1px);
2209-
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
2210-
}
2211-
2212-
#themeSelect:focus,
2213-
#languageSelect:focus {
2214-
border-color: #4facfe;
2215-
box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.3);
2216-
}
2217-
2218-
#themeSelect option,
2219-
#languageSelect option {
2220-
background: #2d3748;
2221-
color: white;
2222-
padding: 10px;
2223-
border-radius: 6px;
2224-
}
2225-
2226-
#themeSelect option:hover,
2227-
#languageSelect option:hover {
2228-
background: #4a5568;
2229-
}
2230-
22312203
/* Dragging state */
22322204
.wplace-dragging {
22332205
opacity: 0.9;

0 commit comments

Comments
 (0)