Add YT assistant chrome extension (#2485)
This commit is contained in:
492
examples/yt-assistant-chrome/styles/content.css
Normal file
492
examples/yt-assistant-chrome/styles/content.css
Normal file
@@ -0,0 +1,492 @@
|
||||
/* Styles for the AI Chat Assistant */
|
||||
/* Modern Dark Theme with Blue Accents */
|
||||
|
||||
:root {
|
||||
--chat-dark-bg: #1a1a1a;
|
||||
--chat-darker-bg: #121212;
|
||||
--chat-light-text: #f1f1f1;
|
||||
--chat-blue-accent: #3d84f7;
|
||||
--chat-blue-hover: #2d74e7;
|
||||
--chat-blue-light: rgba(61, 132, 247, 0.15);
|
||||
--chat-error: #ff4a4a;
|
||||
--chat-border-radius: 12px;
|
||||
--chat-message-radius: 12px;
|
||||
--chat-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
/* Main container */
|
||||
#ai-chat-assistant-container {
|
||||
position: fixed;
|
||||
right: 20px;
|
||||
bottom: 20px;
|
||||
width: 380px;
|
||||
height: 550px;
|
||||
background-color: var(--chat-dark-bg);
|
||||
border-radius: var(--chat-border-radius);
|
||||
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
z-index: 9999;
|
||||
overflow: hidden;
|
||||
transition: var(--chat-transition);
|
||||
opacity: 0;
|
||||
transform: translateY(20px) scale(0.98);
|
||||
pointer-events: none;
|
||||
font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
/* When visible */
|
||||
#ai-chat-assistant-container.visible {
|
||||
opacity: 1;
|
||||
transform: translateY(0) scale(1);
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
/* When minimized */
|
||||
#ai-chat-assistant-container.minimized {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
#ai-chat-assistant-container.minimized .ai-chat-body {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.ai-chat-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px 16px;
|
||||
background-color: var(--chat-darker-bg);
|
||||
color: var(--chat-light-text);
|
||||
border-top-left-radius: var(--chat-border-radius);
|
||||
border-top-right-radius: var(--chat-border-radius);
|
||||
cursor: move;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.ai-chat-title {
|
||||
font-weight: 500;
|
||||
font-size: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.ai-chat-title::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background-color: var(--chat-blue-accent);
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 10px var(--chat-blue-accent);
|
||||
}
|
||||
|
||||
.ai-chat-controls {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.ai-chat-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--chat-light-text);
|
||||
font-size: 18px;
|
||||
cursor: pointer;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
transition: var(--chat-transition);
|
||||
}
|
||||
|
||||
.ai-chat-btn:hover {
|
||||
background-color: rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
/* Body */
|
||||
.ai-chat-body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
background-color: var(--chat-dark-bg);
|
||||
}
|
||||
|
||||
/* Messages container */
|
||||
.ai-chat-messages {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
|
||||
}
|
||||
|
||||
.ai-chat-messages::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.ai-chat-messages::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.ai-chat-messages::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
/* Individual message */
|
||||
.ai-chat-message {
|
||||
max-width: 85%;
|
||||
padding: 12px 16px;
|
||||
border-radius: var(--chat-message-radius);
|
||||
line-height: 1.5;
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
animation: message-fade-in 0.3s ease;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
@keyframes message-fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* User message */
|
||||
.ai-chat-message.user {
|
||||
align-self: flex-end;
|
||||
background-color: var(--chat-blue-accent);
|
||||
color: white;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
/* Assistant message */
|
||||
.ai-chat-message.assistant {
|
||||
align-self: flex-start;
|
||||
background-color: rgba(255, 255, 255, 0.08);
|
||||
color: var(--chat-light-text);
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
|
||||
/* System message */
|
||||
.ai-chat-message.system {
|
||||
align-self: center;
|
||||
background-color: rgba(255, 76, 76, 0.1);
|
||||
color: var(--chat-error);
|
||||
max-width: 90%;
|
||||
font-size: 13px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid rgba(255, 76, 76, 0.2);
|
||||
}
|
||||
|
||||
/* Loading animation */
|
||||
.ai-chat-message.loading {
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
|
||||
.ai-chat-message.loading:after {
|
||||
content: "...";
|
||||
animation: thinking 1.5s infinite;
|
||||
}
|
||||
|
||||
@keyframes thinking {
|
||||
0% { content: "."; }
|
||||
33% { content: ".."; }
|
||||
66% { content: "..."; }
|
||||
}
|
||||
|
||||
/* Input area */
|
||||
.ai-chat-input-container {
|
||||
display: flex;
|
||||
padding: 12px 16px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.05);
|
||||
background-color: var(--chat-darker-bg);
|
||||
}
|
||||
|
||||
#ai-chat-input {
|
||||
flex: 1;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
color: var(--chat-light-text);
|
||||
border-radius: 20px;
|
||||
padding: 10px 16px;
|
||||
font-size: 14px;
|
||||
resize: none;
|
||||
max-height: 100px;
|
||||
outline: none;
|
||||
font-family: inherit;
|
||||
transition: var(--chat-transition);
|
||||
}
|
||||
|
||||
#ai-chat-input::placeholder {
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
#ai-chat-input:focus {
|
||||
border-color: var(--chat-blue-accent);
|
||||
background-color: rgba(255, 255, 255, 0.07);
|
||||
box-shadow: 0 0 0 1px rgba(61, 132, 247, 0.1);
|
||||
}
|
||||
|
||||
.ai-chat-send-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--chat-blue-accent);
|
||||
cursor: pointer;
|
||||
padding: 8px;
|
||||
margin-left: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
transition: var(--chat-transition);
|
||||
}
|
||||
|
||||
.ai-chat-send-btn:hover {
|
||||
background-color: var(--chat-blue-light);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
/* Toggle button */
|
||||
.ai-chat-toggle {
|
||||
position: fixed;
|
||||
right: 20px;
|
||||
bottom: 20px;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 50%;
|
||||
background-color: var(--chat-blue-accent);
|
||||
color: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 4px 15px rgba(61, 132, 247, 0.35);
|
||||
z-index: 9998;
|
||||
transition: var(--chat-transition);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.ai-chat-toggle:hover {
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 6px 20px rgba(61, 132, 247, 0.45);
|
||||
}
|
||||
|
||||
#ai-chat-assistant-container.visible + .ai-chat-toggle {
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* Code formatting */
|
||||
.ai-chat-message pre {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
padding: 10px;
|
||||
border-radius: 6px;
|
||||
overflow-x: auto;
|
||||
margin: 10px 0;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.ai-chat-message code {
|
||||
font-family: 'Cascadia Code', 'Fira Code', 'Source Code Pro', monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ai-chat-message.user code {
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
padding: 2px 5px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.ai-chat-message.assistant code {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
padding: 2px 5px;
|
||||
border-radius: 3px;
|
||||
color: #e2e2e2;
|
||||
}
|
||||
|
||||
/* Links */
|
||||
.ai-chat-message a {
|
||||
color: var(--chat-blue-accent);
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dotted rgba(61, 132, 247, 0.5);
|
||||
transition: var(--chat-transition);
|
||||
}
|
||||
|
||||
.ai-chat-message a:hover {
|
||||
border-bottom: 1px solid var(--chat-blue-accent);
|
||||
}
|
||||
|
||||
.ai-chat-message.user a {
|
||||
color: white;
|
||||
border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.ai-chat-message.user a:hover {
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
|
||||
/* Responsive adjustments */
|
||||
@media (max-width: 768px) {
|
||||
#ai-chat-assistant-container {
|
||||
width: calc(100% - 20px);
|
||||
height: 60vh;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
}
|
||||
|
||||
.ai-chat-toggle {
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Tab styles */
|
||||
.ai-chat-tabs {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.ai-chat-tab {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--chat-light-text);
|
||||
padding: 5px 10px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
border-radius: 4px;
|
||||
transition: var(--chat-transition);
|
||||
}
|
||||
|
||||
.ai-chat-tab:hover {
|
||||
background-color: rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
.ai-chat-tab.active {
|
||||
background-color: var(--chat-blue-accent);
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Content area */
|
||||
.ai-chat-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* Memories tab styles */
|
||||
.ai-chat-memories {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
background-color: var(--chat-dark-bg);
|
||||
}
|
||||
|
||||
.memories-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.memories-title {
|
||||
display: inline;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
color: var(--chat-light-text);
|
||||
}
|
||||
|
||||
.memories-title a {
|
||||
color: var(--chat-blue-accent);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
transition: var(--chat-transition);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.memories-title a:hover {
|
||||
color: var(--chat-blue-hover);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.memories-title a svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.memories-title svg {
|
||||
vertical-align: middle;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.memories-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 10px;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
|
||||
}
|
||||
|
||||
.memories-list::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.memories-list::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.memories-list::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.memory-item {
|
||||
background-color: rgba(255, 255, 255, 0.08);
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
border-radius: var(--chat-message-radius);
|
||||
padding: 12px 16px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
color: var(--chat-light-text);
|
||||
}
|
||||
|
||||
.memory-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.loading, .no-memories, .error, .info {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
font-size: 14px;
|
||||
color: var(--chat-light-text);
|
||||
}
|
||||
|
||||
.error {
|
||||
color: var(--chat-error);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.info {
|
||||
color: var(--chat-blue-accent);
|
||||
}
|
||||
587
examples/yt-assistant-chrome/styles/options.css
Normal file
587
examples/yt-assistant-chrome/styles/options.css
Normal file
@@ -0,0 +1,587 @@
|
||||
:root {
|
||||
--dark-bg: #1a1a1a;
|
||||
--darker-bg: #121212;
|
||||
--section-bg: #202020;
|
||||
--light-text: #f1f1f1;
|
||||
--dim-text: rgba(255, 255, 255, 0.7);
|
||||
--dim-text-2: rgba(255, 255, 255, 0.5);
|
||||
--blue-accent: #3d84f7;
|
||||
--blue-hover: #2d74e7;
|
||||
--blue-light: rgba(61, 132, 247, 0.15);
|
||||
--error-color: #ff4a4a;
|
||||
--warning-color: #ffaa33;
|
||||
--success-color: #4caf50;
|
||||
--border-radius: 8px;
|
||||
--transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
|
||||
margin: 0;
|
||||
padding: 20px 20px 40px;
|
||||
color: var(--light-text);
|
||||
background-color: var(--dark-bg);
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
header {
|
||||
max-width: 800px;
|
||||
padding-left: 28px;
|
||||
padding-top: 10px;
|
||||
color: #f1f1f1;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 32px;
|
||||
margin: 0 0 12px 0;
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.title-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.logo-img {
|
||||
height: 20px;
|
||||
width: auto;
|
||||
margin-left: 8px;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
.powered-by {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.branding-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.description {
|
||||
color: var(--dim-text);
|
||||
margin-bottom: 20px;
|
||||
font-size: 15px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-bottom: 30px;
|
||||
background: var(--section-bg);
|
||||
padding: 28px;
|
||||
border-radius: var(--border-radius);
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 18px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 15px;
|
||||
color: var(--light-text);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
h2::before {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 5px;
|
||||
height: 20px;
|
||||
background-color: var(--blue-accent);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
font-weight: 500;
|
||||
color: var(--light-text);
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
input[type="number"],
|
||||
select {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
color: var(--light-text);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: var(--border-radius);
|
||||
font-size: 14px;
|
||||
box-sizing: border-box;
|
||||
transition: var(--transition);
|
||||
}
|
||||
|
||||
input[type="text"]:focus,
|
||||
input[type="password"]:focus,
|
||||
input[type="number"]:focus,
|
||||
select:focus {
|
||||
border-color: var(--blue-accent);
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 1px rgba(61, 132, 247, 0.2);
|
||||
}
|
||||
|
||||
select {
|
||||
appearance: none;
|
||||
background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%207l5%205%205-5%22%20stroke%3D%22%23fff%22%20stroke-width%3D%221.5%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 12px center;
|
||||
}
|
||||
|
||||
input[type="number"] {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
margin-right: 10px;
|
||||
position: relative;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: var(--transition);
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked {
|
||||
background-color: var(--blue-accent);
|
||||
border-color: var(--blue-accent);
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
top: 2px;
|
||||
width: 6px;
|
||||
height: 10px;
|
||||
border: solid white;
|
||||
border-width: 0 2px 2px 0;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
input[type="checkbox"]:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.checkbox-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
font-size: 14px;
|
||||
color: var(--light-text);
|
||||
}
|
||||
|
||||
.checkbox-label label {
|
||||
margin-bottom: 0;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: var(--blue-accent);
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 12px 20px;
|
||||
border-radius: var(--border-radius);
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
transition: var(--transition);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: var(--blue-hover);
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
button:active {
|
||||
transform: translateY(1px);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
color: var(--dim-text-2);
|
||||
cursor: not-allowed;
|
||||
transform: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.status {
|
||||
padding: 15px;
|
||||
border-radius: var(--border-radius);
|
||||
margin-top: 20px;
|
||||
font-size: 14px;
|
||||
animation: fade-in 0.3s ease;
|
||||
}
|
||||
|
||||
@keyframes fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.status.error {
|
||||
background-color: rgba(255, 74, 74, 0.1);
|
||||
color: var(--error-color);
|
||||
border: 1px solid rgba(255, 74, 74, 0.2);
|
||||
}
|
||||
|
||||
.status.success {
|
||||
background-color: rgba(76, 175, 80, 0.1);
|
||||
color: var(--success-color);
|
||||
border: 1px solid rgba(76, 175, 80, 0.2);
|
||||
}
|
||||
|
||||
.status.warning {
|
||||
background-color: rgba(255, 170, 51, 0.1);
|
||||
color: var(--warning-color);
|
||||
border: 1px solid rgba(255, 170, 51, 0.2);
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.secondary-button {
|
||||
background-color: rgba(255, 255, 255, 0.08);
|
||||
color: var(--light-text);
|
||||
}
|
||||
|
||||
.secondary-button:hover {
|
||||
background-color: rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
|
||||
.api-key-container {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.api-key-container input {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* Slider styles */
|
||||
.slider-container {
|
||||
margin-top: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.slider {
|
||||
-webkit-appearance: none;
|
||||
flex: 1;
|
||||
height: 4px;
|
||||
border-radius: 10px;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.slider::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
background: var(--blue-accent);
|
||||
cursor: pointer;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
||||
transition: var(--transition);
|
||||
}
|
||||
|
||||
.slider::-webkit-slider-thumb:hover {
|
||||
transform: scale(1.1);
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.slider::-moz-range-thumb {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
background: var(--blue-accent);
|
||||
cursor: pointer;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
||||
transition: var(--transition);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.slider::-moz-range-thumb:hover {
|
||||
transform: scale(1.1);
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
/* Add styles for memory creation section */
|
||||
.memory-input {
|
||||
width: 100%;
|
||||
min-height: 150px;
|
||||
padding: 12px;
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
color: var(--light-text);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: var(--border-radius);
|
||||
font-size: 14px;
|
||||
box-sizing: border-box;
|
||||
transition: var(--transition);
|
||||
resize: vertical;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.memory-input:focus {
|
||||
border-color: var(--blue-accent);
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 1px rgba(61, 132, 247, 0.2);
|
||||
}
|
||||
|
||||
.memory-result {
|
||||
margin-top: 15px;
|
||||
padding: 12px;
|
||||
border-radius: var(--border-radius);
|
||||
font-size: 14px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.memory-result.success {
|
||||
background-color: rgba(76, 175, 80, 0.1);
|
||||
color: var(--success-color);
|
||||
border: 1px solid rgba(76, 175, 80, 0.2);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.memory-result.error {
|
||||
background-color: rgba(255, 74, 74, 0.1);
|
||||
color: var(--error-color);
|
||||
border: 1px solid rgba(255, 74, 74, 0.2);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.loading-spinner {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 2px solid rgba(255, 255, 255, 0.3);
|
||||
border-radius: 50%;
|
||||
border-top-color: var(--light-text);
|
||||
animation: spin 1s linear infinite;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
/* Add new styles for the memories sidebar */
|
||||
.memories-sidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 384px;
|
||||
height: 100vh;
|
||||
background: var(--section-bg);
|
||||
border-left: 1px solid rgba(255, 255, 255, 0.05);
|
||||
transition: transform 0.3s ease;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.memories-sidebar.collapsed {
|
||||
transform: translateX(384px);
|
||||
}
|
||||
|
||||
.memories-header {
|
||||
padding: 16px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.memories-title {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: var(--light-text);
|
||||
}
|
||||
|
||||
.memories-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.memories-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.memory-item {
|
||||
padding: 12px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
border-radius: var(--border-radius);
|
||||
margin-bottom: 12px;
|
||||
cursor: pointer;
|
||||
transition: var(--transition);
|
||||
}
|
||||
|
||||
.memory-item:hover {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.memory-content {
|
||||
font-size: 14px;
|
||||
color: var(--light-text);
|
||||
margin-bottom: 8px;
|
||||
text-align: center;
|
||||
text-wrap-style: pretty;
|
||||
}
|
||||
|
||||
.memory-item .memory-content {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.memory-meta {
|
||||
font-size: 12px;
|
||||
color: var(--dim-text);
|
||||
}
|
||||
|
||||
.memory-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.memory-action-btn {
|
||||
padding: 8px;
|
||||
font-size: 12px;
|
||||
border-radius: 6px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
color: var(--light-text);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: var(--transition);
|
||||
}
|
||||
|
||||
.memory-action-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.memory-action-btn.delete:hover {
|
||||
background-color: var(--error-color);
|
||||
}
|
||||
|
||||
.edit-memory-modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
z-index: 1100;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.edit-memory-modal.open {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.edit-memory-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--section-bg);
|
||||
padding: 24px;
|
||||
border-radius: var(--border-radius);
|
||||
width: 90%;
|
||||
max-width: 600px;
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.edit-memory-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.edit-memory-title {
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
color: var(--light-text);
|
||||
}
|
||||
|
||||
.edit-memory-close {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--dim-text);
|
||||
cursor: pointer;
|
||||
padding: 4px;
|
||||
font-size: 20px;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.edit-memory-textarea {
|
||||
min-height: 20px;
|
||||
max-height: 70px;
|
||||
padding: 12px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: var(--border-radius);
|
||||
color: var(--light-text);
|
||||
font-family: inherit;
|
||||
margin-bottom: 16px;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.edit-memory-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-right: 400px;
|
||||
transition: margin-right 0.3s ease;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.main-content.sidebar-collapsed {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#status-container {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
259
examples/yt-assistant-chrome/styles/popup.css
Normal file
259
examples/yt-assistant-chrome/styles/popup.css
Normal file
@@ -0,0 +1,259 @@
|
||||
:root {
|
||||
--dark-bg: #1a1a1a;
|
||||
--darker-bg: #121212;
|
||||
--light-text: #f1f1f1;
|
||||
--blue-accent: #3d84f7;
|
||||
--blue-hover: #2d74e7;
|
||||
--blue-light: rgba(61, 132, 247, 0.15);
|
||||
--error-color: #ff4a4a;
|
||||
--warning-color: #ffaa33;
|
||||
--success-color: #4caf50;
|
||||
--border-radius: 8px;
|
||||
--transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
|
||||
width: 320px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: var(--light-text);
|
||||
background-color: var(--dark-bg);
|
||||
}
|
||||
|
||||
header {
|
||||
background-color: var(--darker-bg);
|
||||
color: var(--light-text);
|
||||
padding: 16px;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 18px;
|
||||
margin: 0 0 8px 0;
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.logo-img {
|
||||
height: 16px;
|
||||
width: auto;
|
||||
margin-left: 8px;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
.powered-by {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.branding-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.status {
|
||||
padding: 12px;
|
||||
border-radius: var(--border-radius);
|
||||
margin-bottom: 16px;
|
||||
font-size: 14px;
|
||||
animation: fade-in 0.3s ease;
|
||||
}
|
||||
|
||||
@keyframes fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.status.error {
|
||||
background-color: rgba(255, 74, 74, 0.1);
|
||||
color: var(--error-color);
|
||||
border: 1px solid rgba(255, 74, 74, 0.2);
|
||||
}
|
||||
|
||||
.status.success {
|
||||
background-color: rgba(76, 175, 80, 0.1);
|
||||
color: var(--success-color);
|
||||
border: 1px solid rgba(76, 175, 80, 0.2);
|
||||
}
|
||||
|
||||
.status.warning {
|
||||
background-color: rgba(255, 170, 51, 0.1);
|
||||
color: var(--warning-color);
|
||||
border: 1px solid rgba(255, 170, 51, 0.2);
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: var(--blue-accent);
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 12px 16px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
transition: var(--transition);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: var(--blue-hover);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
button:active {
|
||||
transform: translateY(1px);
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
cursor: not-allowed;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.api-key-section {
|
||||
margin-bottom: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.api-key-input-wrapper {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.toggle-password {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 4px;
|
||||
cursor: pointer;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
width: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.toggle-password:hover {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
background: none;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.toggle-password .icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
padding-right: 40px;
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
color: var(--light-text);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: var(--border-radius);
|
||||
margin-top: 6px;
|
||||
box-sizing: border-box;
|
||||
transition: var(--transition);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
input[type="text"]:focus,
|
||||
input[type="password"]:focus {
|
||||
border-color: var(--blue-accent);
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 1px rgba(61, 132, 247, 0.2);
|
||||
}
|
||||
|
||||
input::placeholder {
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.save-button {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.mem0-status {
|
||||
margin-top: 20px;
|
||||
padding: 12px;
|
||||
background-color: rgba(255, 255, 255, 0.03);
|
||||
border-radius: var(--border-radius);
|
||||
font-size: 13px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
|
||||
.mem0-status p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#mem0-status-text {
|
||||
color: var(--blue-accent);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
.icon {
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
.get-key-link {
|
||||
color: var(--blue-accent);
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.get-key-link:hover {
|
||||
color: var(--blue-accent-hover);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.get-key-link:visited {
|
||||
color: var(--blue-accent);
|
||||
}
|
||||
Reference in New Issue
Block a user