semperai / amica

Amica is an open source interface for interactive communication with 3D characters with voice synthesis and speech recognition.
https://heyamica.com
MIT License
581 stars 92 forks source link

Bug: Local Vrm upload cancel not resetting page state #94

Open danyyil-pelekhatyi opened 2 months ago

danyyil-pelekhatyi commented 2 months ago

Path to reproduce: 1) Go to website 2) Upload VRM using Load Vrm feature 3) Click Share 4) On share page click Upload VRM button 5) Before upload starts click round downloading icon to cancel upload

Actual result: Empty Vrm Url field and empty Vrm Demo shown

Expected result: Page resets to previous state before download: Vrm Url field and Vrm Demo are hidden, Upload Local VRM message and button is shown

Basically, we need to call this code on cancel:

if (vrmLoadingFromIndexedDb)
    setVrmLoadingFromIndexedDb(false);