Skip to content

Commit

Permalink
ajuste de ruta de script
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Caceres authored and Javier Caceres committed Dec 15, 2024
1 parent 2b42d73 commit ff82a85
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
9 changes: 9 additions & 0 deletions lib/controller.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
defmodule MiApp.Controller do
use MiAppWeb, :controller

Check failure on line 2 in lib/controller.ex

View workflow job for this annotation

GitHub Actions / test

** (CompileError) lib/controller.ex:2: module MiAppWeb is not loaded and could not be found

def index(conn, _params) do
version = Ordo.version()

render(conn, "index.html", version: version)
end
end
19 changes: 1 addition & 18 deletions priv/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,28 +134,11 @@ <h2>¡Casi terminado!</h2>
<a href="https://help.fedired.com/ordo/interface.html" class="button" target="_blank" rel="noopener noreferrer" aria-label="Visita la documentación de Ordo en GitHub">Ver Documentación</a>
</div>

<!-- Contenedor para la versión -->
<div class="version" id="software-version">Cargando versión...</div>
<div class="version">La versión actual es: <%= @version %></div>
</section>

<footer>
<p>¿Necesitas ayuda? Visita nuestra <a href="https://github.com/fedired-dev/ordo/issues/new" target="_blank" rel="noopener noreferrer">sección de soporte</a>.</p>
</footer>
</main>

<!-- Script para obtener la versión desde el servidor -->
<script>
fetch('mix.exs')
.then(response => response.json())
.then(data => {
const versionElement = document.getElementById('software-version');
versionElement.textContent = `version: version("${data.version}")`;
})
.catch(error => {
console.error('Error al obtener la versión:', error);
const versionElement = document.getElementById('software-version');
versionElement.textContent = 'Error al cargar la versión.';
});
</script>
</body>
</html>

0 comments on commit ff82a85

Please sign in to comment.