Compare commits

..

No commits in common. "c7415036659f122083371368ae1737c490c31da4" and "c995d090a53bff8e833e0e3fae15285f64771ee2" have entirely different histories.

2 changed files with 7 additions and 18 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "multi-hoster-uploader", "name": "multi-hoster-uploader",
"version": "3.3.19", "version": "3.3.18",
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously", "description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {

View File

@ -3218,24 +3218,13 @@ async function checkSingleAccount(accountId) {
updateAccountCard(accountId); updateAccountCard(accountId);
} }
// Per-hoster overrides for the login form. VOE only accepts emails — the function getCredsFieldsHtml(authType, account) {
// generic "Username / E-Mail" label sent users down a confusing rabbit hole
// (login fails → upload fetches login redirect → "CSRF token nicht gefunden").
// Other hosters that genuinely accept either keep the generic wording.
const LOGIN_FIELD_LABELS = {
'voe.sx': { label: 'E-Mail', placeholder: 'E-Mail-Adresse', inputType: 'email' }
};
function getCredsFieldsHtml(authType, account, hoster) {
account = account || {}; account = account || {};
if (authType === 'login') { if (authType === 'login') {
const fld = (hoster && LOGIN_FIELD_LABELS[hoster]) || {
label: 'Username / E-Mail', placeholder: 'Username oder E-Mail', inputType: 'text'
};
return ` return `
<div class="settings-row"> <div class="settings-row">
<label>${escapeHtml(fld.label)}</label> <label>Username / E-Mail</label>
<input type="${fld.inputType}" class="key-input" id="accField_username" value="${escapeAttr(account.username || '')}" placeholder="${escapeAttr(fld.placeholder)}"> <input type="text" class="key-input" id="accField_username" value="${escapeAttr(account.username || '')}" placeholder="Username oder E-Mail">
</div> </div>
<div class="settings-row"> <div class="settings-row">
<label>Passwort</label> <label>Passwort</label>
@ -3274,7 +3263,7 @@ function openAccountModal(editAccountId) {
subtitle.textContent = `Zugangsdaten für ${getAccountDisplayName(found.name, found.account)} bearbeiten.`; subtitle.textContent = `Zugangsdaten für ${getAccountDisplayName(found.name, found.account)} bearbeiten.`;
hosterRow.style.display = 'none'; hosterRow.style.display = 'none';
saveBtn.textContent = 'Speichern & prüfen'; saveBtn.textContent = 'Speichern & prüfen';
credsContainer.innerHTML = getCredsFieldsHtml(found.account.authType || 'login', found.account, found.name); credsContainer.innerHTML = getCredsFieldsHtml(found.account.authType || 'login', found.account);
} else { } else {
// Add mode — always show all options (multiple accounts per hoster allowed) // Add mode — always show all options (multiple accounts per hoster allowed)
title.textContent = 'Account hinzufügen'; title.textContent = 'Account hinzufügen';
@ -3285,7 +3274,7 @@ function openAccountModal(editAccountId) {
`<option value="${opt.value}">${escapeHtml(opt.label)}</option>` `<option value="${opt.value}">${escapeHtml(opt.label)}</option>`
).join(''); ).join('');
const firstOpt = HOSTER_ADD_OPTIONS[0]; const firstOpt = HOSTER_ADD_OPTIONS[0];
credsContainer.innerHTML = getCredsFieldsHtml(firstOpt.authType, {}, firstOpt.value); credsContainer.innerHTML = getCredsFieldsHtml(firstOpt.authType, {});
} }
// Toggle visibility buttons // Toggle visibility buttons
@ -3901,7 +3890,7 @@ function setupListeners() {
const opt = HOSTER_ADD_OPTIONS.find(o => o.value === e.target.value); const opt = HOSTER_ADD_OPTIONS.find(o => o.value === e.target.value);
const authType = opt ? opt.authType : 'login'; const authType = opt ? opt.authType : 'login';
const credsContainer = document.getElementById('accountCredsFields'); const credsContainer = document.getElementById('accountCredsFields');
credsContainer.innerHTML = getCredsFieldsHtml(authType, {}, e.target.value); credsContainer.innerHTML = getCredsFieldsHtml(authType, {});
credsContainer.querySelectorAll('.toggle-vis').forEach(btn => { credsContainer.querySelectorAll('.toggle-vis').forEach(btn => {
btn.addEventListener('click', () => { btn.addEventListener('click', () => {
const input = btn.previousElementSibling; const input = btn.previousElementSibling;