Update from Git Manager GUI
This commit is contained in:
@@ -2606,6 +2606,7 @@ async function loadGiteaRepos() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const paths = Array.from(files).map(f => f.path);
|
const paths = Array.from(files).map(f => f.path);
|
||||||
|
const uploadSessionId = `drop-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
||||||
setStatus(`Starte Upload von ${paths.length} Elementen...`);
|
setStatus(`Starte Upload von ${paths.length} Elementen...`);
|
||||||
|
|
||||||
for (let i = 0; i < paths.length; i++) {
|
for (let i = 0; i < paths.length; i++) {
|
||||||
@@ -2621,7 +2622,8 @@ async function loadGiteaRepos() {
|
|||||||
destPath: '',
|
destPath: '',
|
||||||
cloneUrl,
|
cloneUrl,
|
||||||
branch: getDefaultBranch(owner, repoName),
|
branch: getDefaultBranch(owner, repoName),
|
||||||
skipBackup: i > 0 // Backup nur beim ersten Element
|
skipBackup: i > 0, // Backup nur beim ersten Element
|
||||||
|
uploadSessionId
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
@@ -2776,6 +2778,7 @@ async function loadRepoContents(owner, repo, path) {
|
|||||||
|
|
||||||
const paths = Array.from(files).map(f => f.path);
|
const paths = Array.from(files).map(f => f.path);
|
||||||
const targetPath = item.path;
|
const targetPath = item.path;
|
||||||
|
const uploadSessionId = `drop-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
||||||
|
|
||||||
for (let i = 0; i < paths.length; i++) {
|
for (let i = 0; i < paths.length; i++) {
|
||||||
const p = paths[i];
|
const p = paths[i];
|
||||||
@@ -2789,7 +2792,8 @@ async function loadRepoContents(owner, repo, path) {
|
|||||||
repo,
|
repo,
|
||||||
destPath: targetPath,
|
destPath: targetPath,
|
||||||
branch: getDefaultBranch(owner, repo),
|
branch: getDefaultBranch(owner, repo),
|
||||||
skipBackup: i > 0 // Backup nur beim ersten Element
|
skipBackup: i > 0, // Backup nur beim ersten Element
|
||||||
|
uploadSessionId
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Upload error:', error);
|
console.error('Upload error:', error);
|
||||||
@@ -3945,9 +3949,11 @@ function setupGlobalDropZone() {
|
|||||||
const targetPath = currentState.path || '';
|
const targetPath = currentState.path || '';
|
||||||
|
|
||||||
const paths = Array.from(files).map(f => f.path);
|
const paths = Array.from(files).map(f => f.path);
|
||||||
|
const uploadSessionId = `drop-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
||||||
setStatus(`Uploading ${paths.length} items to /${targetPath || 'root'}...`);
|
setStatus(`Uploading ${paths.length} items to /${targetPath || 'root'}...`);
|
||||||
|
|
||||||
for (const p of paths) {
|
for (let i = 0; i < paths.length; i++) {
|
||||||
|
const p = paths[i];
|
||||||
const baseName = p.split(/[\\/]/).pop();
|
const baseName = p.split(/[\\/]/).pop();
|
||||||
showProgress(0, `Uploading: ${baseName}`);
|
showProgress(0, `Uploading: ${baseName}`);
|
||||||
|
|
||||||
@@ -3957,7 +3963,9 @@ function setupGlobalDropZone() {
|
|||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
destPath: targetPath,
|
destPath: targetPath,
|
||||||
branch: getDefaultBranch(owner, repo)
|
branch: getDefaultBranch(owner, repo),
|
||||||
|
skipBackup: i > 0,
|
||||||
|
uploadSessionId
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user