Remove the pull/push/revert buttons that I haven't used in ages.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4118 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2023-01-12 00:57:56 +00:00
parent a5ba014736
commit 6ed057089b
2 changed files with 0 additions and 22 deletions

View File

@ -11,7 +11,6 @@ let gEditor;
let gSplit; let gSplit;
let gGraphs = {}; let gGraphs = {};
let gTimeSeries = {}; let gTimeSeries = {};
let gParentApp;
let gOriginalInput; let gOriginalInput;
let kErrorColor = "#dc322f"; let kErrorColor = "#dc322f";
@ -251,8 +250,6 @@ function explodePath() {
function save(save_to) { function save(save_to) {
document.getElementById("save").disabled = true; document.getElementById("save").disabled = true;
document.getElementById("push_to_parent").disabled = true;
document.getElementById("pull_from_parent").disabled = true;
if (gCurrentFile) { if (gCurrentFile) {
gFiles[gCurrentFile].doc = gEditor.getDoc(); gFiles[gCurrentFile].doc = gEditor.getDoc();
} }
@ -323,8 +320,6 @@ function save(save_to) {
alert(error); alert(error);
}).finally(function() { }).finally(function() {
document.getElementById("save").disabled = false; document.getElementById("save").disabled = false;
document.getElementById("push_to_parent").disabled = false;
document.getElementById("pull_from_parent").disabled = false;
Object.values(gFiles).forEach(function(file) { Object.values(gFiles).forEach(function(file) {
file.generation = file.doc.changeGeneration(); file.generation = file.doc.changeGeneration();
}); });
@ -348,16 +343,6 @@ function deleteApp() {
} }
} }
function pullFromParent() {
load(gParentApp ? gParentApp.path : null).then(x => save()).catch(function(error) {
alert(error)
});
}
function pushToParent() {
save(gParentApp ? gParentApp.path : null);
}
function url() { function url() {
let hash = window.location.href.indexOf('#'); let hash = window.location.href.indexOf('#');
let question = window.location.href.indexOf('?'); let question = window.location.href.indexOf('?');
@ -535,11 +520,7 @@ function _receive_websocket_message(message) {
if (message && message.action == "session") { if (message && message.action == "session") {
setStatusMessage("🟢 Executing...", kStatusColor); setStatusMessage("🟢 Executing...", kStatusColor);
gCredentials = message.credentials; gCredentials = message.credentials;
gParentApp = message.parentApp;
updateLogin(); updateLogin();
let parent_enabled = message.parentApp;
document.getElementById('push_to_parent').style.display = parent_enabled ? 'inline-block' : 'none';
document.getElementById('pull_from_parent').style.display = parent_enabled ? 'inline-block' : 'none';
} else if (message && message.action == 'permissions') { } else if (message && message.action == 'permissions') {
gPermissions = message.permissions; gPermissions = message.permissions;
let permissions = document.getElementById('permissions_settings'); let permissions = document.getElementById('permissions_settings');

View File

@ -31,9 +31,6 @@
<input type="button" id="closeEditor" name="closeEditor" value="Close" onclick="closeEditor()"> <input type="button" id="closeEditor" name="closeEditor" value="Close" onclick="closeEditor()">
<input type="button" id="save" name="save" value="Save" onclick="save()"> <input type="button" id="save" name="save" value="Save" onclick="save()">
<input type="text" id="name" name="name" style="flex: 1 1; min-width: 1em"></input> <input type="text" id="name" name="name" style="flex: 1 1; min-width: 1em"></input>
<input type="button" id="push_to_parent" value="Push to Parent" onclick="pushToParent()">
<input type="button" id="pull_from_parent" value="Pull from Parent" onclick="pullFromParent()">
<input type="button" id="revert" name="revert" value="Revert" onclick="revert()">
<input type="button" id="delete" name="delete" value="Delete" onclick="deleteApp()"> <input type="button" id="delete" name="delete" value="Delete" onclick="deleteApp()">
<input type="button" onclick="event.preventDefault(); trace()" value="Trace"> <input type="button" onclick="event.preventDefault(); trace()" value="Trace">
<input type="button" onclick="event.preventDefault(); toggleStats()" value="Stats"> <input type="button" onclick="event.preventDefault(); toggleStats()" value="Stats">