mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 14:23:58 +00:00
fix
This commit is contained in:
@@ -179,7 +179,7 @@ function ElectronFilesInput() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractUrlName(url) {
|
function extractUrlName(url, values) {
|
||||||
const match = url.match(/\/([^/]+)($|\?)/);
|
const match = url.match(/\/([^/]+)($|\?)/);
|
||||||
if (match) {
|
if (match) {
|
||||||
const res = match[1];
|
const res = match[1];
|
||||||
@@ -188,7 +188,7 @@ function extractUrlName(url) {
|
|||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
return 'url';
|
return `url${values && values.sourceList ? values.sourceList.length + 1 : '1'}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function FilesInput({ setPreviewSource = undefined }) {
|
function FilesInput({ setPreviewSource = undefined }) {
|
||||||
@@ -203,7 +203,7 @@ function FilesInput({ setPreviewSource = undefined }) {
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
fileName: url,
|
fileName: url,
|
||||||
shortName: extractUrlName(url),
|
shortName: extractUrlName(url, values),
|
||||||
isDownload: true,
|
isDownload: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -399,7 +399,7 @@ function SourceName({ name }) {
|
|||||||
<div>{name}</div>
|
<div>{name}</div>
|
||||||
<SourceNameButtons>
|
<SourceNameButtons>
|
||||||
{obj && !!obj.isDownload && (
|
{obj && !!obj.isDownload && (
|
||||||
<IconButtonWrapper onClick={handleChangeUrl} theme={theme}>
|
<IconButtonWrapper onClick={handleChangeUrl} theme={theme} title={obj && obj.fileName}>
|
||||||
<FontIcon icon="icon web" />
|
<FontIcon icon="icon web" />
|
||||||
</IconButtonWrapper>
|
</IconButtonWrapper>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user