mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
add 2nd tab warning
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
9d4c591f1a
commit
3ac260837f
2 changed files with 15 additions and 0 deletions
12
php/public/second-tab-warning.js
Normal file
12
php/public/second-tab-warning.js
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
const channel = new BroadcastChannel('tab')
|
||||||
|
|
||||||
|
channel.postMessage('second-tab')
|
||||||
|
// note that listener is added after posting the message
|
||||||
|
|
||||||
|
channel.addEventListener('message', (msg) => {
|
||||||
|
if (msg.data === 'second-tab') {
|
||||||
|
// message received from 2nd tab
|
||||||
|
document.getElementById('overlay').classList.add('loading')
|
||||||
|
alert('Cannot open multiple instances. You can use AIO here by reloading the page.')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
@ -18,6 +18,9 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h1>Nextcloud AIO v2.0.4</h1>
|
<h1>Nextcloud AIO v2.0.4</h1>
|
||||||
|
|
||||||
|
{# Add 2nd tab warning #}
|
||||||
|
<script type="text/javascript" src="second-tab-warning.js"></script>
|
||||||
|
|
||||||
{% set isAnyRunning = false %}
|
{% set isAnyRunning = false %}
|
||||||
{% set isAnyRestarting = false %}
|
{% set isAnyRestarting = false %}
|
||||||
{% set isWatchtowerRunning = false %}
|
{% set isWatchtowerRunning = false %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue