cache busting JS files

This commit is contained in:
2025-05-28 21:55:26 +02:00
parent c8dd4ac165
commit 4f8261bda9
13 changed files with 30 additions and 22 deletions

View File

@@ -9,7 +9,7 @@
<link rel="stylesheet" href="{{ url_for('static', filename='css/auth.css', v=config.CSS_VERSION) }}"> <link rel="stylesheet" href="{{ url_for('static', filename='css/auth.css', v=config.CSS_VERSION) }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/colors.css', v=config.CSS_VERSION) }}"> <link rel="stylesheet" href="{{ url_for('static', filename='css/colors.css', v=config.CSS_VERSION) }}">
<link rel="stylesheet" href="{{ url_for('main.dynamic_colors') }}?v={{ site_settings.updated_at.timestamp() }}" onload="console.log('[CSS] Dynamic colors loaded with version:', '{{ site_settings.updated_at.timestamp() }}')"> <link rel="stylesheet" href="{{ url_for('main.dynamic_colors') }}?v={{ site_settings.updated_at.timestamp() }}" onload="console.log('[CSS] Dynamic colors loaded with version:', '{{ site_settings.updated_at.timestamp() }}')">
<script src="{{ url_for('static', filename='js/color-logger.js') }}"></script> <script src="{{ url_for('static', filename='js/color-logger.js', v=config.CSS_VERSION) }}"></script>
</head> </head>
<body> <body>
<div class="container"> <div class="container">

View File

@@ -9,7 +9,7 @@
<link rel="stylesheet" href="{{ url_for('static', filename='css/auth.css', v=config.CSS_VERSION) }}"> <link rel="stylesheet" href="{{ url_for('static', filename='css/auth.css', v=config.CSS_VERSION) }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/colors.css', v=config.CSS_VERSION) }}"> <link rel="stylesheet" href="{{ url_for('static', filename='css/colors.css', v=config.CSS_VERSION) }}">
<link rel="stylesheet" href="{{ url_for('main.dynamic_colors') }}?v={{ site_settings.updated_at.timestamp() }}" onload="console.log('[CSS] Dynamic colors loaded with version:', '{{ site_settings.updated_at.timestamp() }}')"> <link rel="stylesheet" href="{{ url_for('main.dynamic_colors') }}?v={{ site_settings.updated_at.timestamp() }}" onload="console.log('[CSS] Dynamic colors loaded with version:', '{{ site_settings.updated_at.timestamp() }}')">
<script src="{{ url_for('static', filename='js/color-logger.js') }}"></script> <script src="{{ url_for('static', filename='js/color-logger.js', v=config.CSS_VERSION) }}"></script>
</head> </head>
<body> <body>
<div class="container"> <div class="container">

View File

@@ -157,5 +157,9 @@
</div> </div>
</div> </div>
<script src="{{ url_for('static', filename='js/avatar-preview.js') }}"></script> <script src="{{ url_for('static', filename='js/avatar-preview.js', v=config.CSS_VERSION) }}"></script>
{% endblock %}
{% block extra_js %}
<script src="{{ url_for('static', filename='js/avatar-preview.js', v=config.CSS_VERSION) }}"></script>
{% endblock %} {% endblock %}

View File

@@ -43,7 +43,7 @@
</button> </button>
</div> </div>
</form> </form>
<script src="{{ url_for('static', filename='js/contacts-filter.js') }}"></script> <script src="{{ url_for('static', filename='js/contacts-filter.js', v=config.CSS_VERSION) }}"></script>
</div> </div>
<!-- Contacts List --> <!-- Contacts List -->
@@ -203,4 +203,8 @@
</div> </div>
{% endif %} {% endif %}
</div> </div>
{% endblock %}
{% block extra_js %}
<script src="{{ url_for('static', filename='js/contacts-filter.js', v=config.CSS_VERSION) }}"></script>
{% endblock %} {% endblock %}

View File

@@ -200,8 +200,8 @@
window.currentUserId = "{{ current_user.id }}"; window.currentUserId = "{{ current_user.id }}";
window.sendMessageUrl = "{{ url_for('conversations.send_message', conversation_id=conversation.id) }}"; window.sendMessageUrl = "{{ url_for('conversations.send_message', conversation_id=conversation.id) }}";
</script> </script>
<script src="{{ url_for('static', filename='js/chat-manager.js') }}"></script> <script src="{{ url_for('static', filename='js/chat-manager.js', v=config.CSS_VERSION) }}"></script>
<script src="{{ url_for('static', filename='js/conversation.js') }}"></script> <script src="{{ url_for('static', filename='js/conversation.js', v=config.CSS_VERSION) }}"></script>
<script src="{{ url_for('static', filename='js/member-management.js') }}"></script> <script src="{{ url_for('static', filename='js/member-management.js', v=config.CSS_VERSION) }}"></script>
{% endblock %} {% endblock %}
{% endblock content %} {% endblock content %}

