diff --git a/mtda/assets/dropzone.css b/mtda/assets/dropzone.css new file mode 100644 index 00000000..a332e3f7 --- /dev/null +++ b/mtda/assets/dropzone.css @@ -0,0 +1,40 @@ +/* --------------------------------------------------------------------------- + Copyright (C) 2024 Siemens AG + --------------------------------------------------------------------------- + SPDX-License-Identifier: MIT + --------------------------------------------------------------------------- +*/ + +#dropzone { + width: 100%; + max-width: 600px; + height: 200px; + border: 2px dashed #888; + border-radius: 10px; + display: flex; + justify-content: center; + align-items: center; + text-align: center; + color: #888; + font-size: 18px; + margin: 20px auto; + cursor: pointer; +} + +#dropzone.hover { + border-color: #333; + color: #333; +} + +button { + display: block; + margin: 20px auto; + padding: 10px 20px; + font-size: 16px; + cursor: pointer; +} + +button:disabled { + cursor: not-allowed; + opacity: 0.5; +} diff --git a/mtda/constants.py b/mtda/constants.py index ee74eb0c..e6294576 100644 --- a/mtda/constants.py +++ b/mtda/constants.py @@ -66,6 +66,7 @@ class STORAGE: ON_TARGET = "TARGET" LOCKED = "LOCKED" UNLOCKED = "UNLOCKED" + OPENED = "OPENED" UNKNOWN = "???" RETRY_INTERVAL = 0.5 TIMEOUT = 30 diff --git a/mtda/main.py b/mtda/main.py index 49d89166..ef5fe43b 100644 --- a/mtda/main.py +++ b/mtda/main.py @@ -779,6 +779,7 @@ def storage_open(self, session=None): self._storage_opened = True self._storage_owner = session self._writer.start() + self._storage_event(CONSTS.STORAGE.OPENED, session) if self.storage is not None: self.storage_locked() diff --git a/mtda/templates/index.html b/mtda/templates/index.html index d6589607..5dd954a9 100644 --- a/mtda/templates/index.html +++ b/mtda/templates/index.html @@ -8,6 +8,7 @@ + @@ -81,6 +82,7 @@