mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-22 07:26:55 +00:00
add imaginary
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
c926f92b6f
commit
05e90d6110
13 changed files with 95 additions and 2 deletions
|
|
@ -80,7 +80,8 @@
|
|||
"identifier": "nextcloud-aio-nextcloud",
|
||||
"dependsOn": [
|
||||
"nextcloud-aio-database",
|
||||
"nextcloud-aio-redis"
|
||||
"nextcloud-aio-redis",
|
||||
"nextcloud-aio-imaginary"
|
||||
],
|
||||
"displayName": "Nextcloud",
|
||||
"containerName": "nextcloud/aio-nextcloud",
|
||||
|
|
@ -140,7 +141,9 @@
|
|||
"ONLYOFFICE_HOST=nextcloud-aio-onlyoffice",
|
||||
"UPDATE_NEXTCLOUD_APPS=%UPDATE_NEXTCLOUD_APPS%",
|
||||
"TZ=%TIMEZONE%",
|
||||
"TALK_PORT=%TALK_PORT%"
|
||||
"TALK_PORT=%TALK_PORT%",
|
||||
"IMAGINARY_ENABLED=%IMAGINARY_ENABLED%",
|
||||
"IMAGINARY_HOST=nextcloud-aio-imaginary"
|
||||
],
|
||||
"maxShutdownTime": 10,
|
||||
"restartPolicy": "unless-stopped"
|
||||
|
|
@ -367,6 +370,23 @@
|
|||
],
|
||||
"maxShutdownTime": 10,
|
||||
"restartPolicy": "unless-stopped"
|
||||
},
|
||||
{
|
||||
"identifier": "nextcloud-aio-imaginary",
|
||||
"dependsOn": [],
|
||||
"displayName": "Imaginary",
|
||||
"containerName": "nextcloud/aio-imaginary",
|
||||
"ports": [],
|
||||
"internalPorts": [
|
||||
"9000"
|
||||
],
|
||||
"environmentVariables": [
|
||||
"TZ=%TIMEZONE%"
|
||||
],
|
||||
"volumes": [],
|
||||
"secrets": [],
|
||||
"maxShutdownTime": 10,
|
||||
"restartPolicy": "unless-stopped"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
5
php/public/disable-imaginary.js
Normal file
5
php/public/disable-imaginary.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
// Imaginary
|
||||
var imaginary = document.getElementById("imaginary");
|
||||
imaginary.disabled = true;
|
||||
});
|
||||
|
|
@ -102,6 +102,7 @@ $app->get('/containers', function ($request, $response, $args) use ($container)
|
|||
'collabora_dictionaries' => $configurationManager->GetCollaboraDictionaries(),
|
||||
'automatic_updates' => $configurationManager->areAutomaticUpdatesEnabled(),
|
||||
'is_backup_section_enabled' => $configurationManager->isBackupSectionEnabled(),
|
||||
'is_imaginary_enabled' => $configurationManager->isImaginaryEnabled(),
|
||||
]);
|
||||
})->setName('profile');
|
||||
$app->get('/login', function ($request, $response, $args) use ($container) {
|
||||
|
|
|
|||
|
|
@ -23,4 +23,8 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
|||
// Talk
|
||||
var talk = document.getElementById("talk");
|
||||
talk.addEventListener('change', makeOptionsFormSubmitVisible);
|
||||
|
||||
// Imaginary
|
||||
var imaginary = document.getElementById("imaginary");
|
||||
imaginary.addEventListener('change', makeOptionsFormSubmitVisible);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -65,6 +65,10 @@ class ContainerDefinitionFetcher
|
|||
if (!$this->configurationManager->isTalkEnabled()) {
|
||||
continue;
|
||||
}
|
||||
} elseif ($entry['identifier'] === 'nextcloud-aio-imaginary') {
|
||||
if (!$this->configurationManager->isImaginaryEnabled()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$ports = new ContainerPorts();
|
||||
|
|
@ -146,6 +150,10 @@ class ContainerDefinitionFetcher
|
|||
if (!$this->configurationManager->isTalkEnabled()) {
|
||||
continue;
|
||||
}
|
||||
} elseif ($value === 'nextcloud-aio-imaginary') {
|
||||
if (!$this->configurationManager->isImaginaryEnabled()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$dependsOn[] = $value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,11 @@ class ConfigurationController
|
|||
} else {
|
||||
$this->configurationManager->SetTalkEnabledState(0);
|
||||
}
|
||||
if (isset($request->getParsedBody()['imaginary'])) {
|
||||
$this->configurationManager->SetImaginaryEnabledState(1);
|
||||
} else {
|
||||
$this->configurationManager->SetImaginaryEnabledState(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($request->getParsedBody()['delete_collabora_dictionaries'])) {
|
||||
|
|
|
|||
|
|
@ -139,6 +139,21 @@ class ConfigurationManager
|
|||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
public function isImaginaryEnabled() : bool {
|
||||
$config = $this->GetConfig();
|
||||
if (isset($config['isImaginaryEnabled']) && $config['isImaginaryEnabled'] === 1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function SetImaginaryEnabledState(int $value) : void {
|
||||
$config = $this->GetConfig();
|
||||
$config['isImaginaryEnabled'] = $value;
|
||||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
public function isOnlyofficeEnabled() : bool {
|
||||
$config = $this->GetConfig();
|
||||
if (isset($config['isOnlyofficeEnabled']) && $config['isOnlyofficeEnabled'] === 1) {
|
||||
|
|
|
|||
|
|
@ -298,6 +298,12 @@ class DockerActionManager
|
|||
} else {
|
||||
$replacements[1] = $this->configurationManager->GetCollaboraDictionaries();
|
||||
}
|
||||
} elseif ($out[1] === 'IMAGINARY_ENABLED') {
|
||||
if ($this->configurationManager->isImaginaryEnabled()) {
|
||||
$replacements[1] = 'yes';
|
||||
} else {
|
||||
$replacements[1] = '';
|
||||
}
|
||||
} else {
|
||||
$replacements[1] = $this->configurationManager->GetSecret($out[1]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -452,6 +452,11 @@
|
|||
{% else %}
|
||||
<input type="checkbox" id="collabora" name="collabora"><label for="collabora">Collabora (Nextcloud Office)</label><br>
|
||||
{% endif %}
|
||||
{% if is_imaginary_enabled == true %}
|
||||
<input type="checkbox" id="imaginary" name="imaginary" checked="checked"><label for="imaginary">Imaginary</label><br>
|
||||
{% else %}
|
||||
<input type="checkbox" id="imaginary" name="imaginary"><label for="imaginary">Imaginary</label><br>
|
||||
{% endif %}
|
||||
{% if is_talk_enabled == true %}
|
||||
<input type="checkbox" id="talk" name="talk" checked="checked"><label for="talk">Nextcloud Talk (needs ports {{ talk_port }}/TCP and {{ talk_port }}/UDP open in your firewall/router)</label><br><br>
|
||||
{% else %}
|
||||
|
|
@ -472,6 +477,7 @@
|
|||
{% if isAnyRunning == true %}
|
||||
<script type="text/javascript" src="disable-talk.js"></script>
|
||||
<script type="text/javascript" src="disable-collabora.js"></script>
|
||||
<script type="text/javascript" src="disable-imaginary.js"></script>
|
||||
{% endif %}
|
||||
|
||||
{% if is_collabora_enabled == true and isAnyRunning == false and was_start_button_clicked == true %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue