mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Make editor GUI override author game support
This commit is contained in:
parent
4fdfc49429
commit
cef8985d38
@ -651,7 +651,7 @@ def game_support(package):
|
||||
form = GameSupportForm() if can_edit else None
|
||||
if form and request.method == "GET":
|
||||
form.enable_support_detection.data = package.enable_game_support_detection
|
||||
manual_supported_games = package.supported_games.filter_by(confidence=8).all()
|
||||
manual_supported_games = package.supported_games.filter_by(confidence=11).all()
|
||||
form.supported.data = ", ".join([x.game.name for x in manual_supported_games if x.supports])
|
||||
form.unsupported.data = ", ".join([x.game.name for x in manual_supported_games if not x.supports])
|
||||
|
||||
@ -666,7 +666,7 @@ def game_support(package):
|
||||
game_is_supported[game.id] = True
|
||||
for game in get_games_from_csv(db.session, form.unsupported.data or ""):
|
||||
game_is_supported[game.id] = False
|
||||
resolver.set_supported(package, game_is_supported, 8)
|
||||
resolver.set_supported(package, game_is_supported, 11)
|
||||
detect_update_needed = True
|
||||
|
||||
next_url = package.getURL("packages.game_support")
|
||||
|
@ -40,7 +40,7 @@
|
||||
<span class="col-5">
|
||||
{% if support.confidence == 1 %}
|
||||
{{ _("Detected from dependencies") }}
|
||||
{% elif support.confidence == 8 %}
|
||||
{% elif support.confidence == 11 %}
|
||||
{{ _("Added by Editor") }}
|
||||
{% elif support.confidence == 10 %}
|
||||
{{ _("mod.conf") }}
|
||||
@ -85,7 +85,7 @@
|
||||
|
||||
{% if package.checkPerm(current_user, "EDIT_PACKAGE") and current_user not in package.maintainers %}
|
||||
<h3>
|
||||
{{ _("Added by Editor") }}
|
||||
{{ _("Editor Overrides") }}
|
||||
<i class="ml-2 fas fa-user-edit"></i>
|
||||
</h3>
|
||||
{{ render_field(form.supported) }}
|
||||
|
Loading…
Reference in New Issue
Block a user