forked from Github/Axter-Stash
Enhanced CreateContainer.cmd
Made command line case insensitive. Added error handling incase use enters command option where stash port should be. Change command option for creating image from PULL to IMAGE, and left PULL so as to be backward compatible.
This commit is contained in:
@@ -3,21 +3,27 @@ var OrgNextPage = null;
|
||||
var OrgHomePage = null;
|
||||
var RemoveToKeepConfirmValue = null;
|
||||
var RemoveValidatePromptValue = null;
|
||||
var DisableReloadPageValue = null;
|
||||
let thisUrl = "" + window.location;
|
||||
const isAxterCom = (thisUrl.search("axter.com") > -1);
|
||||
console.log("Cookies = " + document.cookie);
|
||||
const StrRemoveToKeepConfirm = "RemoveToKeepConfirm=";
|
||||
const StrRemoveValidatePrompt = "RemoveValidatePrompt=";
|
||||
const StrDisableReloadPage = "DisableReloadPage=";
|
||||
function SetPaginateButtonChange(){
|
||||
var chkBxRemoveValid = document.getElementById("RemoveValidatePrompt");
|
||||
var chkBxDisableDeleteConfirm = document.getElementById("RemoveToKeepConfirm");
|
||||
var chkBxDisableReloadPage = document.getElementById("DisableReloadPage");
|
||||
RemoveToKeepConfirmValue = StrRemoveToKeepConfirm + "false";
|
||||
RemoveValidatePromptValue = StrRemoveValidatePrompt + "false";
|
||||
DisableReloadPageValue = StrDisableReloadPage + "false";
|
||||
if (chkBxRemoveValid.checked)
|
||||
RemoveToKeepConfirmValue = StrRemoveToKeepConfirm + "true";
|
||||
if (chkBxDisableDeleteConfirm.checked)
|
||||
RemoveValidatePromptValue = StrRemoveValidatePrompt + "true";
|
||||
document.cookie = RemoveToKeepConfirmValue + "&" + RemoveValidatePromptValue + "; SameSite=None; Secure";
|
||||
if (chkBxDisableReloadPage != null && chkBxDisableReloadPage.checked)
|
||||
DisableReloadPageValue = StrDisableReloadPage + "true";
|
||||
document.cookie = RemoveToKeepConfirmValue + "&" + RemoveValidatePromptValue + "&" + DisableReloadPageValue + "; SameSite=None; Secure";
|
||||
console.log("Cookies = " + document.cookie);
|
||||
}
|
||||
function trim(str, ch) {
|
||||
@@ -48,9 +54,11 @@ function RunPluginOperation(Mode, ActionID, button, asyncAjax){ // Mode=Value an
|
||||
$('html').removeClass('wait');
|
||||
$("body").css("cursor", "default");
|
||||
}
|
||||
if (Mode.startsWith("copyScene") || Mode.startsWith("renameFile") || Mode === "clearAllSceneFlags" || Mode.startsWith("clearFlag") || Mode.startsWith("mergeScene") || Mode.startsWith("mergeTags") || (Mode !== "deleteScene" && Mode.startsWith("deleteScene")))
|
||||
window.location.reload();
|
||||
else if (!chkBxRemoveValid.checked && Mode !== "flagScene") alert("Action " + Mode + " for scene(s) ID# " + ActionID + " complete.\\n\\nResults=" + result);
|
||||
if (Mode.startsWith("copyScene") || Mode.startsWith("renameFile") || Mode === "clearAllSceneFlags" || Mode.startsWith("clearFlag") || Mode.startsWith("mergeScene") || Mode.startsWith("mergeTags") || (Mode !== "deleteScene" && Mode.startsWith("deleteScene"))){
|
||||
const chkBxDisableReloadPage = document.getElementById("DisableReloadPage");
|
||||
if (chkBxDisableReloadPage == null || !chkBxDisableReloadPage.checked)
|
||||
window.location.reload();
|
||||
} else if (!chkBxRemoveValid.checked && Mode !== "flagScene") alert("Action " + Mode + " for scene(s) ID# " + ActionID + " complete.\\n\\nResults=" + result);
|
||||
}, error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
console.log("Ajax failed with Status: " + textStatus + "; Error: " + errorThrown);
|
||||
if (asyncAjax){
|
||||
@@ -118,6 +126,8 @@ $(document).ready(function(){
|
||||
console.log("urlParams = " + urlParams);
|
||||
RemoveToKeepConfirmValue = StrRemoveToKeepConfirm + "false";
|
||||
RemoveValidatePromptValue = StrRemoveValidatePrompt + "false";
|
||||
DisableReloadPageValue = StrDisableReloadPage + "false";
|
||||
const chkBxDisableReloadPage = document.getElementById("DisableReloadPage");
|
||||
var FetchCookies = true;
|
||||
if (urlParams.get('RemoveToKeepConfirm') != null && urlParams.get('RemoveToKeepConfirm') !== ""){
|
||||
FetchCookies = false;
|
||||
@@ -136,6 +146,15 @@ $(document).ready(function(){
|
||||
else
|
||||
$( "#RemoveValidatePrompt" ).prop("checked", false);
|
||||
}
|
||||
if (chkBxDisableReloadPage != null && urlParams.get('DisableReloadPage') != null && urlParams.get('DisableReloadPage') !== ""){
|
||||
FetchCookies = false;
|
||||
DisableReloadPageValue = StrDisableReloadPage + urlParams.get('DisableReloadPage');
|
||||
console.log("DisableReloadPageValue = " + DisableReloadPageValue);
|
||||
if (urlParams.get('DisableReloadPage') === "true")
|
||||
$( "#DisableReloadPage" ).prop("checked", true);
|
||||
else
|
||||
$( "#DisableReloadPage" ).prop("checked", false);
|
||||
}
|
||||
if (FetchCookies){
|
||||
console.log("Cookies = " + document.cookie);
|
||||
var cookies = document.cookie;
|
||||
@@ -157,6 +176,15 @@ $(document).ready(function(){
|
||||
else
|
||||
$( "#RemoveValidatePrompt" ).prop("checked", false);
|
||||
}
|
||||
if (chkBxDisableReloadPage != null && cookies.indexOf(StrDisableReloadPage) > -1){
|
||||
var idx = cookies.indexOf(StrDisableReloadPage) + StrDisableReloadPage.length;
|
||||
var s = cookies.substring(idx);
|
||||
console.log("StrDisableReloadPage Cookie = " + s);
|
||||
if (s.startsWith("true"))
|
||||
$( "#DisableReloadPage" ).prop("checked", true);
|
||||
else
|
||||
$( "#DisableReloadPage" ).prop("checked", false);
|
||||
}
|
||||
}
|
||||
SetPaginateButtonChange();
|
||||
function ProcessClick(This_){
|
||||
@@ -254,4 +282,7 @@ $(document).ready(function(){
|
||||
$("#RemoveToKeepConfirm").change(function() {
|
||||
SetPaginateButtonChange();
|
||||
});
|
||||
$("#DisableReloadPage").change(function() {
|
||||
SetPaginateButtonChange();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -120,8 +120,11 @@ var GraphQl_URL = "http://localhost:9999/graphql";
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td><input type="checkbox" id="RemoveValidatePrompt" name="RemoveValidatePrompt"><label for="RemoveValidatePrompt" title="Disable notice for task completion (Popup).">Disable Complete Confirmation</label><br></td>
|
||||
<td><input type="checkbox" id="RemoveToKeepConfirm" name="RemoveToKeepConfirm"><label for="RemoveToKeepConfirm" title="Disable confirmation prompts for delete scenes">Disable Delete Confirmation</label><br></td>
|
||||
<td>
|
||||
<input type="checkbox" id="RemoveValidatePrompt" name="RemoveValidatePrompt"><label for="RemoveValidatePrompt" title="Disable notice for task completion (Popup).">Disable Complete Confirmation</label>
|
||||
<input type="checkbox" id="RemoveToKeepConfirm" name="RemoveToKeepConfirm"><label for="RemoveToKeepConfirm" title="Disable confirmation prompts for delete scenes">Disable Delete Confirmation</label>
|
||||
</td>
|
||||
<td><input type="checkbox" id="DisableReloadPage" name="DisableReloadPage"><label for="DisableReloadPage" title="Disable reloading/updating page when making single scene changes.">Disable Updating Page</label><br></td>
|
||||
|
||||
</tr></table></td>
|
||||
</tr></table></center>
|
||||
|
||||
@@ -134,6 +134,7 @@ Users can setup a private or alternate remote site by changing variables **remot
|
||||
### Future Planned Features, Changes, or Fixes
|
||||
- Scheduled Changes
|
||||
- Add option to report to avoid reloading page after updating report. Planned for 1.2.0 Version.
|
||||
- After deleting scene from report, disable preview for the deleted scene on the report. Planned for 1.2.0 Version.
|
||||
- Remove [Max Dup Process] from the Stash->Plugins GUI. This option already exist in advance menu. Planned for 1.2.0 Version.
|
||||
- Add chat icon to report which on hover, displays a popup window showing scene details content. Planned for 1.2.0 Version.
|
||||
- Add image icon to report; on hover show scene cover image. Planned for 1.2.0 Version.
|
||||
|
||||
Reference in New Issue
Block a user