mirror of
https://github.com/DevJSTAR/JSTAR-Tab.git
synced 2025-04-18 17:35:26 +00:00
567 lines
10 KiB
CSS
567 lines
10 KiB
CSS
|
:root {
|
||
|
--history-background: var(--card-bg, #ffffff);
|
||
|
--history-text: var(--text-color, #333333);
|
||
|
--history-accent: var(--accent-color, #4a6cf7);
|
||
|
--history-hover: var(--hover-bg, #f5f7ff);
|
||
|
--history-border: var(--border-color, #eaeaea);
|
||
|
--history-danger: #e53935;
|
||
|
--history-danger-hover: #c62828;
|
||
|
--history-success: #43a047;
|
||
|
--history-muted: #757575;
|
||
|
--history-header-height: 120px;
|
||
|
--history-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
||
|
--history-radius: 8px;
|
||
|
}
|
||
|
|
||
|
body {
|
||
|
background-color: var(--bg-color);
|
||
|
color: var(--text-color);
|
||
|
margin: 0;
|
||
|
padding: 0;
|
||
|
font-family: var(--font-family, 'Inter', sans-serif);
|
||
|
overflow-x: hidden;
|
||
|
}
|
||
|
|
||
|
.history-container {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
height: 100vh;
|
||
|
background-color: var(--history-background);
|
||
|
color: var(--history-text);
|
||
|
max-width: 1200px;
|
||
|
margin: 0 auto;
|
||
|
padding: 0 20px;
|
||
|
}
|
||
|
|
||
|
.history-header {
|
||
|
position: sticky;
|
||
|
top: 0;
|
||
|
z-index: 10;
|
||
|
background-color: var(--history-background);
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
gap: 16px;
|
||
|
padding: 20px 0;
|
||
|
border-bottom: 1px solid var(--history-border);
|
||
|
}
|
||
|
|
||
|
.header-left {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
gap: 16px;
|
||
|
}
|
||
|
|
||
|
.header-left h1 {
|
||
|
font-size: 24px;
|
||
|
font-weight: 600;
|
||
|
margin: 0;
|
||
|
}
|
||
|
|
||
|
.header-right {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: space-between;
|
||
|
gap: 16px;
|
||
|
}
|
||
|
|
||
|
.back-button {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
width: 36px;
|
||
|
height: 36px;
|
||
|
border-radius: 50%;
|
||
|
border: none;
|
||
|
background: var(--history-hover);
|
||
|
cursor: pointer;
|
||
|
transition: background 0.2s;
|
||
|
}
|
||
|
|
||
|
.back-button:hover {
|
||
|
background: var(--history-border);
|
||
|
}
|
||
|
|
||
|
.back-button svg {
|
||
|
width: 20px;
|
||
|
height: 20px;
|
||
|
stroke: var(--history-text);
|
||
|
}
|
||
|
|
||
|
.search-bar {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
background-color: var(--history-hover);
|
||
|
border-radius: 24px;
|
||
|
padding: 8px 16px;
|
||
|
flex: 1;
|
||
|
max-width: 500px;
|
||
|
position: relative;
|
||
|
height: 40px;
|
||
|
}
|
||
|
|
||
|
.search-bar svg {
|
||
|
width: 18px;
|
||
|
height: 18px;
|
||
|
margin-right: 8px;
|
||
|
stroke: var(--history-muted);
|
||
|
}
|
||
|
|
||
|
.search-bar input {
|
||
|
flex: 1;
|
||
|
border: none;
|
||
|
background: transparent;
|
||
|
font-size: 14px;
|
||
|
outline: none;
|
||
|
color: var(--history-text);
|
||
|
}
|
||
|
|
||
|
.search-bar input::placeholder {
|
||
|
color: var(--history-muted);
|
||
|
}
|
||
|
|
||
|
.search-clear {
|
||
|
background: transparent;
|
||
|
border: none;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
cursor: pointer;
|
||
|
padding: 4px;
|
||
|
border-radius: 50%;
|
||
|
}
|
||
|
|
||
|
.search-clear svg {
|
||
|
width: 16px;
|
||
|
height: 16px;
|
||
|
margin: 0;
|
||
|
}
|
||
|
|
||
|
.search-clear:hover {
|
||
|
background: rgba(0, 0, 0, 0.05);
|
||
|
}
|
||
|
|
||
|
.filter-container {
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
.filter-container select {
|
||
|
appearance: none;
|
||
|
background-color: var(--history-hover);
|
||
|
border: none;
|
||
|
border-radius: 24px;
|
||
|
padding: 8px 16px;
|
||
|
font-size: 14px;
|
||
|
color: var(--history-text);
|
||
|
cursor: pointer;
|
||
|
outline: none;
|
||
|
min-width: 140px;
|
||
|
height: 40px;
|
||
|
}
|
||
|
|
||
|
.filter-container::after {
|
||
|
content: "";
|
||
|
position: absolute;
|
||
|
right: 12px;
|
||
|
top: 50%;
|
||
|
transform: translateY(-50%);
|
||
|
width: 0;
|
||
|
height: 0;
|
||
|
border-left: 5px solid transparent;
|
||
|
border-right: 5px solid transparent;
|
||
|
border-top: 5px solid var(--history-text);
|
||
|
pointer-events: none;
|
||
|
}
|
||
|
|
||
|
.history-actions {
|
||
|
display: flex;
|
||
|
gap: 12px;
|
||
|
padding: 12px 0;
|
||
|
border-bottom: 1px solid var(--history-border);
|
||
|
}
|
||
|
|
||
|
.history-actions button {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
gap: 8px;
|
||
|
padding: 8px 16px;
|
||
|
border-radius: 24px;
|
||
|
border: 1px solid var(--history-border);
|
||
|
background: transparent;
|
||
|
font-size: 14px;
|
||
|
font-weight: 500;
|
||
|
cursor: pointer;
|
||
|
transition: all 0.2s;
|
||
|
}
|
||
|
|
||
|
.history-actions button svg {
|
||
|
width: 16px;
|
||
|
height: 16px;
|
||
|
stroke: currentColor;
|
||
|
}
|
||
|
|
||
|
.history-actions button:hover {
|
||
|
background: var(--history-hover);
|
||
|
}
|
||
|
|
||
|
.history-actions button:active {
|
||
|
transform: translateY(1px);
|
||
|
}
|
||
|
|
||
|
.history-actions button[disabled] {
|
||
|
opacity: 0.5;
|
||
|
cursor: not-allowed;
|
||
|
}
|
||
|
|
||
|
#clear-all {
|
||
|
color: var(--history-danger);
|
||
|
}
|
||
|
|
||
|
#clear-all:hover {
|
||
|
background: rgba(229, 57, 53, 0.1);
|
||
|
}
|
||
|
|
||
|
.history-content {
|
||
|
flex: 1;
|
||
|
overflow-y: auto;
|
||
|
padding: 20px 0;
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
gap: 20px;
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
.history-loading {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
padding: 40px;
|
||
|
gap: 16px;
|
||
|
}
|
||
|
|
||
|
.loading-spinner {
|
||
|
width: 40px;
|
||
|
height: 40px;
|
||
|
border: 3px solid var(--history-border);
|
||
|
border-top-color: var(--history-accent);
|
||
|
border-radius: 50%;
|
||
|
animation: spin 1s linear infinite;
|
||
|
}
|
||
|
|
||
|
@keyframes spin {
|
||
|
to {
|
||
|
transform: rotate(360deg);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.history-empty {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
padding: 40px;
|
||
|
text-align: center;
|
||
|
}
|
||
|
|
||
|
.history-empty .empty-icon {
|
||
|
width: 80px;
|
||
|
height: 80px;
|
||
|
margin-bottom: 16px;
|
||
|
color: var(--history-muted);
|
||
|
display: flex;
|
||
|
justify-content: center;
|
||
|
align-items: center;
|
||
|
}
|
||
|
|
||
|
.history-empty .empty-icon svg {
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
}
|
||
|
|
||
|
.history-empty h2 {
|
||
|
font-size: 20px;
|
||
|
font-weight: 600;
|
||
|
margin: 0 0 8px;
|
||
|
}
|
||
|
|
||
|
.history-empty p {
|
||
|
color: var(--history-muted);
|
||
|
max-width: 300px;
|
||
|
}
|
||
|
|
||
|
.history-items {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
gap: 20px;
|
||
|
}
|
||
|
|
||
|
.history-date-group {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
}
|
||
|
|
||
|
.history-date-header {
|
||
|
font-size: 14px;
|
||
|
font-weight: 600;
|
||
|
color: var(--history-muted);
|
||
|
padding: 8px 0;
|
||
|
border-bottom: 1px solid var(--history-border);
|
||
|
margin-bottom: 8px;
|
||
|
}
|
||
|
|
||
|
.history-item {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
padding: 12px;
|
||
|
border-radius: var(--history-radius);
|
||
|
transition: background 0.2s;
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
.history-item:hover {
|
||
|
background: var(--history-hover);
|
||
|
}
|
||
|
|
||
|
.history-item-checkbox {
|
||
|
margin-right: 12px;
|
||
|
}
|
||
|
|
||
|
.history-item-favicon {
|
||
|
width: 20px;
|
||
|
height: 20px;
|
||
|
margin-right: 12px;
|
||
|
border-radius: 4px;
|
||
|
background: var(--history-border);
|
||
|
overflow: hidden;
|
||
|
}
|
||
|
|
||
|
.history-item-favicon img {
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
object-fit: cover;
|
||
|
}
|
||
|
|
||
|
.history-item-content {
|
||
|
flex: 1;
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
min-width: 0;
|
||
|
}
|
||
|
|
||
|
.history-item-title {
|
||
|
font-size: 14px;
|
||
|
font-weight: 500;
|
||
|
margin-bottom: 4px;
|
||
|
white-space: nowrap;
|
||
|
overflow: hidden;
|
||
|
text-overflow: ellipsis;
|
||
|
}
|
||
|
|
||
|
.history-item-url {
|
||
|
font-size: 12px;
|
||
|
color: var(--history-muted);
|
||
|
white-space: nowrap;
|
||
|
overflow: hidden;
|
||
|
text-overflow: ellipsis;
|
||
|
}
|
||
|
|
||
|
.history-item-time {
|
||
|
font-size: 12px;
|
||
|
color: var(--history-muted);
|
||
|
margin-left: 16px;
|
||
|
white-space: nowrap;
|
||
|
min-width: 70px;
|
||
|
text-align: right;
|
||
|
}
|
||
|
|
||
|
.history-item-actions {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
gap: 8px;
|
||
|
margin-left: 16px;
|
||
|
opacity: 0;
|
||
|
transition: opacity 0.2s;
|
||
|
}
|
||
|
|
||
|
.history-item:hover .history-item-actions {
|
||
|
opacity: 1;
|
||
|
}
|
||
|
|
||
|
.history-item-action {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
width: 28px;
|
||
|
height: 28px;
|
||
|
border-radius: 50%;
|
||
|
border: none;
|
||
|
background: transparent;
|
||
|
cursor: pointer;
|
||
|
}
|
||
|
|
||
|
.history-item-action:hover {
|
||
|
background: rgba(0, 0, 0, 0.05);
|
||
|
}
|
||
|
|
||
|
.history-item-action svg {
|
||
|
width: 16px;
|
||
|
height: 16px;
|
||
|
stroke: var(--history-muted);
|
||
|
}
|
||
|
|
||
|
.history-item-action.delete:hover svg {
|
||
|
stroke: var(--history-danger);
|
||
|
}
|
||
|
|
||
|
.history-load-more {
|
||
|
display: flex;
|
||
|
justify-content: center;
|
||
|
padding: 20px 0;
|
||
|
}
|
||
|
|
||
|
.history-load-more button {
|
||
|
padding: 8px 24px;
|
||
|
border-radius: 24px;
|
||
|
border: none;
|
||
|
background: var(--history-accent);
|
||
|
color: white;
|
||
|
font-size: 14px;
|
||
|
font-weight: 500;
|
||
|
cursor: pointer;
|
||
|
transition: background 0.2s;
|
||
|
}
|
||
|
|
||
|
.history-load-more button:hover {
|
||
|
background: var(--history-accent);
|
||
|
filter: brightness(1.1);
|
||
|
}
|
||
|
|
||
|
.hidden {
|
||
|
display: none !important;
|
||
|
}
|
||
|
|
||
|
.modal {
|
||
|
position: fixed;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
z-index: 1000;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
opacity: 0;
|
||
|
visibility: hidden;
|
||
|
transition: opacity 0.3s, visibility 0.3s;
|
||
|
}
|
||
|
|
||
|
.modal.hidden {
|
||
|
display: none;
|
||
|
}
|
||
|
|
||
|
.modal:not(.hidden) {
|
||
|
opacity: 1;
|
||
|
visibility: visible;
|
||
|
}
|
||
|
|
||
|
.modal-backdrop {
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
background-color: rgba(0, 0, 0, 0.5);
|
||
|
}
|
||
|
|
||
|
.modal-content {
|
||
|
background-color: var(--history-background);
|
||
|
border-radius: var(--history-radius);
|
||
|
box-shadow: var(--history-shadow);
|
||
|
position: relative;
|
||
|
z-index: 1;
|
||
|
transform: translateY(20px);
|
||
|
transition: transform 0.3s;
|
||
|
max-width: 90%;
|
||
|
}
|
||
|
|
||
|
.modal:not(.hidden) .modal-content {
|
||
|
transform: translateY(0);
|
||
|
}
|
||
|
|
||
|
.modal-content.confirmation-dialog {
|
||
|
width: 400px;
|
||
|
max-width: 90%;
|
||
|
padding: 24px;
|
||
|
box-sizing: border-box;
|
||
|
opacity: 1 !important;
|
||
|
visibility: visible !important;
|
||
|
}
|
||
|
|
||
|
.history-empty .empty-icon {
|
||
|
width: 80px;
|
||
|
height: 80px;
|
||
|
margin-bottom: 16px;
|
||
|
color: var(--history-muted);
|
||
|
display: flex;
|
||
|
justify-content: center;
|
||
|
align-items: center;
|
||
|
}
|
||
|
|
||
|
.history-empty .empty-icon svg {
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
}
|
||
|
|
||
|
.globe-icon {
|
||
|
width: 16px !important;
|
||
|
height: 16px !important;
|
||
|
stroke: var(--history-muted);
|
||
|
display: block;
|
||
|
margin: 0 auto;
|
||
|
}
|
||
|
|
||
|
.history-item-favicon svg {
|
||
|
width: 16px;
|
||
|
height: 16px;
|
||
|
background: var(--history-hover);
|
||
|
border-radius: 4px;
|
||
|
padding: 2px;
|
||
|
}
|
||
|
|
||
|
.history-empty:not(.hidden) + .history-items {
|
||
|
display: none !important;
|
||
|
}
|
||
|
|
||
|
@media (min-width: 768px) {
|
||
|
.history-header {
|
||
|
flex-direction: row;
|
||
|
justify-content: space-between;
|
||
|
align-items: center;
|
||
|
}
|
||
|
|
||
|
.header-right {
|
||
|
justify-content: flex-end;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@media (max-width: 767px) {
|
||
|
.history-item-time {
|
||
|
display: none;
|
||
|
}
|
||
|
|
||
|
.history-item-actions {
|
||
|
opacity: 1;
|
||
|
}
|
||
|
|
||
|
.history-actions {
|
||
|
justify-content: space-between;
|
||
|
}
|
||
|
|
||
|
.history-actions button span {
|
||
|
display: none;
|
||
|
}
|
||
|
|
||
|
.history-actions button {
|
||
|
padding: 8px;
|
||
|
}
|
||
|
}
|