mirror of
https://github.com/unraid/webgui.git
synced 2026-01-22 09:29:59 -06:00
@@ -87,6 +87,11 @@ function upcEnv(str, reload = true, session = false) { // overwrite upc src
|
||||
const ckDays = 30;
|
||||
ckDate.setTime(ckDate.getTime()+(ckDays*24*60*60*1000));
|
||||
const ckExpire = `expires=${session ? 0 : ckDate.toGMTString()};`;
|
||||
if (!str) { // if no str param provided we remove the cookie to fallback to the enviroment's default JS source
|
||||
console.log(`✨ ${ckName} removed…reloading ♻️ `);
|
||||
document.cookie = `${ckName}=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT`;
|
||||
return window.location.reload();
|
||||
}
|
||||
if (reload) {
|
||||
console.log(`✨ ${ckName} set…reloading ✨ `);
|
||||
setTimeout(() => {
|
||||
@@ -95,7 +100,7 @@ function upcEnv(str, reload = true, session = false) { // overwrite upc src
|
||||
} else {
|
||||
console.log(`✨ ${ckName}=${str} for session ✨ `);
|
||||
}
|
||||
return document.cookie = `${ckName}=${str}; ${ckExpire}`;
|
||||
return document.cookie = `${ckName}=${str}; path=/; ${ckExpire}`;
|
||||
};
|
||||
</script>
|
||||
<!-- /myservers1 -->
|
||||
|
||||
@@ -383,7 +383,7 @@
|
||||
'remoteAccessDisabled' => _('Remote access will be disabled'),
|
||||
'remoteAccessInaccessible' => sprintf(_('You will no longer have access to this server using <abbr title="%s" class="italic">this url</abbr>'), '{0}'),
|
||||
'disablingFlashBackup' => _('Automated flash backups will be disabled until you sign in again'),
|
||||
'downloadFlashBackup' => _('Download latest backup from My Servers Dashboard'),
|
||||
'downloadFlashBackup' => _('Download latest backup from My Servers Dashboard before signing out'),
|
||||
],
|
||||
],
|
||||
'success' => [
|
||||
@@ -548,6 +548,9 @@
|
||||
if (!file_exists('/usr/local/sbin/unraid-api')) $plgInstalled = $plgInstalled . '_installFailed';
|
||||
}
|
||||
|
||||
// read flashbackup ini file
|
||||
$flashBackup = parse_ini_file('/usr/local/emhttp/state/flashbackup.ini');
|
||||
|
||||
$serverstate = [ // feeds server vars to Vuex store in a slightly different array than state.php
|
||||
"avatar" => (!empty($remote['avatar']) && $plgInstalled) ? $remote['avatar'] : '',
|
||||
"config" => [
|
||||
@@ -561,6 +564,7 @@
|
||||
"extraOrigins" => $api['extraOrigins'] ? explode(',', $api['extraOrigins']) : [],
|
||||
"flashproduct" => $var['flashProduct'],
|
||||
"flashvendor" => $var['flashVendor'],
|
||||
"flashBackupActivated" => $flashBackup['activated'] ? 'true' : '',
|
||||
"guid" => $var['flashGUID'],
|
||||
"hasRemoteApikey" => !empty($remote['apikey']),
|
||||
"internalip" => ipaddr(),
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user