New IDs, finish Submit Translation page and begin BIG TS.
This commit is contained in:
20
ts/submissions/index.ts
Normal file
20
ts/submissions/index.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import {type Can_Upload_Detail, during_upload, I} from "./globals";
|
||||
import {Upload} from "./class-upload";
|
||||
import {DropContainer} from "./class-drop-container";
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
if( !document.getElementById( 'fileInput' ) ) // Check if exists.
|
||||
|
||||
// @ts-ignore
|
||||
I.drop_container = new DropContainer( document.getElementById( 'file-container' ) as HTMLElement, document.getElementById( 'file-container-text' ) as HTMLElement );
|
||||
|
||||
// @ts-ignore
|
||||
document.addEventListener( 'can_upload', (e: CustomEvent<Can_Upload_Detail> ) => {
|
||||
|
||||
const { file } = e.detail;
|
||||
if( !during_upload ) // @ts-ignore
|
||||
I.upload = new Upload( file );
|
||||
|
||||
});
|
||||
})
|
||||
Reference in New Issue
Block a user