Using version and description from publicConfig; v1.3.1

This commit is contained in:
DarkCat09 2023-09-20 14:54:51 +04:00
parent 5b7ce0bb3c
commit 9f0fd5f7a8
No known key found for this signature in database
GPG Key ID: 0A26CD5B3345D6E3
4 changed files with 9 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "txtdot", "name": "txtdot",
"version": "1.3.0", "version": "1.3.1",
"private": true, "private": true,
"description": "", "description": "",
"main": "dist/app.js", "main": "dist/app.js",

View File

@ -1,5 +1,5 @@
export default { export default {
version: "1.1.1", version: "1.3.1",
description: description:
"HTTP proxy that parses only text, links and pictures from pages reducing internet traffic, removing ads and heavy scripts", "txtdot is an HTTP proxy that parses only text, links and pictures from pages reducing internet bandwidth usage, removing ads and heavy scripts",
}; };

View File

@ -1,9 +1,11 @@
import { FastifyInstance } from "fastify"; import { FastifyInstance } from "fastify";
import publicConfig from "../../publicConfig";
import { engineList } from "../../handlers/main"; import { engineList } from "../../handlers/main";
import { indexSchema } from "../../types/requests/browser"; import { indexSchema } from "../../types/requests/browser";
export default async function indexRoute(fastify: FastifyInstance) { export default async function indexRoute(fastify: FastifyInstance) {
fastify.get("/", { schema: indexSchema }, async (_, reply) => { fastify.get("/", { schema: indexSchema }, async (_, reply) => {
return reply.view("/templates/index.ejs", { engineList }); return reply.view("/templates/index.ejs", { publicConfig, engineList });
}); });
} }

View File

@ -1,11 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<% const desc="txtdot is a HTTP proxy that parses text, links and pictures from pages reducing internet traffic, removing ads and heavy scripts" %>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="<%= desc %>"> <meta name="description" content="<%= publicConfig.description %>">
<title>txt. main page</title> <title>txt. main page</title>
<link rel="stylesheet" href="/static/common.css"> <link rel="stylesheet" href="/static/common.css">
<link rel="stylesheet" href="/static/index.css"> <link rel="stylesheet" href="/static/index.css">
@ -16,10 +15,11 @@
<header> <header>
<h1>txt<span class="dot">.</span></h1> <h1>txt<span class="dot">.</span></h1>
<p class="menu"> <p class="menu">
<a href="https://github.com/TxtDot/txtdot/releases/latest" class="button secondary">v<%= publicConfig.version %></a>
<a href="https://github.com/txtdot/txtdot" class="button secondary">GitHub</a> <a href="https://github.com/txtdot/txtdot" class="button secondary">GitHub</a>
<a href="https://txtdot.github.io/documentation" class="button secondary">Docs</a> <a href="https://txtdot.github.io/documentation" class="button secondary">Docs</a>
</p> </p>
<p><%= desc %></p> <p><%= publicConfig.description %></p>
</header> </header>
<form action="/get" method="get" class="input-grid"> <form action="/get" method="get" class="input-grid">
<div class="input"> <div class="input">