mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-03-14 05:53:39 +00:00
style: some minor style improvements
This commit is contained in:
@@ -58,7 +58,7 @@ class Auth(LazyLogging):
|
||||
Returns:
|
||||
str: login control as html code to insert
|
||||
"""
|
||||
return """<button type="button" class="btn btn-link" data-bs-toggle="modal" data-bs-target="#login-modal" style="text-decoration: none"><i class="bi bi-box-arrow-in-right"></i> login</button>"""
|
||||
return "<button type=\"button\" class=\"btn btn-link\" data-bs-toggle=\"modal\" data-bs-target=\"#login-modal\" style=\"text-decoration: none\"><i class=\"bi bi-box-arrow-in-right\"></i> login</button>"
|
||||
|
||||
@property
|
||||
def is_external(self) -> bool:
|
||||
|
||||
@@ -25,9 +25,11 @@ class AuthInfoSchema(Schema):
|
||||
authorization information schema
|
||||
"""
|
||||
|
||||
control = fields.String(required=True, metadata={
|
||||
"description": "HTML control for login interface",
|
||||
})
|
||||
control = fields.String(
|
||||
metadata={
|
||||
"description": "HTML control for login interface",
|
||||
"example": "<button type=\"button\" class=\"btn btn-link\" data-bs-toggle=\"modal\" data-bs-target=\"#login-modal\" style=\"text-decoration: none\"><i class=\"bi bi-box-arrow-in-right\"></i> login</button>",
|
||||
})
|
||||
enabled = fields.Boolean(required=True, metadata={
|
||||
"description": "Whether authentication is enabled or not",
|
||||
})
|
||||
@@ -35,5 +37,5 @@ class AuthInfoSchema(Schema):
|
||||
"description": "Whether authorization provider is external (e.g. OAuth)",
|
||||
})
|
||||
username = fields.String(metadata={
|
||||
"description": "Currently authenticated username if any",
|
||||
"description": "Currently authenticated username if available",
|
||||
})
|
||||
|
||||
@@ -27,10 +27,12 @@ class AutoRefreshIntervalSchema(Schema):
|
||||
|
||||
interval = fields.Integer(required=True, metadata={
|
||||
"description": "Auto refresh interval in milliseconds",
|
||||
"example": "60000",
|
||||
})
|
||||
is_active = fields.Boolean(required=True, metadata={
|
||||
"description": "Whether this interval is the default active one",
|
||||
})
|
||||
text = fields.String(required=True, metadata={
|
||||
"description": "Human readable interval description",
|
||||
"example": "1 minute",
|
||||
})
|
||||
|
||||
@@ -40,6 +40,7 @@ class InfoV2Schema(Schema):
|
||||
})
|
||||
index_url = fields.String(metadata={
|
||||
"description": "URL to the repository index page",
|
||||
"example": "https://ahriman.readthedocs.io/",
|
||||
})
|
||||
repositories = fields.Nested(RepositoryIdSchema(many=True), required=True, metadata={
|
||||
"description": "List of loaded repositories",
|
||||
|
||||
@@ -31,7 +31,7 @@ class RepositoryIdSchema(Schema):
|
||||
})
|
||||
id = fields.String(metadata={
|
||||
"description": "Unique repository identifier",
|
||||
"example": "aur-x86_64",
|
||||
"example": "x86_64-aur",
|
||||
})
|
||||
repository = fields.String(metadata={
|
||||
"description": "Repository name",
|
||||
|
||||
Reference in New Issue
Block a user