#317 disabled toot button when offline
This commit is contained in:
parent
99c2f0fc8d
commit
bdfeae20f2
|
@ -216,3 +216,13 @@ if(pwa) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const connection = function (event) {
|
||||||
|
console.log(navigator.onLine, 'network state')
|
||||||
|
if(!navigator.onLine) {
|
||||||
|
$('#toot-post-btn').addClass('disabled')
|
||||||
|
} else {
|
||||||
|
$('#toot-post-btn').removeClass('disabled')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.onoffline = connection
|
||||||
|
window.ononline = connection
|
|
@ -101,7 +101,7 @@ if (location.search) {
|
||||||
$('.mini-btn').text('expand_less')
|
$('.mini-btn').text('expand_less')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.onload = initPostbox
|
window.onload = function () { initPostbox(); connection() }
|
||||||
function initPostbox() {
|
function initPostbox() {
|
||||||
$('#posttgl').click(function (e) {
|
$('#posttgl').click(function (e) {
|
||||||
if (!$('#post-box').hasClass('appear')) {
|
if (!$('#post-box').hasClass('appear')) {
|
||||||
|
|
|
@ -1085,7 +1085,7 @@
|
||||||
<!--TLのTL-->
|
<!--TLのTL-->
|
||||||
<div id="timeline-container">
|
<div id="timeline-container">
|
||||||
<div id="something-wrong">
|
<div id="something-wrong">
|
||||||
<img src="../../img/desk.svg" style="width:150px;margin:5px;display:none;" draggable="false" />
|
<img src="../../img/thinking.svg" style="width:150px;margin:5px;display:none;" draggable="false" />
|
||||||
<div class="stw" style="display: none">@@helloTheDesk@@</div>
|
<div class="stw" style="display: none">@@helloTheDesk@@</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
<script src="../../@@node_base@@/vue/dist/vue.min.js"></script>
|
<script src="../../@@node_base@@/vue/dist/vue.min.js"></script>
|
||||||
<script type="text/javascript" src="setting.vue.js"></script>
|
<script type="text/javascript" src="setting.vue.js"></script>
|
||||||
<script type="text/javascript" src="../../@@node_base@@/sweetalert2/dist/sweetalert2.all.min.js"></script>
|
<script type="text/javascript" src="../../@@node_base@@/sweetalert2/dist/sweetalert2.all.min.js"></script>
|
||||||
|
<script>function renderMem() {return false; }</script>
|
||||||
|
|
||||||
<h4>@@setting@@</h4>
|
<h4>@@setting@@</h4>
|
||||||
<ul class="collapsible" data-collapsible="accordion">
|
<ul class="collapsible" data-collapsible="accordion">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user