View File

@@ -146,5 +146,5 @@
{% block extra_js %} {% block extra_js %}
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<script src="{{ url_for('static', filename='js/create-conversation.js') }}"></script> <script src="{{ url_for('static', filename='js/create-conversation.js', v=config.CSS_VERSION) }}"></script>
{% endblock %} {% endblock %}

View File

@@ -104,6 +104,6 @@
</div> </div>
{% block extra_js %} {% block extra_js %}
<script src="{{ url_for('static', filename='js/avatar-preview.js') }}"></script> <script src="{{ url_for('static', filename='js/avatar-preview.js', v=config.CSS_VERSION) }}"></script>
{% endblock %} {% endblock %}
{% endblock %} {% endblock %}

View File

@@ -285,10 +285,10 @@
// Test if modules are working // Test if modules are working
console.log('Module system is working'); console.log('Module system is working');
</script> </script>
<script type="module" src="{{ url_for('static', filename='js/rooms/room.js') }}"></script> <script type="module" src="{{ url_for('static', filename='js/rooms/room.js', v=config.CSS_VERSION) }}"></script>
<script type="module" src="{{ url_for('static', filename='js/rooms/fileManager.js') }}"></script> <script type="module" src="{{ url_for('static', filename='js/rooms/fileManager.js', v=config.CSS_VERSION) }}"></script>
<script type="module" src="{{ url_for('static', filename='js/rooms/viewManager.js') }}"></script> <script type="module" src="{{ url_for('static', filename='js/rooms/viewManager.js', v=config.CSS_VERSION) }}"></script>
<script type="module" src="{{ url_for('static', filename='js/rooms/uploadManager.js') }}"></script> <script type="module" src="{{ url_for('static', filename='js/rooms/uploadManager.js', v=config.CSS_VERSION) }}"></script>
<script type="module" src="{{ url_for('static', filename='js/rooms/searchManager.js') }}"></script> <script type="module" src="{{ url_for('static', filename='js/rooms/searchManager.js', v=config.CSS_VERSION) }}"></script>
<script type="module" src="{{ url_for('static', filename='js/rooms/modalManager.js') }}"></script> <script type="module" src="{{ url_for('static', filename='js/rooms/modalManager.js', v=config.CSS_VERSION) }}"></script>
{% endblock %} {% endblock %}

View File

@@ -130,5 +130,5 @@
{% block extra_js %} {% block extra_js %}
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<script src="{{ url_for('static', filename='js/room-members.js') }}"></script> <script src="{{ url_for('static', filename='js/room-members.js', v=config.CSS_VERSION) }}"></script>
{% endblock %} {% endblock %}

View File

@@ -133,6 +133,6 @@
</div> </div>
{% block extra_js %} {% block extra_js %}
<script src="{{ url_for('static', filename='js/rooms-list.js') }}"></script> <script src="{{ url_for('static', filename='js/rooms-list.js', v=config.CSS_VERSION) }}"></script>
{% endblock %} {% endblock %}
{% endblock %} {% endblock %}

View File

@@ -80,5 +80,5 @@
{% endblock %} {% endblock %}
{% block extra_js %} {% block extra_js %}
<script src="{{ url_for('static', filename='js/settings.js') }}"></script> <script src="{{ url_for('static', filename='js/settings.js', v=config.CSS_VERSION) }}"></script>
{% endblock %} {% endblock %}

View File

@@ -41,6 +41,6 @@
{% endblock %} {% endblock %}
{% block extra_js %} {% block extra_js %}
<script src="{{ url_for('static', filename='js/file-grid.js') }}"></script> <script src="{{ url_for('static', filename='js/file-grid.js', v=config.CSS_VERSION) }}"></script>
<script src="{{ url_for('static', filename='js/starred.js') }}"></script> <script src="{{ url_for('static', filename='js/starred.js', v=config.CSS_VERSION) }}"></script>
{% endblock %} {% endblock %}

View File

@@ -47,6 +47,6 @@
{% endblock %} {% endblock %}
{% block extra_js %} {% block extra_js %}
<script src="{{ url_for('static', filename='js/file-grid.js') }}"></script> <script src="{{ url_for('static', filename='js/file-grid.js', v=config.CSS_VERSION) }}"></script>
<script src="{{ url_for('static', filename='js/trash.js') }}"></script> <script src="{{ url_for('static', filename='js/trash.js', v=config.CSS_VERSION) }}"></script>
{% endblock %} {% endblock %}