7737ed90c7
Backend: - Add owner_id to Folder entity + FolderDto (DB user_id column) - Add list_folders_by_owner to FolderRepository trait + PG impl - Add list_folders_for_owner to FolderUseCase + FolderService - Rewrite FolderHandler: all endpoints now scope by AuthUser - Remove dead handler methods (list_folders_inner, list_folders_for_user, is_user_home_folder, folder_belongs_to_user) - Add ownership check in get_folder (returns 404 on mismatch) Batch operations: - Add trash_service + zip_service to BatchOperationService - New methods: trash_files, trash_folders, move_folders, download_zip - New handlers: trash_batch, move_folders_batch, download_batch - New routes: POST /api/batch/trash, /api/batch/folders/move, /api/batch/download Frontend: - Replace findUserHomeFolder (~130 lines) with resolveHomeFolder (~35 lines) - Remove client-side folder filtering in loadFiles (backend now scopes) - Rewrite batchDelete: N requests -> 1 POST /api/batch/trash - Rewrite batchMove: N requests -> 2 POST max (files + folders) - Rewrite batchDownload: N requests -> 1 POST /api/batch/download (ZIP) - Search moved to backend, share system uses backend API - Dark mode fixes, frontend audit improvements
586 lines
11 KiB
CSS
586 lines
11 KiB
CSS
/* Auth styles for OxiCloud */
|
|
.auth-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100vh;
|
|
width: 100%;
|
|
background-color: #f5f7fa;
|
|
}
|
|
|
|
.auth-panel {
|
|
width: 400px;
|
|
max-width: 90%;
|
|
margin: 0 auto;
|
|
background-color: white;
|
|
border-radius: 10px;
|
|
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
|
|
padding: 30px;
|
|
text-align: center;
|
|
}
|
|
|
|
.auth-logo {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.auth-logo-icon {
|
|
width: 50px;
|
|
height: 50px;
|
|
background: linear-gradient(135deg, #ff5e3a 0%, #ff2d55 100%);
|
|
border-radius: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-right: 10px;
|
|
box-shadow: 0 4px 12px rgba(255, 94, 58, 0.3);
|
|
}
|
|
|
|
.auth-logo-icon svg {
|
|
width: 30px;
|
|
height: 30px;
|
|
fill: white;
|
|
}
|
|
|
|
.auth-logo-text {
|
|
font-size: 24px;
|
|
font-weight: bold;
|
|
color: #2a3042;
|
|
}
|
|
|
|
.auth-title {
|
|
font-size: 20px;
|
|
font-weight: bold;
|
|
margin-bottom: 25px;
|
|
color: #2a3042;
|
|
}
|
|
|
|
.auth-form {
|
|
width: 100%;
|
|
text-align: left;
|
|
|
|
[dir='rtl'] & {
|
|
text-align: right;
|
|
}
|
|
}
|
|
|
|
.auth-input-group {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.auth-label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
font-size: 14px;
|
|
color: #4b5563;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.auth-input {
|
|
width: 100%;
|
|
padding: 12px 15px;
|
|
border-radius: 8px;
|
|
border: 1px solid #e2e8f0;
|
|
font-size: 14px;
|
|
background-color: #f9fafb;
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
.auth-input:focus {
|
|
outline: none;
|
|
border-color: #ff5e3a;
|
|
box-shadow: 0 0 0 3px rgba(255, 94, 58, 0.1);
|
|
}
|
|
|
|
.auth-button {
|
|
width: 100%;
|
|
padding: 12px 15px;
|
|
border-radius: 10px;
|
|
background: linear-gradient(135deg, #ff5e3a 0%, #ff2d55 100%);
|
|
color: white;
|
|
font-weight: bold;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
transition: all 0.3s ease;
|
|
margin-top: 10px;
|
|
box-shadow: 0 4px 12px rgba(255, 94, 58, 0.3);
|
|
}
|
|
|
|
.auth-button:hover {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 6px 20px rgba(255, 94, 58, 0.4);
|
|
filter: brightness(1.05);
|
|
}
|
|
|
|
.auth-button:active {
|
|
transform: translateY(0);
|
|
box-shadow: 0 2px 8px rgba(255, 94, 58, 0.3);
|
|
}
|
|
|
|
.auth-button:disabled {
|
|
background-color: #f9a799;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* SSO / OIDC button */
|
|
.auth-button-oidc {
|
|
background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
|
|
box-shadow: 0 4px 12px rgba(45, 55, 72, 0.3);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.auth-button-oidc:hover {
|
|
box-shadow: 0 6px 20px rgba(45, 55, 72, 0.4);
|
|
}
|
|
|
|
.auth-button-oidc i {
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* Divider between password and SSO login */
|
|
.auth-divider {
|
|
display: flex;
|
|
align-items: center;
|
|
margin: 20px 0;
|
|
color: #a0aec0;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.auth-divider::before,
|
|
.auth-divider::after {
|
|
content: '';
|
|
flex: 1;
|
|
height: 1px;
|
|
background: #e2e8f0;
|
|
}
|
|
|
|
.auth-divider span {
|
|
padding: 0 12px;
|
|
}
|
|
|
|
/* OIDC-only mode: hide password form */
|
|
.auth-form.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.auth-toggle {
|
|
margin-top: 20px;
|
|
font-size: 14px;
|
|
color: #718096;
|
|
}
|
|
|
|
.auth-toggle-link {
|
|
color: #ff5e3a;
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.auth-toggle-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.auth-error {
|
|
background-color: #fee2e2;
|
|
color: #b91c1c;
|
|
padding: 10px 15px;
|
|
border-radius: 8px;
|
|
margin-bottom: 20px;
|
|
font-size: 14px;
|
|
display: none;
|
|
}
|
|
|
|
.auth-success {
|
|
background-color: #dcfce7;
|
|
color: #15803d;
|
|
padding: 10px 15px;
|
|
border-radius: 8px;
|
|
margin-bottom: 20px;
|
|
font-size: 14px;
|
|
display: none;
|
|
}
|
|
|
|
/* Admin setup panel styles */
|
|
.admin-setup-panel {
|
|
display: none;
|
|
}
|
|
|
|
.setup-steps {
|
|
margin-bottom: 25px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.setup-step {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
width: 30%;
|
|
}
|
|
|
|
.step-number {
|
|
width: 30px;
|
|
height: 30px;
|
|
background-color: #e2e8f0;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: #64748b;
|
|
font-weight: bold;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.step-number.active {
|
|
background-color: #ff5e3a;
|
|
color: white;
|
|
}
|
|
|
|
.step-title {
|
|
font-size: 12px;
|
|
color: #64748b;
|
|
}
|
|
|
|
.step-title.active {
|
|
color: #1e293b;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* Language selector panel styles */
|
|
.language-selector-panel {
|
|
text-align: center;
|
|
}
|
|
|
|
.language-subtitle {
|
|
color: #64748b;
|
|
font-size: 16px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
/* ====== Compact Language Picker ====== */
|
|
.lang-picker {
|
|
position: relative;
|
|
margin-bottom: 24px;
|
|
text-align: left;
|
|
}
|
|
|
|
.lang-picker-selected {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 14px 18px;
|
|
border: 2px solid #e2e8f0;
|
|
border-radius: 12px;
|
|
cursor: pointer;
|
|
background-color: #f9fafb;
|
|
transition: all 0.2s ease;
|
|
user-select: none;
|
|
}
|
|
|
|
.lang-picker-selected:hover {
|
|
border-color: #ff5e3a;
|
|
background-color: #fff;
|
|
}
|
|
|
|
.lang-picker.open .lang-picker-selected {
|
|
border-color: #ff5e3a;
|
|
background-color: #fff;
|
|
border-bottom-left-radius: 0;
|
|
border-bottom-right-radius: 0;
|
|
box-shadow: 0 0 0 3px rgba(255, 94, 58, 0.1);
|
|
}
|
|
|
|
.lang-picker-flag {
|
|
font-size: 26px;
|
|
margin-right: 14px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.lang-picker-name {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: #1e293b;
|
|
flex: 1;
|
|
}
|
|
|
|
.lang-picker-arrow {
|
|
color: #94a3b8;
|
|
font-size: 13px;
|
|
transition: transform 0.2s ease;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.lang-picker.open .lang-picker-arrow {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
/* Dropdown */
|
|
.lang-picker-dropdown {
|
|
display: none;
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 0;
|
|
right: 0;
|
|
background: #fff;
|
|
border: 2px solid #ff5e3a;
|
|
border-top: 1px solid #f1f5f9;
|
|
border-bottom-left-radius: 12px;
|
|
border-bottom-right-radius: 12px;
|
|
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
|
|
z-index: 100;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.lang-picker.open .lang-picker-dropdown {
|
|
display: block;
|
|
animation: langPickerSlideDown 0.2s ease;
|
|
}
|
|
|
|
@keyframes langPickerSlideDown {
|
|
from { opacity: 0; transform: translateY(-4px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* Search inside dropdown */
|
|
.lang-picker-search {
|
|
position: relative;
|
|
padding: 10px 14px;
|
|
border-bottom: 1px solid #f1f5f9;
|
|
}
|
|
|
|
.lang-picker-search i {
|
|
position: absolute;
|
|
left: 26px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
color: #94a3b8;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.lang-picker-search input {
|
|
width: 100%;
|
|
padding: 8px 12px 8px 32px;
|
|
border: 1px solid #e2e8f0;
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
outline: none;
|
|
box-sizing: border-box;
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
.lang-picker-search input:focus {
|
|
border-color: #ff5e3a;
|
|
}
|
|
|
|
/* Scrollable list */
|
|
.lang-picker-list {
|
|
max-height: 240px;
|
|
overflow-y: auto;
|
|
padding: 6px;
|
|
}
|
|
|
|
.lang-picker-list::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.lang-picker-list::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
.lang-picker-list::-webkit-scrollbar-thumb {
|
|
background: #cbd5e1;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.lang-picker-list::-webkit-scrollbar-thumb:hover {
|
|
background: #94a3b8;
|
|
}
|
|
|
|
/* Language item in dropdown */
|
|
.lang-picker-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px 12px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
transition: all 0.12s ease;
|
|
}
|
|
|
|
.lang-picker-item:hover {
|
|
background: #f8fafc;
|
|
}
|
|
|
|
.lang-picker-item.selected {
|
|
background: #fff5f3;
|
|
}
|
|
|
|
.lang-picker-item-flag {
|
|
font-size: 22px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.lang-picker-item-name {
|
|
font-size: 15px;
|
|
font-weight: 500;
|
|
color: #1e293b;
|
|
}
|
|
|
|
.lang-picker-item-english {
|
|
font-size: 13px;
|
|
color: #94a3b8;
|
|
margin-left: auto;
|
|
}
|
|
|
|
.lang-picker-item-check {
|
|
color: #ff5e3a;
|
|
font-size: 13px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.lang-picker-empty {
|
|
text-align: center;
|
|
color: #94a3b8;
|
|
padding: 20px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.auth-panel {
|
|
width: 90%;
|
|
padding: 20px;
|
|
}
|
|
|
|
.lang-picker-selected {
|
|
padding: 12px 14px;
|
|
}
|
|
|
|
.lang-picker-list {
|
|
max-height: 200px;
|
|
}
|
|
}
|
|
|
|
/* ============================================================
|
|
DARK MODE — Auth Pages
|
|
============================================================ */
|
|
[data-theme="dark"] .auth-container {
|
|
background-color: #0f172a;
|
|
}
|
|
[data-theme="dark"] .auth-panel {
|
|
background-color: #1e293b;
|
|
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
|
|
}
|
|
[data-theme="dark"] .auth-logo-text {
|
|
color: #f1f5f9;
|
|
}
|
|
[data-theme="dark"] .auth-title {
|
|
color: #f1f5f9;
|
|
}
|
|
[data-theme="dark"] .auth-label {
|
|
color: #94a3b8;
|
|
}
|
|
[data-theme="dark"] .auth-input {
|
|
background-color: #0f172a;
|
|
border-color: #334155;
|
|
color: #e2e8f0;
|
|
}
|
|
[data-theme="dark"] .auth-input:focus {
|
|
border-color: #ff5e3a;
|
|
background-color: #0f172a;
|
|
box-shadow: 0 0 0 3px rgba(255, 94, 58, 0.15);
|
|
}
|
|
[data-theme="dark"] .auth-input::placeholder {
|
|
color: #64748b;
|
|
}
|
|
[data-theme="dark"] .auth-error {
|
|
background-color: #3b1111;
|
|
color: #fca5a5;
|
|
}
|
|
[data-theme="dark"] .auth-success {
|
|
background-color: #052e16;
|
|
color: #86efac;
|
|
}
|
|
[data-theme="dark"] .auth-toggle {
|
|
color: #94a3b8;
|
|
}
|
|
[data-theme="dark"] .auth-divider {
|
|
color: #64748b;
|
|
}
|
|
[data-theme="dark"] .auth-divider::before,
|
|
[data-theme="dark"] .auth-divider::after {
|
|
background: #334155;
|
|
}
|
|
[data-theme="dark"] .language-subtitle {
|
|
color: #94a3b8;
|
|
}
|
|
[data-theme="dark"] .lang-picker-selected {
|
|
background-color: #0f172a;
|
|
border-color: #334155;
|
|
}
|
|
[data-theme="dark"] .lang-picker-selected:hover {
|
|
border-color: #ff5e3a;
|
|
background-color: #162032;
|
|
}
|
|
[data-theme="dark"] .lang-picker.open .lang-picker-selected {
|
|
border-color: #ff5e3a;
|
|
background-color: #162032;
|
|
}
|
|
[data-theme="dark"] .lang-picker-name {
|
|
color: #f1f5f9;
|
|
}
|
|
[data-theme="dark"] .lang-picker-arrow {
|
|
color: #64748b;
|
|
}
|
|
[data-theme="dark"] .lang-picker-dropdown {
|
|
background: #1e293b;
|
|
border-color: #ff5e3a;
|
|
border-top-color: #334155;
|
|
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
|
|
}
|
|
[data-theme="dark"] .lang-picker-search {
|
|
border-bottom-color: #334155;
|
|
}
|
|
[data-theme="dark"] .lang-picker-search input {
|
|
background-color: #0f172a;
|
|
border-color: #334155;
|
|
color: #e2e8f0;
|
|
}
|
|
[data-theme="dark"] .lang-picker-search input:focus {
|
|
border-color: #ff5e3a;
|
|
}
|
|
[data-theme="dark"] .lang-picker-search input::placeholder {
|
|
color: #64748b;
|
|
}
|
|
[data-theme="dark"] .lang-picker-list::-webkit-scrollbar-thumb {
|
|
background: #475569;
|
|
}
|
|
[data-theme="dark"] .lang-picker-item:hover {
|
|
background: #162032;
|
|
}
|
|
[data-theme="dark"] .lang-picker-item.selected {
|
|
background: #2a1a15;
|
|
}
|
|
[data-theme="dark"] .lang-picker-item-name {
|
|
color: #f1f5f9;
|
|
}
|
|
[data-theme="dark"] .lang-picker-item-english {
|
|
color: #64748b;
|
|
}
|
|
[data-theme="dark"] .lang-picker-empty {
|
|
color: #64748b;
|
|
}
|
|
/* Setup steps */
|
|
[data-theme="dark"] .step-number {
|
|
background-color: #334155;
|
|
color: #94a3b8;
|
|
}
|
|
[data-theme="dark"] .step-title {
|
|
color: #94a3b8;
|
|
}
|