Compare commits
1 Commits
rewrite
...
bc796f2aa4
| Author | SHA1 | Date | |
|---|---|---|---|
| bc796f2aa4 |
@@ -60,8 +60,6 @@ export function FileChooser({ onSelected, config }: FileChooserProps) {
|
|||||||
URL.revokeObjectURL(url);
|
URL.revokeObjectURL(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
const hasConfig = !!config && !config.isEmpty();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="bg-white rounded-xl shadow-md p-4 border border-slate-200">
|
<div className="bg-white rounded-xl shadow-md p-4 border border-slate-200">
|
||||||
<div className="flex items-center gap-4 flex-wrap">
|
<div className="flex items-center gap-4 flex-wrap">
|
||||||
@@ -91,8 +89,8 @@ export function FileChooser({ onSelected, config }: FileChooserProps) {
|
|||||||
onClick={handleDownload}
|
onClick={handleDownload}
|
||||||
icon={Download}
|
icon={Download}
|
||||||
size="sm"
|
size="sm"
|
||||||
disabled={!hasConfig}
|
disabled={!config}
|
||||||
title={hasConfig ? 'Download full config template' : 'Load or create a config first'}
|
title="Download full config template"
|
||||||
>
|
>
|
||||||
Download
|
Download
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -171,22 +171,4 @@ export class Config {
|
|||||||
cloned.template = this.template;
|
cloned.template = this.template;
|
||||||
return cloned;
|
return cloned;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if config is empty (no environments or only DEFAULT with no params and empty template)
|
|
||||||
*/
|
|
||||||
public isEmpty(): boolean {
|
|
||||||
if (this.envs.length === 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if only DEFAULT exists with no params
|
|
||||||
if (this.envs.length === 1 && this.envs[0].name === 'DEFAULT') {
|
|
||||||
const hasParams = this.envs[0].params.length > 0;
|
|
||||||
const hasTemplate = this.template.content.trim() && this.template.content !== '{}';
|
|
||||||
return !hasParams && !hasTemplate;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
{
|
{
|
||||||
"status": "failed",
|
"status": "passed",
|
||||||
"failedTests": [
|
"failedTests": []
|
||||||
"2a84b67ca6571daf27b7-7e9801b0b833c50af541",
|
|
||||||
"2a84b67ca6571daf27b7-17ce5649ea02e0d09692",
|
|
||||||
"2a84b67ca6571daf27b7-46f1d47e52a9de8bb54e",
|
|
||||||
"2a84b67ca6571daf27b7-5ac3b387f0f8104531f1",
|
|
||||||
"2a84b67ca6571daf27b7-61b44892e9e54397b980",
|
|
||||||
"2a84b67ca6571daf27b7-e38411b679b6dd8a5f2c",
|
|
||||||
"2a84b67ca6571daf27b7-ca92b197b6f7ecc9f092",
|
|
||||||
"2a84b67ca6571daf27b7-0c2a356d8582be760d5f"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user