mirror of
https://github.com/imgfloat/server.git
synced 2026-03-22 23:10:38 +00:00
Improve script UI
This commit is contained in:
@@ -7,6 +7,7 @@ export function createCustomAssetModal({
|
||||
const launchModal = document.getElementById("custom-asset-launch-modal");
|
||||
const launchNewButton = document.getElementById("custom-asset-launch-new");
|
||||
const launchMarketplaceButton = document.getElementById("custom-asset-launch-marketplace");
|
||||
const assetFileInput = document.getElementById("asset-file");
|
||||
const marketplaceModal = document.getElementById("custom-asset-marketplace-modal");
|
||||
const marketplaceCloseButton = document.getElementById("custom-asset-marketplace-close");
|
||||
const marketplaceSearchInput = document.getElementById("custom-asset-marketplace-search");
|
||||
@@ -234,6 +235,13 @@ export function createCustomAssetModal({
|
||||
if (launchMarketplaceButton) {
|
||||
launchMarketplaceButton.addEventListener("click", () => openMarketplaceModal());
|
||||
}
|
||||
if (assetFileInput) {
|
||||
assetFileInput.addEventListener("change", (event) => {
|
||||
if (event.target?.files?.length) {
|
||||
closeLaunchModal();
|
||||
}
|
||||
});
|
||||
}
|
||||
if (marketplaceModal) {
|
||||
marketplaceModal.addEventListener("click", (event) => {
|
||||
if (event.target === marketplaceModal) {
|
||||
|
||||
Reference in New Issue
Block a user