mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-28 23:52:09 -04:00
Sidebar + theme: drop hamburger cycle no-op branch; add brandMixTo CSS var to themes for logo-gradient end color
This commit is contained in:
@@ -103,7 +103,6 @@ export function initSidebarLayout(Storage, opts) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Hamburger cycles: full sidebar → mini → off → full
|
// Hamburger cycles: full sidebar → mini → off → full
|
||||||
// Shift-click swaps sidebar side
|
|
||||||
let _userToggledSidebar = false;
|
let _userToggledSidebar = false;
|
||||||
let _wasAutoCollapsed = false;
|
let _wasAutoCollapsed = false;
|
||||||
|
|
||||||
@@ -122,8 +121,7 @@ export function initSidebarLayout(Storage, opts) {
|
|||||||
if (window.innerWidth < 768 && cc && cc.classList.contains('compare-active')) return;
|
if (window.innerWidth < 768 && cc && cc.classList.contains('compare-active')) return;
|
||||||
_userToggledSidebar = true;
|
_userToggledSidebar = true;
|
||||||
// Optionally place the sidebar on a specific edge (the swipe gesture passes
|
// Optionally place the sidebar on a specific edge (the swipe gesture passes
|
||||||
// the direction). Persist it + re-anchor the doc panel, same as a
|
// the direction). Persist it + re-anchor the doc panel.
|
||||||
// shift-click on the hamburger.
|
|
||||||
if (side === 'left' || side === 'right') {
|
if (side === 'left' || side === 'right') {
|
||||||
const wantRight = side === 'right';
|
const wantRight = side === 'right';
|
||||||
if (sidebar.classList.contains('right-side') !== wantRight) {
|
if (sidebar.classList.contains('right-side') !== wantRight) {
|
||||||
@@ -143,13 +141,6 @@ export function initSidebarLayout(Storage, opts) {
|
|||||||
hamburgerBtn.addEventListener('click', (e) => {
|
hamburgerBtn.addEventListener('click', (e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
const sidebar = document.getElementById('sidebar');
|
const sidebar = document.getElementById('sidebar');
|
||||||
if (e.shiftKey) {
|
|
||||||
sidebar.classList.toggle('right-side');
|
|
||||||
Storage.set(Storage.KEYS.SIDEBAR_SIDE, sidebar.classList.contains('right-side') ? 'right' : 'left');
|
|
||||||
syncRailSide();
|
|
||||||
if (documentModule && documentModule.swapSide) documentModule.swapSide();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_userToggledSidebar = true;
|
_userToggledSidebar = true;
|
||||||
const isSidebarVisible = !sidebar.classList.contains('hidden');
|
const isSidebarVisible = !sidebar.classList.contains('hidden');
|
||||||
|
|||||||
+3
-1
@@ -26,7 +26,7 @@ export const THEMES = {
|
|||||||
gpt: { bg:'#212121', fg:'#ececec', panel:'#171717', border:'#424242', red:'#949494',
|
gpt: { bg:'#212121', fg:'#ececec', panel:'#171717', border:'#424242', red:'#949494',
|
||||||
advanced: { sendBtnBg: '#949494', sendBtnHover: '#7f7f7f',
|
advanced: { sendBtnBg: '#949494', sendBtnHover: '#7f7f7f',
|
||||||
userBubbleBg: '#2f2f2f', aiBubbleBg: '#171717',
|
userBubbleBg: '#2f2f2f', aiBubbleBg: '#171717',
|
||||||
inputBg: '#2f2f2f' } },
|
inputBg: '#2f2f2f', brandColor: '#ffffff', brandMixTo: '#ffffff' } },
|
||||||
claude: { bg:'#262624', fg:'#f5f4f0', panel:'#30302e', border:'#4a4a47', red:'#c6613f' },
|
claude: { bg:'#262624', fg:'#f5f4f0', panel:'#30302e', border:'#4a4a47', red:'#c6613f' },
|
||||||
cute: { bg:'#fff0f5', fg:'#d4608a', panel:'#fff8fa', border:'#f0c0d0', red:'#ff6b9d' },
|
cute: { bg:'#fff0f5', fg:'#d4608a', panel:'#fff8fa', border:'#f0c0d0', red:'#ff6b9d' },
|
||||||
};
|
};
|
||||||
@@ -184,6 +184,7 @@ const ADV_KEYS = [
|
|||||||
{ key: 'bubbleBorder', css: '--bubble-border', label: 'Border Chat Bubble', group: 'Chat Bubbles' },
|
{ key: 'bubbleBorder', css: '--bubble-border', label: 'Border Chat Bubble', group: 'Chat Bubbles' },
|
||||||
{ key: 'sidebarBg', css: '--sidebar-bg', label: 'Sidebar Bg', group: 'Sidebar' },
|
{ key: 'sidebarBg', css: '--sidebar-bg', label: 'Sidebar Bg', group: 'Sidebar' },
|
||||||
{ key: 'brandColor', css: '--brand-color', label: 'Odysseus Logo', group: 'Sidebar' },
|
{ key: 'brandColor', css: '--brand-color', label: 'Odysseus Logo', group: 'Sidebar' },
|
||||||
|
{ key: 'brandMixTo', css: '--brand-mix-to', label: 'Logo Gradient End', group: 'Sidebar' },
|
||||||
{ key: 'hamburgerColor', css: '--hamburger-color', label: 'Hamburger Menu', group: 'Sidebar' },
|
{ key: 'hamburgerColor', css: '--hamburger-color', label: 'Hamburger Menu', group: 'Sidebar' },
|
||||||
{ key: 'inputBg', css: '--input-bg', label: 'Input Bg', group: 'Chat Input / Prompt Area' },
|
{ key: 'inputBg', css: '--input-bg', label: 'Input Bg', group: 'Chat Input / Prompt Area' },
|
||||||
{ key: 'inputBorder', css: '--input-border', label: 'Input Border', group: 'Chat Input / Prompt Area' },
|
{ key: 'inputBorder', css: '--input-border', label: 'Input Border', group: 'Chat Input / Prompt Area' },
|
||||||
@@ -203,6 +204,7 @@ function computeAdvancedDefaults(colors) {
|
|||||||
bubbleBorder: colors.border,
|
bubbleBorder: colors.border,
|
||||||
sidebarBg: colors.panel,
|
sidebarBg: colors.panel,
|
||||||
brandColor: red,
|
brandColor: red,
|
||||||
|
brandMixTo: colors.fg,
|
||||||
hamburgerColor: colors.fg,
|
hamburgerColor: colors.fg,
|
||||||
inputBg: colors.panel,
|
inputBg: colors.panel,
|
||||||
inputBorder: colors.border,
|
inputBorder: colors.border,
|
||||||
|
|||||||
Reference in New Issue
Block a user