Currently these options require a selection by radiobutton of either "New App" or "Replace".
The "Replace" option is a bit redundant, as "delete app" is available by clicking on an app.
What would be more useful is an "Update" option. "New App" now works to install either the latest version of a github branch ("https://...git" link copied from the Code button) or a specific tagged/release version ("https://...zip" link copied from the Releases section).
One should be able to update, e.g. to a newer (or earlier!) version the same way, leaving files not in the distribution, such as settings and database, untouched.
The changes in _dashboard would be simple, I think:
- re-label 'Replace' as 'Update' in index.html and __init__.py prepare_target_dir()
- in __init__.py prepare_target_dir() remove shutil.rmtree(target_dir), i.e. simply check that target_dir exists in the 'update' case (or does not exist in the 'new app' case).