mirror of
https://github.com/LinkStackOrg/LinkStack.git
synced 2025-03-24 07:20:20 +01:00
Get beta version async
This commit is contained in:
parent
7940045419
commit
100be62385
@ -475,13 +475,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
MODAL;
|
MODAL; // Indentation breaks my code editor :/
|
||||||
}
|
}
|
||||||
notification('', 'modal-1', __('messages.Your security is at risk!'), '<b>' . __('messages.security.msg1') . '</b> ' . __('messages.security.msg2') . '<br><br>' . __('messages.security.msg3') . '<br><a href="' . url('admin/config#5') . '">' . __('messages.security.msg3') . '</a>.');
|
notification('', 'modal-1', __('messages.Your security is at risk!'), '<b>' . __('messages.security.msg1') . '</b> ' . __('messages.security.msg2') . '<br><br>' . __('messages.security.msg3') . '<br><a href="' . url('admin/config#5') . '">' . __('messages.security.msg3') . '</a>.');
|
||||||
notification('hide-star-notification', 'modal-star', __('messages.Support Linkstack'), '' . __('messages.support.msg1') . ' <a target="_blank" href="https://github.com/linkstackorg/linkstack">' . __('messages.support.msg2') . '</a>. ' . __('messages.support.msg3') . '<br><br>' . __('messages.support.msg4') . ' <a target="_blank" href="https://linkstack.org/donate">' . __('messages.support.msg5') . '<br><br>' . __('messages.support.msg6') . '');
|
notification('hide-star-notification', 'modal-star', __('messages.Support Linkstack'), '' . __('messages.support.msg1') . ' <a target="_blank" href="https://github.com/linkstackorg/linkstack">' . __('messages.support.msg2') . '</a>. ' . __('messages.support.msg3') . '<br><br>' . __('messages.support.msg4') . ' <a target="_blank" href="https://linkstack.org/donate">' . __('messages.support.msg5') . '<br><br>' . __('messages.support.msg6') . '');
|
||||||
@endphp
|
@endphp
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
|
@if (auth()->user()->role == 'admin')
|
||||||
|
|
||||||
@push('sidebar-scripts')
|
@push('sidebar-scripts')
|
||||||
<script>
|
<script>
|
||||||
const isVisible = true;
|
const isVisible = true;
|
||||||
@ -513,7 +515,27 @@
|
|||||||
window.location.href = "{{ url()->current() }}";
|
window.location.href = "{{ url()->current() }}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
@if (env('JOIN_BETA') == true)
|
||||||
|
<script>
|
||||||
|
window.onload = async function() {
|
||||||
|
const Vbeta = await externalFileGetContents('https://beta.linkstack.org/vbeta.json');
|
||||||
|
|
||||||
|
const isVisible = true;
|
||||||
|
|
||||||
|
$('#beta-version').text(Vbeta);
|
||||||
|
|
||||||
|
var updateElements = document.getElementsByClassName('update-icon-update');
|
||||||
|
|
||||||
|
for (var i = 0; i < updateElements.length; i++) {
|
||||||
|
updateElements[i].style.display = isVisible ? 'block' : 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
@else
|
||||||
|
<script>
|
||||||
window.onload = async function() {
|
window.onload = async function() {
|
||||||
const Vgit = await externalFileGetContents('https://version.linkstack.org/');
|
const Vgit = await externalFileGetContents('https://version.linkstack.org/');
|
||||||
const Vlocal = `{{ trim($Vlocal) }}`;
|
const Vlocal = `{{ trim($Vlocal) }}`;
|
||||||
@ -532,9 +554,10 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@endif
|
||||||
|
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@if (auth()->user()->role == 'admin')
|
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a href="#" class="nav-link" id="mail-drop"
|
<a href="#" class="nav-link" id="mail-drop"
|
||||||
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
@ -594,8 +617,7 @@
|
|||||||
</center>
|
</center>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<center><span
|
<center><span id="beta-version" class="badge rounded-pill bg-primary"></span>
|
||||||
class="badge rounded-pill bg-primary"><?php echo external_file_get_contents('https://beta.linkstack.org/vbeta.json'); ?></span>
|
|
||||||
</center>
|
</center>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user