mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-25 15:31:37 +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
|
form = GameSupportForm() if can_edit else None
|
||||||
if form and request.method == "GET":
|
if form and request.method == "GET":
|
||||||
form.enable_support_detection.data = package.enable_game_support_detection
|
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.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])
|
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
|
game_is_supported[game.id] = True
|
||||||
for game in get_games_from_csv(db.session, form.unsupported.data or ""):
|
for game in get_games_from_csv(db.session, form.unsupported.data or ""):
|
||||||
game_is_supported[game.id] = False
|
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
|
detect_update_needed = True
|
||||||
|
|
||||||
next_url = package.getURL("packages.game_support")
|
next_url = package.getURL("packages.game_support")
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
<span class="col-5">
|
<span class="col-5">
|
||||||
{% if support.confidence == 1 %}
|
{% if support.confidence == 1 %}
|
||||||
{{ _("Detected from dependencies") }}
|
{{ _("Detected from dependencies") }}
|
||||||
{% elif support.confidence == 8 %}
|
{% elif support.confidence == 11 %}
|
||||||
{{ _("Added by Editor") }}
|
{{ _("Added by Editor") }}
|
||||||
{% elif support.confidence == 10 %}
|
{% elif support.confidence == 10 %}
|
||||||
{{ _("mod.conf") }}
|
{{ _("mod.conf") }}
|
||||||
@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
{% if package.checkPerm(current_user, "EDIT_PACKAGE") and current_user not in package.maintainers %}
|
{% if package.checkPerm(current_user, "EDIT_PACKAGE") and current_user not in package.maintainers %}
|
||||||
<h3>
|
<h3>
|
||||||
{{ _("Added by Editor") }}
|
{{ _("Editor Overrides") }}
|
||||||
<i class="ml-2 fas fa-user-edit"></i>
|
<i class="ml-2 fas fa-user-edit"></i>
|
||||||
</h3>
|
</h3>
|
||||||
{{ render_field(form.supported) }}
|
{{ render_field(form.supported) }}
|
||||||
|
Loading…
Reference in New Issue
Block a user