feature: client: modules: upload: migrate to ESM

This commit is contained in:
coderiaser 2026-01-29 18:18:39 +02:00
parent 9543f1adb0
commit 5182cb8107
2 changed files with 15 additions and 17 deletions

View file

@ -5,8 +5,8 @@ import currify from 'currify';
import {tryToCatch} from 'try-to-catch';
import clipboard from '@cloudcmd/clipboard';
import * as Events from '#dom/events';
import {getRange} from './get-range.mjs';
import {uploadFiles} from '#dom/upload-files';
import {getRange} from './get-range.mjs';
import {FS} from '../../common/cloudfunc.mjs';
import {getIndex} from './get-index.mjs';

View file

@ -1,23 +1,21 @@
/* global CloudCmd, DOM */
import createElement from '@cloudcmd/create-element';
import * as Files from '#dom/files';
import {uploadFiles} from '#dom/upload-files';
import * as Images from '../dom/images.mjs';
'use strict';
CloudCmd.Upload = exports;
const createElement = require('@cloudcmd/create-element');
const Files = require('#dom/files');
const Images = require('../dom/images.mjs');
const {uploadFiles} = require('#dom/upload-files');
module.exports.init = async () => {
Images.show.load('top');
await CloudCmd.View();
CloudCmd.Upload = {
init,
show,
hide,
};
module.exports.show = show;
module.exports.hide = hide;
export async function init() {
Images.show.load('top');
await CloudCmd.View();
}
async function show() {
export async function show() {
Images.show.load('top');
const innerHTML = await Files.get('upload');
@ -49,7 +47,7 @@ async function show() {
});
}
function hide() {
export function hide() {
CloudCmd.View.hide();
}