Merge branch 'dev'
This commit is contained in:
commit
c7c60c9e56
3 changed files with 24 additions and 9 deletions
15
setup.sh
15
setup.sh
|
@ -863,6 +863,7 @@ def add_game():
|
|||
notes=request.form.get('notes', ''),
|
||||
url=url,
|
||||
steam_appid=steam_appid,
|
||||
platform=request.form.get('platform', 'pc'),
|
||||
redeem_date=datetime.strptime(request.form['redeem_date'], '%Y-%m-%d') if request.form['redeem_date'] else None,
|
||||
user_id=current_user.id
|
||||
)
|
||||
|
@ -2029,7 +2030,7 @@ cat <<HTML_END > templates/edit_game.html
|
|||
<div class="card p-4 shadow-sm">
|
||||
<h2 class="mb-4">{{ _('Spiel bearbeiten') }}</h2>
|
||||
|
||||
<!-- Flash-Nachrichten -->
|
||||
<!-- Flash-Messages -->
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
<div class="flash-messages mb-4">
|
||||
|
@ -2092,7 +2093,12 @@ cat <<HTML_END > templates/edit_game.html
|
|||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">{{ _('Steam Key') }} <span class="text-danger">*</span></label>
|
||||
<input type="text" name="steam_key" class="form-control" value="{{ game.steam_key }}" required>
|
||||
<div class="input-group">
|
||||
<input type="text" name="steam_key" class="form-control" value="{{ game.steam_key }}" id="steam-key-input" required>
|
||||
<button type="button" class="btn btn-outline-secondary copy-btn" data-clipboard-target="#steam-key-input">
|
||||
{{ _('Copy') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="game_appid" class="form-label">{{ _('Steam AppID') }}</label>
|
||||
|
@ -2118,6 +2124,7 @@ cat <<HTML_END > templates/edit_game.html
|
|||
<textarea id="game_notes" name="notes" class="form-control" rows="3">{{ game.notes }}</textarea>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Show External Data -->
|
||||
<div class="col-12">
|
||||
<div class="card mb-4">
|
||||
|
@ -2156,7 +2163,7 @@ cat <<HTML_END > templates/edit_game.html
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Einlöse-Links -->
|
||||
<!-- Redeem-Links -->
|
||||
{% if game.status == 'geschenkt' %}
|
||||
<div class="col-12">
|
||||
<div class="card mb-3">
|
||||
|
@ -2206,9 +2213,11 @@ cat <<HTML_END > templates/edit_game.html
|
|||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
HTML_END
|
||||
|
||||
cat <<HTML_END > templates/add_game.html
|
||||
|
|
|
@ -682,6 +682,7 @@ def add_game():
|
|||
notes=request.form.get('notes', ''),
|
||||
url=url,
|
||||
steam_appid=steam_appid,
|
||||
platform=request.form.get('platform', 'pc'),
|
||||
redeem_date=datetime.strptime(request.form['redeem_date'], '%Y-%m-%d') if request.form['redeem_date'] else None,
|
||||
user_id=current_user.id
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="card p-4 shadow-sm">
|
||||
<h2 class="mb-4">{{ _('Spiel bearbeiten') }}</h2>
|
||||
|
||||
<!-- Flash-Nachrichten -->
|
||||
<!-- Flash-Messages -->
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
<div class="flash-messages mb-4">
|
||||
|
@ -66,7 +66,12 @@
|
|||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">{{ _('Steam Key') }} <span class="text-danger">*</span></label>
|
||||
<input type="text" name="steam_key" class="form-control" value="{{ game.steam_key }}" required>
|
||||
<div class="input-group">
|
||||
<input type="text" name="steam_key" class="form-control" value="{{ game.steam_key }}" id="steam-key-input" required>
|
||||
<button type="button" class="btn btn-outline-secondary copy-btn" data-clipboard-target="#steam-key-input">
|
||||
{{ _('Copy') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="game_appid" class="form-label">{{ _('Steam AppID') }}</label>
|
||||
|
@ -92,6 +97,7 @@
|
|||
<textarea id="game_notes" name="notes" class="form-control" rows="3">{{ game.notes }}</textarea>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Show External Data -->
|
||||
<div class="col-12">
|
||||
<div class="card mb-4">
|
||||
|
@ -130,7 +136,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Einlöse-Links -->
|
||||
<!-- Redeem-Links -->
|
||||
{% if game.status == 'geschenkt' %}
|
||||
<div class="col-12">
|
||||
<div class="card mb-3">
|
||||
|
@ -180,6 +186,5 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue