This commit is contained in:
naielv
2025-12-25 19:15:28 +01:00
parent 0bc662dbde
commit 90b8223385
10 changed files with 84 additions and 20 deletions

View File

@@ -134,6 +134,7 @@ PAGES.aulas = {
TS_IndexElement(
"aulas,solicitudes",
[
{"type": "_encrypted"},
{
key: "Solicitante",
type: "persona",
@@ -243,6 +244,7 @@ PAGES.aulas = {
TS_IndexElement(
"aulas,informes",
[
{"type": "_encrypted"},
{
key: "Autor",
type: "persona",

View File

@@ -173,6 +173,7 @@ PAGES.avisos = {
TS_IndexElement(
"avisos",
[
{"type": "_encrypted"},
{
key: "Origen",
type: "persona",

View File

@@ -87,6 +87,7 @@ PAGES.comedor = {
TS_IndexElement(
"comedor",
[
{"type": "_encrypted"},
{
key: "Fecha",
type: "raw",

View File

@@ -7,6 +7,7 @@ PAGES.login = {
var field_couch_dbname = safeuuid();
var field_couch_user = safeuuid();
var field_couch_pass = safeuuid();
var field_secret = safeuuid();
var btn_save = safeuuid();
container.innerHTML = `
<h1>Configuración del servidor CouchDB</h1>
@@ -23,6 +24,9 @@ PAGES.login = {
<label>Contraseña
<input type="password" id="${field_couch_pass}" value="${localStorage.getItem('TELESEC_COUCH_PASS') || ''}"><br><br>
</label>
<label>Clave de encriptación (opcional) - usada para cifrar datos en reposo
<input type="password" id="${field_secret}" value="${localStorage.getItem('TELESEC_SECRET') || ''}"><br><br>
</label>
<button id="${btn_save}" class="btn5">Guardar y Conectar</button>
</fieldset>
<p>Después de guardar, el navegador intentará sincronizar en segundo plano con el servidor.</p>
@@ -32,10 +36,13 @@ PAGES.login = {
var dbname = document.getElementById(field_couch_dbname).value.trim();
var user = document.getElementById(field_couch_user).value.trim();
var pass = document.getElementById(field_couch_pass).value;
var secret = document.getElementById(field_secret).value || '';
localStorage.setItem('TELESEC_COUCH_URL', "https://" + url);
localStorage.setItem('TELESEC_COUCH_DBNAME', dbname);
localStorage.setItem('TELESEC_COUCH_USER', user);
localStorage.setItem('TELESEC_COUCH_PASS', pass);
localStorage.setItem('TELESEC_SECRET', secret);
SECRET = secret;
try {
DB.init({ secret: SECRET, remoteServer: "https://" + url, username: user, password: pass, dbname: dbname || undefined });
toastr.success('Iniciando sincronización con CouchDB');

View File

@@ -136,6 +136,7 @@ PAGES.materiales = {
`;
const config = [
{"type": "_encrypted"},
{ key: "Revision", label: "Ult. Revisión", type: "fecha-diff", default: "" },
{ key: "Nombre", label: "Nombre", type: "text", default: "" },
{ key: "Ubicacion", label: "Ubicación", type: "text", default: "--" },

View File

@@ -111,6 +111,7 @@ PAGES.notas = {
TS_IndexElement(
"notas",
[
{"type": "_encrypted"},
{
key: "Autor",
type: "persona-nombre",

View File

@@ -900,6 +900,7 @@ PAGES.pagos = {
var totals = { ingresos: 0, gastos: 0 };
const config = [
{"type": "_encrypted"},
{
key: "Fecha",
label: "Fecha/Hora",

View File

@@ -203,6 +203,7 @@ PAGES.personas = {
`;
const config = [
{"type": "_encrypted"},
// {
// label: "Persona",
// type: "persona",