mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-28 15:31:37 +00:00
Fix App Uninstall navigation
This commit is contained in:
parent
971eec2b75
commit
e2d52fee56
|
@ -846,6 +846,13 @@ def uninstall_app_page():
|
|||
uninstall_app(app_name)
|
||||
|
||||
flash("Application Uninstalled", category="message")
|
||||
r = request.args.get("return_page")
|
||||
if r:
|
||||
if r == "marketplace_app":
|
||||
return redirect("/marketplace/{}".format(app_name))
|
||||
elif r == "settings":
|
||||
return redirect("/settings")
|
||||
|
||||
return redirect("/apps")
|
||||
|
||||
@mynode_settings.route("/settings/toggle-uploader")
|
||||
|
|
|
@ -40,11 +40,15 @@ function install(name, short_name) {
|
|||
}
|
||||
}
|
||||
|
||||
function uninstall(name, short_name) {
|
||||
function uninstall(name, short_name, return_page="") {
|
||||
if ( confirm("Are you sure you want to uninstall "+name+"? ") ) {
|
||||
$('#loading_spinner_message').html("Uninstalling...");
|
||||
$('#loading_spinner_overlay').fadeIn();
|
||||
window.location.href='/settings/uninstall-app?app='+short_name;
|
||||
r = ""
|
||||
if (return_page != "") {
|
||||
r = "&return_page="+return_page
|
||||
}
|
||||
window.location.href='/settings/uninstall-app?app='+short_name+r;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
|
||||
<div class="main_header">{{app.name}}</div>
|
||||
|
||||
{% include 'includes/message_display.html' %}
|
||||
|
||||
<div class="marketplace_app_page_container">
|
||||
<div class="marketplace_app_page_block_header"> </div>
|
||||
<div class="marketplace_app_page_block_contents">
|
||||
|
@ -72,7 +74,7 @@
|
|||
<button class="ui-button ui-widget ui-corner-all mynode_button marketplace_app_page_button" onclick="reinstall('{{ app.name }}', '{{ app.short_name }}');">Reinstall</button>
|
||||
{% endif %}
|
||||
{% if app.can_uninstall %}
|
||||
<button class="ui-button ui-widget ui-corner-all mynode_button marketplace_app_page_button uninstall_button" onclick="uninstall('{{ app.name }}', '{{ app.short_name }}');">Uninstall</button>
|
||||
<button class="ui-button ui-widget ui-corner-all mynode_button marketplace_app_page_button uninstall_button" onclick="uninstall('{{ app.name }}', '{{ app.short_name }}', 'marketplace_app');">Uninstall</button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user