forked from cory/tildefriends
Add a thing to remove apps from your app list. Should I have called in 'uninstall'?
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3916 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -366,6 +366,22 @@ function save(save_to) {
|
||||
});
|
||||
}
|
||||
|
||||
function deleteApp() {
|
||||
let name = document.getElementById("name");
|
||||
let path = name && name.value ? name.value : url();
|
||||
|
||||
if (confirm(`Are you sure you want to delete the app '${path}'?`)) {
|
||||
fetch(path + 'delete').then(function(response) {
|
||||
if (!response.ok) {
|
||||
throw new Error(response.status + ' ' + response.statusText);
|
||||
}
|
||||
alert('Deleted.');
|
||||
}).catch(function(error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function pullFromParent() {
|
||||
load(gParentApp ? gParentApp.path : null).then(x => save()).catch(function(error) {
|
||||
alert(error)
|
||||
|
Reference in New Issue
Block a user