Merge remote-tracking branch 'origin/main' into feat/share-folder-browsing

# Conflicts:
#	static/js/views/public/publicShare.js
This commit is contained in:
abnvle
2026-05-10 20:46:29 +02:00
51 changed files with 554 additions and 115 deletions
+2
View File
@@ -1,6 +1,7 @@
import { getCsrfHeaders } from '../../core/csrf.js';
import { escapeHtml } from '../../core/formatters.js';
import { i18n } from '../../core/i18n.js';
import { oxiIconsInit } from '../../core/icons.js';
const API = '/api';
let currentAdminId = '';
@@ -1041,6 +1042,7 @@ async function completeMigration() {
async function init() {
try {
oxiIconsInit();
const me = await fetch(`${API}/auth/me`, {
headers: headers(),
credentials: 'same-origin'
@@ -1,5 +1,6 @@
// device-verify.js — Extracted from inline <script> in device-verify.html
import { getCsrfHeaders } from '../../core/csrf.js';
import { oxiIconsInit } from '../../core/icons.js';
(() => {
var API_BASE = window.location.origin;
@@ -12,6 +13,8 @@ import { getCsrfHeaders } from '../../core/csrf.js';
var debounceTimer = null;
var currentCode = '';
oxiIconsInit();
// Pre-fill from URL query param (?code=ABCD-1234)
var params = new URLSearchParams(window.location.search);
if (params.get('code')) {
+2
View File
@@ -1,5 +1,6 @@
import { getCsrfHeaders } from '../../core/csrf.js';
import { i18n } from '../../core/i18n.js';
import { oxiIconsInit } from '../../core/icons.js';
const API = '/api';
@@ -29,6 +30,7 @@ function timeAgo(dateStr) {
async function init() {
try {
oxiIconsInit();
const resp = await fetch(`${API}/auth/me`, {
headers: headers(),
credentials: 'same-origin'
+5
View File
@@ -1,3 +1,5 @@
import { oxiIconsInit } from '../../core/icons';
/**
* publicShare.js — client-side logic for /s/{token}.
* Drives the password / file / folder / expired states and renders the
@@ -27,6 +29,9 @@ import { uiFileTypes } from '../../app/uiFileTypes.js';
const pathParts = window.location.pathname.split('/');
const tokenIdx = pathParts.indexOf('s');
const TOKEN = tokenIdx !== -1 ? pathParts[tokenIdx + 1] : null;
oxiIconsInit();
if (!TOKEN) {
showState('expired');
if ($expiredMsg) $expiredMsg.textContent = 'Invalid share link.';