style: Consolidate update banner styles and add theme support

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2025-12-27 18:15:22 +00:00
parent 987c401dc4
commit 8bf33e2d45
5 changed files with 49 additions and 1 deletions

View File

@@ -100,7 +100,7 @@ function App() {
return ( return (
<div className={theme}> <div className={theme}>
{waitingWorker && {waitingWorker &&
<div style={{padding: 10, backgroundColor: '#ffffcc', color: '#000'}}> <div className='update-banner'>
Client version mismatch, please refresh:{' '} Client version mismatch, please refresh:{' '}
<button onClick={() => { <button onClick={() => {
waitingWorker.postMessage({ type: 'SKIP_WAITING' }); waitingWorker.postMessage({ type: 'SKIP_WAITING' });

View File

@@ -75,3 +75,13 @@
.black .copy-button { .black .copy-button {
color: #828282; color: #828282;
} }
.black .update-banner {
color: #000;
}
.black .update-banner button {
background-color: #444444;
border-color: #bbb;
color: #ddd;
}

View File

@@ -71,3 +71,13 @@
.dark .copy-button { .dark .copy-button {
color: #828282; color: #828282;
} }
.dark .update-banner {
color: #000;
}
.dark .update-banner button {
background-color: #444444;
border-color: #bbb;
color: #ddd;
}

View File

@@ -43,6 +43,22 @@ input {
border-radius: 4px; border-radius: 4px;
} }
.update-banner {
background-color: #ffffcc;
padding: 0.75rem;
text-align: center;
border-bottom: 1px solid #e6e6b8;
}
.update-banner button {
margin-left: 1rem;
padding: 0.25rem 0.75rem;
border: 1px solid #828282;
border-radius: 4px;
background-color: transparent;
cursor: pointer;
}
.fullscreen { .fullscreen {
margin: 0.25rem; margin: 0.25rem;
padding: 0.25rem; padding: 0.25rem;

View File

@@ -93,3 +93,15 @@
.red .copy-button { .red .copy-button {
color: #690000; color: #690000;
} }
.red .update-banner {
background-color: #ffdddd;
border-bottom-color: #e6c2c2;
color: #b00;
}
.red .update-banner button {
background-color: #440000;
border-color: #b00;
color: #b00;
}