Disable "Download Story as Plaintext" when disconnected

This is to help avoid confusion for people who want to backup their
current story after being disconnected from the server.
This commit is contained in:
Gnome Ann 2021-12-30 16:37:48 -05:00
parent 44eaab8515
commit f9c1e38ee8
2 changed files with 5 additions and 3 deletions

View File

@ -2367,7 +2367,9 @@ $(document).ready(function(){
});
button_downloadtxt.on("click", function(ev) {
downloadStory('plaintext');
if(connected) {
downloadStory('plaintext');
}
});
button_load.on("click", function(ev) {

View File

@ -17,7 +17,7 @@
<script src="static/bootstrap.min.js"></script>
<script src="static/bootstrap-toggle.min.js"></script>
<script src="static/rangy-core.min.js"></script>
<script src="static/application.js?ver=1.16.4r"></script>
<script src="static/application.js?ver=1.16.4s"></script>
</head>
<body>
<input type="file" id="remote-save-select" accept="application/json" style="display:none">
@ -47,7 +47,7 @@
<a class="dropdown-item" href="#" id="btn_saveas">Save As</a>
<a class="dropdown-item" href="#" id="btn_savetofile">Save To File...</a>
<a class="dropdown-item always-available" href="#" id="btn_download">Download Story as JSON</a>
<a class="dropdown-item always-available" href="#" id="btn_downloadtxt">Download Story as Plaintext</a>
<a class="dropdown-item" href="#" id="btn_downloadtxt">Download Story as Plaintext</a>
</div>
</li>
<li class="nav-item dropdown">