better titlebar and fixes

This commit is contained in:
2026-01-09 20:35:45 +01:00
parent 1e85de8db6
commit e6c3320a7c
20 changed files with 472 additions and 333 deletions

View File

@@ -1,5 +1,7 @@
:root {
--titlebar-height: 40px;
--primary-glass: rgba(9, 9, 11, 0.95);
--border-color: rgba(139, 92, 246, 0.2);
}
* {
@@ -34,7 +36,7 @@ html.electron .panel-content {
margin-top: 2rem;
}
html.electron .calendar-wrapper{
html.electron .calendar-wrapper {
margin-top: 4rem;
}
@@ -47,42 +49,46 @@ html.electron .back-btn {
}
#titlebar {
display: none;
width: calc(100vw - 12px); display: none;
height: var(--titlebar-height);
background: rgba(9, 9, 11, 0.95);
background: var(--primary-glass);
color: white;
align-items: center;
justify-content: space-between;
padding: 0 12px;
padding-left: 12px;
padding-right: 0;
-webkit-app-region: drag;
user-select: none;
font-family: "Inter", system-ui, sans-serif;
border-bottom: 1px solid rgba(139, 92, 246, 0.2);
position: fixed;
top: 0;
left: 0;
width: 100vw;
z-index: 999999;
font-family: "Inter", system-ui, sans-serif;
border-bottom: 1px solid var(--border-color);
backdrop-filter: blur(12px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.title-left {
display: flex;
align-items: center !important;
align-items: center;
gap: 10px;
pointer-events: none;
}
#titlebar .app-icon {
width: 24px;
height: 24px;
width: 22px;
height: 22px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 6px;
background: rgba(139, 92, 246, 0.15);
border: 1px solid rgba(139, 92, 246, 0.3);
padding: 3px;
border-radius: 5px;
background: rgba(139, 92, 246, 0.1);
border: 1px solid rgba(139, 92, 246, 0.25);
padding: 2px;
}
#titlebar .app-icon img {
@@ -95,85 +101,19 @@ html.electron .back-btn {
font-size: 13px;
font-weight: 600;
color: rgba(255, 255, 255, 0.9);
letter-spacing: -0.2px;
letter-spacing: -0.1px;
}
.title-drag-area {
flex-grow: 1;
height: 100%;
}
.title-right {
display: flex;
height: 100%;
gap: 1px;
}
.title-right button {
-webkit-app-region: no-drag;
border: none;
background: transparent;
color: rgba(255, 255, 255, 0.7);
width: 46px;
height: 100%;
cursor: pointer;
font-size: 16px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.title-right button svg {
width: 16px;
height: 16px;
transition: transform 0.2s;
}
.title-right button:hover {
color: white;
}
.title-right button:active {
transform: scale(0.95);
}
.title-right .min:hover {
background: rgba(139, 92, 246, 0.2);
}
.title-right .max:hover {
background: rgba(34, 197, 94, 0.2);
}
.title-right .close:hover {
background: #e81123;
color: white;
}
.title-right button:hover svg {
transform: scale(1.1);
}
html.electron::-webkit-scrollbar {
width: 12px;
position: absolute;
}
html.electron::-webkit-scrollbar-track {
background: #09090b;
margin-top: var(--titlebar-height);
}
html.electron::-webkit-scrollbar-thumb {
background: rgba(139, 92, 246, 0.3);
border-radius: 6px;
border: 2px solid #09090b;
}
html.electron::-webkit-scrollbar-thumb:hover {
background: rgba(139, 92, 246, 0.5);
}
body {
margin: 0;
padding: 0;
overflow-x: hidden;
-webkit-app-region: no-drag;
}
.user-box {
@@ -181,18 +121,104 @@ body {
align-items: center;
gap: 8px;
margin-right: 12px;
padding: 4px 8px;
border-radius: 4px;
transition: background 0.2s;
cursor: default;
}
.user-box:hover {
background: rgba(255, 255, 255, 0.05);
}
.user-box img {
width: 26px;
height: 26px;
width: 24px;
height: 24px;
border-radius: 50%;
object-fit: cover;
border: 1px solid rgba(139, 92, 246, 0.3);
}
.user-box span {
font-size: 13px;
font-size: 12px;
font-weight: 500;
opacity: 0.9;
color: #e4e4e7;
}
.window-controls {
display: flex;
height: 100%;
}
.control-btn {
border: none;
background: transparent;
color: #a1a1aa;
width: 46px;
height: 100%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
outline: none;
}
.control-btn:hover {
color: white;
background: rgba(255, 255, 255, 0.05);
}
.control-btn.min:hover {
background: rgba(255, 255, 255, 0.1);
}
.control-btn.max:hover {
background: rgba(255, 255, 255, 0.1);
}
.control-btn.close:hover {
background: #e81123;
color: white;
}
.control-btn:active {
background: rgba(255, 255, 255, 0.15);
}
.control-btn.close:active {
background: #bf0f1d;
}
html.electron::-webkit-scrollbar {
width: 12px;
position: absolute;
z-index: 0;
}
html.electron::-webkit-scrollbar-track {
background: #09090b;
margin-top: var(--titlebar-height);
border-left: 1px solid rgba(255, 255, 255, 0.05);
}
html.electron::-webkit-scrollbar-thumb {
background: rgba(139, 92, 246, 0.3);
border-radius: 6px;
border: 2px solid #09090b;
background-clip: content-box;
}
html.electron::-webkit-scrollbar-thumb:hover {
background: rgba(139, 92, 246, 0.5);
border: 2px solid #09090b;
}
body {
margin: 0;
padding: 0;
overflow-x: hidden;
}
.hidden {
@@ -207,4 +233,152 @@ html.electron #room-view {
html.electron #room-view .room-layout {
height: 100%;
}
#titlebar-user-box {
position: relative;
z-index: 1000000;
}
#titlebar-dropdown {
position: absolute;
top: calc(100% + 8px);
right: 0;
width: 240px;
background: rgba(18, 18, 21, 0.98);
backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
display: none;
flex-direction: column;
overflow: hidden;
z-index: 1000001;
transform-origin: top right;
animation: titlebarDropdownSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
#titlebar-dropdown.active {
display: flex;
}
@keyframes titlebarDropdownSlide {
from { opacity: 0; transform: scale(0.95) translateY(-5px); }
to { opacity: 1; transform: scale(1) translateY(0); }
}
#titlebar-dropdown .dropdown-header {
display: flex;
align-items: center;
gap: 12px;
padding: 16px;
background: rgba(139, 92, 246, 0.05);
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
#titlebar-dropdown .dropdown-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
border: 2px solid #8b5cf6;
}
#titlebar-dropdown .dropdown-user-info {
display: flex;
flex-direction: column;
}
#titlebar-dropdown .dropdown-username {
font-size: 14px;
font-weight: 600;
color: white;
}
#titlebar-dropdown .dropdown-status {
font-size: 11px;
color: #22c55e;
font-weight: 500;
}
#titlebar-dropdown .dropdown-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 16px;
color: #a1a1aa;
text-decoration: none;
font-size: 13px;
transition: all 0.2s;
background: transparent;
border: none;
width: 100%;
cursor: pointer;
font-family: inherit;
text-align: left;
}
#titlebar-dropdown .dropdown-item:hover {
background: rgba(255, 255, 255, 0.05);
color: white;
padding-left: 20px;
}
#titlebar-dropdown .dropdown-item svg {
color: inherit;
transition: transform 0.2s;
}
#titlebar-dropdown .dropdown-item:hover svg {
color: #8b5cf6;
}
#titlebar-dropdown .dropdown-divider {
height: 1px;
background: rgba(255, 255, 255, 0.05);
margin: 4px 0;
}
#titlebar-dropdown .logout-item {
color: #ef4444;
}
#titlebar-dropdown .logout-item:hover {
background: rgba(239, 68, 68, 0.1);
color: #f87171;
}
#titlebar-dropdown .logout-item:hover svg {
color: #f87171;
}
html.electron::-webkit-scrollbar {
width: 12px;
}
html.electron::-webkit-scrollbar-track {
margin-top: var(--titlebar-height);
}
#titlebar .control-btn {
width: 46px !important;
height: 100% !important;
color: #a1a1aa;
transition: all 0.2s;
}
#titlebar .control-btn svg {
width: auto !important;
height: auto !important;
max-width: 14px;
max-height: 14px;
pointer-events: none;
}
#titlebar .app-icon img {
width: 100%;
height: 100%;
object-fit: contain;
max-width: none;
}