mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
configpanels: fix app is_default
+ dns alert style
This commit is contained in:
parent
3faa574267
commit
9423168aaf
2 changed files with 5 additions and 2 deletions
|
@ -26,7 +26,6 @@ import re
|
|||
import subprocess
|
||||
import tempfile
|
||||
import copy
|
||||
from collections import OrderedDict
|
||||
from typing import TYPE_CHECKING, List, Tuple, Dict, Any, Iterator, Optional, Union
|
||||
from packaging import version
|
||||
from logging import getLogger
|
||||
|
@ -129,6 +128,7 @@ def app_info(app, full=False, upgradable=False):
|
|||
"""
|
||||
Get info for a specific app
|
||||
"""
|
||||
from yunohost.domain import domain_config_get
|
||||
from yunohost.permission import user_permission_list
|
||||
|
||||
_assert_is_installed(app)
|
||||
|
@ -228,7 +228,9 @@ def app_info(app, full=False, upgradable=False):
|
|||
ret["is_webapp"] = "domain" in settings and "path" in settings
|
||||
|
||||
if ret["is_webapp"]:
|
||||
ret["is_default"] = settings.get("default_app", "_none")
|
||||
ret["is_default"] = (
|
||||
domain_config_get(settings["domain"], "feature.app.default_app") == app
|
||||
)
|
||||
|
||||
ret["supports_change_url"] = os.path.exists(
|
||||
os.path.join(setting_path, "scripts", "change_url")
|
||||
|
|
|
@ -558,6 +558,7 @@ def _get_registrar_config_section(domain):
|
|||
except ValueError:
|
||||
registrar_infos["registrar"]["default"] = None
|
||||
registrar_infos["infos"]["ask"] = m18n.n("domain_dns_registrar_not_supported")
|
||||
registrar_infos["infos"]["style"] = "warning"
|
||||
else:
|
||||
registrar_infos["registrar"]["default"] = registrar
|
||||
registrar_infos["infos"]["ask"] = m18n.n(
|
||||
|
|
Loading…
Add table
Reference in a new issue