Compare commits
	
		
			2 commits
		
	
	
		
			3b3e43d9af
			...
			192d86dbd5
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 192d86dbd5 | |||
| 08ef5323a6 | 
					 1 changed files with 41 additions and 18 deletions
				
			
		
							
								
								
									
										39
									
								
								setup.sh
									
										
									
									
									
								
							
							
						
						
									
										39
									
								
								setup.sh
									
										
									
									
									
								
							| 
						 | 
					@ -1904,7 +1904,6 @@ cat <<HTML_END > templates/change_password.html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HTML_END
 | 
					HTML_END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
# Edit Game Template
 | 
					# Edit Game Template
 | 
				
			||||||
cat <<HTML_END > templates/edit_game.html
 | 
					cat <<HTML_END > templates/edit_game.html
 | 
				
			||||||
{% extends "base.html" %}
 | 
					{% extends "base.html" %}
 | 
				
			||||||
| 
						 | 
					@ -1926,6 +1925,29 @@ cat <<HTML_END > templates/edit_game.html
 | 
				
			||||||
    {% endif %}
 | 
					    {% endif %}
 | 
				
			||||||
  {% endwith %}
 | 
					  {% endwith %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <!-- Update Data Form (separate, outside main form, uses POST) -->
 | 
				
			||||||
 | 
					  <div class="mb-3 text-end">
 | 
				
			||||||
 | 
					  <form method="POST" action="{{ url_for('update_game_data', game_id=game.id) }}" id="updateDataForm">
 | 
				
			||||||
 | 
					    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
 | 
				
			||||||
 | 
					    <!-- Ändere die ID für Eindeutigkeit -->
 | 
				
			||||||
 | 
					    <input type="hidden" name="steam_appid" id="itad_steam_appid" value="{{ game.steam_appid }}">
 | 
				
			||||||
 | 
					    <button type="submit" class="btn btn-secondary">
 | 
				
			||||||
 | 
					      🔄 {{ _('Update Data') }}
 | 
				
			||||||
 | 
					    </button>
 | 
				
			||||||
 | 
					  </form>
 | 
				
			||||||
 | 
					  <script>
 | 
				
			||||||
 | 
					  document.getElementById('updateDataForm').addEventListener('submit', function(e) {
 | 
				
			||||||
 | 
					    e.preventDefault();
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    const currentAppId = document.getElementById('game_appid').value;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    document.getElementById('itad_steam_appid').value = currentAppId;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    this.submit();
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					  </script>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <form method="POST" aria-label="{{ _('Spiel bearbeiten') }}">
 | 
					  <form method="POST" aria-label="{{ _('Spiel bearbeiten') }}">
 | 
				
			||||||
    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
 | 
					    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
 | 
				
			||||||
    <div class="row g-3">
 | 
					    <div class="row g-3">
 | 
				
			||||||
| 
						 | 
					@ -1957,6 +1979,9 @@ cat <<HTML_END > templates/edit_game.html
 | 
				
			||||||
      <div class="col-md-6">
 | 
					      <div class="col-md-6">
 | 
				
			||||||
        <label for="game_appid" class="form-label">{{ _('Steam AppID') }}</label>
 | 
					        <label for="game_appid" class="form-label">{{ _('Steam AppID') }}</label>
 | 
				
			||||||
        <input type="text" id="game_appid" name="steam_appid" class="form-control" value="{{ game.steam_appid or '' }}">
 | 
					        <input type="text" id="game_appid" name="steam_appid" class="form-control" value="{{ game.steam_appid or '' }}">
 | 
				
			||||||
 | 
					        <small class="text-muted">
 | 
				
			||||||
 | 
					          {{ _('For GOG games: Enter the Steam AppID here to enable price tracking.') }}
 | 
				
			||||||
 | 
					        </small>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <div class="col-md-6">
 | 
					      <div class="col-md-6">
 | 
				
			||||||
        <label for="game_redeem_date" class="form-label">{{ _('Redeem by') }}</label>
 | 
					        <label for="game_redeem_date" class="form-label">{{ _('Redeem by') }}</label>
 | 
				
			||||||
| 
						 | 
					@ -1975,14 +2000,11 @@ cat <<HTML_END > templates/edit_game.html
 | 
				
			||||||
        <textarea id="game_notes" name="notes" class="form-control" rows="3">{{ game.notes }}</textarea>
 | 
					        <textarea id="game_notes" name="notes" class="form-control" rows="3">{{ game.notes }}</textarea>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <!-- Externe Daten Card -->
 | 
					      <!-- Externe Daten Anzeige -->
 | 
				
			||||||
      <div class="col-12">
 | 
					      <div class="col-12">
 | 
				
			||||||
        <div class="card mb-4">
 | 
					        <div class="card mb-4">
 | 
				
			||||||
          <div class="card-header d-flex justify-content-between align-items-center">
 | 
					          <div class="card-header">
 | 
				
			||||||
            <span>🔄 {{ _('Externe Daten') }}</span>
 | 
					            <span>🔄 {{ _('Externe Daten') }}</span>
 | 
				
			||||||
            <a href="{{ url_for('update_game_data', game_id=game.id) }}" class="btn btn-secondary">
 | 
					 | 
				
			||||||
              Update Data
 | 
					 | 
				
			||||||
            </a>
 | 
					 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <div class="card-body">
 | 
					          <div class="card-body">
 | 
				
			||||||
            {% if game.release_date %}
 | 
					            {% if game.release_date %}
 | 
				
			||||||
| 
						 | 
					@ -2052,7 +2074,7 @@ cat <<HTML_END > templates/edit_game.html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!-- Copy-JavaScript -->
 | 
					<!-- Copy-JavaScript -->
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
document.querySelectorAll('.copy-btn').forEach(btn => {
 | 
					  document.querySelectorAll('.copy-btn').forEach(btn => {
 | 
				
			||||||
    btn.addEventListener('click', async function() {
 | 
					    btn.addEventListener('click', async function() {
 | 
				
			||||||
      const input = document.querySelector(this.dataset.clipboardTarget);
 | 
					      const input = document.querySelector(this.dataset.clipboardTarget);
 | 
				
			||||||
      try {
 | 
					      try {
 | 
				
			||||||
| 
						 | 
					@ -2064,10 +2086,11 @@ document.querySelectorAll('.copy-btn').forEach(btn => {
 | 
				
			||||||
        setTimeout(() => this.innerHTML = '{{ _("Copy") }}', 2000);
 | 
					        setTimeout(() => this.innerHTML = '{{ _("Copy") }}', 2000);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
});
 | 
					  });
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HTML_END
 | 
					HTML_END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cat <<HTML_END > templates/add_game.html
 | 
					cat <<HTML_END > templates/add_game.html
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue