Improve ECS creation and branding

This commit is contained in:
kk K
2026-04-16 20:43:59 +08:00
parent 94f740a9fb
commit b31eb0e33c
6 changed files with 680 additions and 63 deletions

View File

@@ -281,6 +281,8 @@ class ConfigManager
$this->saveSetting('monthly_auto_start', !empty($data['monthly_auto_start']) ? '1' : '0');
$this->saveSetting('api_interval', $data['api_interval'] ?? 600);
$this->saveSetting('enable_billing', !empty($data['enable_billing']) ? '1' : '0');
$appBrand = is_array($data['AppBrand'] ?? null) ? $data['AppBrand'] : [];
$this->saveSetting('app_logo_url', trim((string) ($appBrand['logo_url'] ?? '')));
$this->saveDdnsSettings($data['Ddns'] ?? []);
if (isset($data['Notification'])) {
@@ -496,6 +498,12 @@ class ConfigManager
$this->load();
}
public function updateAppLogoUrl($url)
{
$this->saveSetting('app_logo_url', trim((string) $url));
$this->load();
}
private function saveNotificationSettings($notification)
{
$this->saveSetting('notify_email_enabled', !empty($notification['email_enabled']) ? '1' : '0');