@cccarv82/freya 1.0.37 → 1.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/web-ui.css +0 -40
- package/cli/web-ui.js +22 -22
- package/cli/web.js +14 -14
- package/package.json +1 -1
package/cli/web-ui.css
CHANGED
|
@@ -174,46 +174,6 @@ body {
|
|
|
174
174
|
padding: 14px 16px;
|
|
175
175
|
border-bottom: 1px solid var(--line);
|
|
176
176
|
background: linear-gradient(90deg, rgba(255,250,242,.75), rgba(255,250,242,.45));
|
|
177
|
-
/* Align vertical dividers with the 3-column shell */
|
|
178
|
-
position: relative;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/* Draw column dividers through the topbar to avoid misalignment “TOC” */
|
|
182
|
-
.topbar::before {
|
|
183
|
-
content: '';
|
|
184
|
-
position: absolute;
|
|
185
|
-
inset: 0;
|
|
186
|
-
pointer-events: none;
|
|
187
|
-
background:
|
|
188
|
-
linear-gradient(to right,
|
|
189
|
-
transparent 0,
|
|
190
|
-
transparent 290px,
|
|
191
|
-
var(--line) 290px,
|
|
192
|
-
var(--line) 291px,
|
|
193
|
-
transparent 291px,
|
|
194
|
-
transparent calc(100% - 380px),
|
|
195
|
-
var(--line) calc(100% - 380px),
|
|
196
|
-
var(--line) calc(100% - 379px),
|
|
197
|
-
transparent calc(100% - 379px)
|
|
198
|
-
);
|
|
199
|
-
opacity: .9;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
@media (max-width: 1200px) {
|
|
203
|
-
.topbar::before {
|
|
204
|
-
background:
|
|
205
|
-
linear-gradient(to right,
|
|
206
|
-
transparent 0,
|
|
207
|
-
transparent 290px,
|
|
208
|
-
var(--line) 290px,
|
|
209
|
-
var(--line) 291px,
|
|
210
|
-
transparent 291px
|
|
211
|
-
);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
@media (max-width: 860px) {
|
|
216
|
-
.topbar::before { display: none; }
|
|
217
177
|
}
|
|
218
178
|
|
|
219
179
|
[data-theme="dark"] .topbar { background: linear-gradient(90deg, rgba(17,24,39,.88), rgba(17,24,39,.55)); }
|
package/cli/web-ui.js
CHANGED
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
try {
|
|
170
170
|
await navigator.clipboard.writeText(state.lastText || '');
|
|
171
171
|
setPill('ok', 'copied');
|
|
172
|
-
setTimeout(() => setPill('ok', '
|
|
172
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
173
173
|
} catch (e) {
|
|
174
174
|
setPill('err', 'copy failed');
|
|
175
175
|
}
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
const r = await api('/api/reports/resolve', { dir: dirOrDefault(), relPath: state.selectedReport.relPath });
|
|
185
185
|
await navigator.clipboard.writeText(r.fullPath || '');
|
|
186
186
|
setPill('ok', 'path copied');
|
|
187
|
-
setTimeout(() => setPill('ok', '
|
|
187
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
188
188
|
} catch {
|
|
189
189
|
setPill('err', 'copy path failed');
|
|
190
190
|
}
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
setPill('run', 'opening…');
|
|
200
200
|
await api('/api/reports/open', { dir: dirOrDefault(), relPath: state.selectedReport.relPath });
|
|
201
201
|
setPill('ok', 'opened');
|
|
202
|
-
setTimeout(() => setPill('ok', '
|
|
202
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
203
203
|
} catch {
|
|
204
204
|
setPill('err', 'open failed');
|
|
205
205
|
}
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
a.remove();
|
|
222
222
|
setTimeout(() => URL.revokeObjectURL(url), 1000);
|
|
223
223
|
setPill('ok', 'downloaded');
|
|
224
|
-
setTimeout(() => setPill('ok', '
|
|
224
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
225
225
|
} catch {
|
|
226
226
|
setPill('err', 'download failed');
|
|
227
227
|
}
|
|
@@ -389,7 +389,7 @@
|
|
|
389
389
|
await api('/api/tasks/update', { dir: dirOrDefault(), id: t.id, patch: { projectSlug: slug, category: cat } });
|
|
390
390
|
await refreshToday();
|
|
391
391
|
setPill('ok', 'updated');
|
|
392
|
-
setTimeout(() => setPill('ok', '
|
|
392
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
393
393
|
} catch (e) {
|
|
394
394
|
setPill('err', 'update failed');
|
|
395
395
|
setOut(String(e && e.message ? e.message : e));
|
|
@@ -406,7 +406,7 @@
|
|
|
406
406
|
await api('/api/blockers/update', { dir: dirOrDefault(), id: b.id, patch: { projectSlug: slug } });
|
|
407
407
|
await refreshToday();
|
|
408
408
|
setPill('ok', 'updated');
|
|
409
|
-
setTimeout(() => setPill('ok', '
|
|
409
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
410
410
|
} catch (e) {
|
|
411
411
|
setPill('err', 'update failed');
|
|
412
412
|
setOut(String(e && e.message ? e.message : e));
|
|
@@ -427,8 +427,8 @@
|
|
|
427
427
|
+ (t.projectSlug ? (' · <span style="font-family:var(--mono); opacity:.9">[' + escapeHtml(String(t.projectSlug)) + ']</span>') : '')
|
|
428
428
|
+ (pri ? (' · ' + escapeHtml(pri)) : '') + '</div></div>'
|
|
429
429
|
+ '<div style="display:flex; gap:8px">'
|
|
430
|
-
+ '<button class="btn small" type="button">
|
|
431
|
-
+ '<button class="btn small" type="button">
|
|
430
|
+
+ '<button class="btn small" type="button">Concluir</button>'
|
|
431
|
+
+ '<button class="btn small" type="button">Editar</button>'
|
|
432
432
|
+ '</div>'
|
|
433
433
|
+ '</div>';
|
|
434
434
|
const btns = row.querySelectorAll('button');
|
|
@@ -440,7 +440,7 @@
|
|
|
440
440
|
await api('/api/tasks/complete', { dir: dirOrDefault(), id: t.id });
|
|
441
441
|
await refreshToday();
|
|
442
442
|
setPill('ok', 'completed');
|
|
443
|
-
setTimeout(() => setPill('ok', '
|
|
443
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
444
444
|
} catch (e) {
|
|
445
445
|
setPill('err', 'complete failed');
|
|
446
446
|
setOut(String(e && e.message ? e.message : e));
|
|
@@ -451,7 +451,7 @@
|
|
|
451
451
|
if (!el.childElementCount) {
|
|
452
452
|
const empty = document.createElement('div');
|
|
453
453
|
empty.className = 'help';
|
|
454
|
-
empty.textContent = '
|
|
454
|
+
empty.textContent = 'Nenhuma tarefa em Fazer agora.';
|
|
455
455
|
el.appendChild(empty);
|
|
456
456
|
}
|
|
457
457
|
}
|
|
@@ -472,7 +472,7 @@
|
|
|
472
472
|
+ '</div>'
|
|
473
473
|
+ '<div style="display:flex; gap:8px; align-items:center">'
|
|
474
474
|
+ '<div style="opacity:.7; font-size:11px; white-space:nowrap">' + escapeHtml(fmtWhen(new Date(b.createdAt || Date.now()).getTime())) + '</div>'
|
|
475
|
-
+ '<button class="btn small" type="button">
|
|
475
|
+
+ '<button class="btn small" type="button">Editar</button>'
|
|
476
476
|
+ '</div>'
|
|
477
477
|
+ '</div>';
|
|
478
478
|
const ebtn = row.querySelector('button');
|
|
@@ -482,7 +482,7 @@
|
|
|
482
482
|
if (!el.childElementCount) {
|
|
483
483
|
const empty = document.createElement('div');
|
|
484
484
|
empty.className = 'help';
|
|
485
|
-
empty.textContent = '
|
|
485
|
+
empty.textContent = 'Nenhum bloqueio aberto.';
|
|
486
486
|
el.appendChild(empty);
|
|
487
487
|
}
|
|
488
488
|
}
|
|
@@ -611,7 +611,7 @@
|
|
|
611
611
|
const r = await api('/api/obsidian/export', { dir: dirOrDefault() });
|
|
612
612
|
setOut('## Obsidian export\n\n' + (r.output || 'ok'));
|
|
613
613
|
setPill('ok', 'exported');
|
|
614
|
-
setTimeout(() => setPill('ok', '
|
|
614
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
615
615
|
} catch (e) {
|
|
616
616
|
setPill('err', 'export failed');
|
|
617
617
|
setOut(String(e && e.message ? e.message : e));
|
|
@@ -624,7 +624,7 @@
|
|
|
624
624
|
const el = $('slugRules');
|
|
625
625
|
if (el) el.value = JSON.stringify(r.map || { rules: [] }, null, 2);
|
|
626
626
|
setPill('ok', 'rules loaded');
|
|
627
|
-
setTimeout(() => setPill('ok', '
|
|
627
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
628
628
|
} catch (e) {
|
|
629
629
|
setPill('err', 'rules load failed');
|
|
630
630
|
setOut(String(e && e.message ? e.message : e));
|
|
@@ -644,7 +644,7 @@
|
|
|
644
644
|
const r = await api('/api/project-slug-map/save', { dir: dirOrDefault(), map });
|
|
645
645
|
if (el) el.value = JSON.stringify(r.map || map, null, 2);
|
|
646
646
|
setPill('ok', 'rules saved');
|
|
647
|
-
setTimeout(() => setPill('ok', '
|
|
647
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
648
648
|
} catch (e) {
|
|
649
649
|
setPill('err', 'rules save failed');
|
|
650
650
|
setOut(String(e && e.message ? e.message : e));
|
|
@@ -663,7 +663,7 @@
|
|
|
663
663
|
}
|
|
664
664
|
});
|
|
665
665
|
setPill('ok', 'saved');
|
|
666
|
-
setTimeout(() => setPill('ok', '
|
|
666
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
667
667
|
} catch (e) {
|
|
668
668
|
setPill('err', 'save failed');
|
|
669
669
|
}
|
|
@@ -714,7 +714,7 @@
|
|
|
714
714
|
await api('/api/inbox/add', { dir: dirOrDefault(), text });
|
|
715
715
|
ta.value = '';
|
|
716
716
|
setPill('ok', 'saved');
|
|
717
|
-
setTimeout(() => setPill('ok', '
|
|
717
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
718
718
|
} catch (e) {
|
|
719
719
|
setPill('err', 'save failed');
|
|
720
720
|
}
|
|
@@ -767,7 +767,7 @@
|
|
|
767
767
|
|
|
768
768
|
if (r.ok === false) {
|
|
769
769
|
setPill('err', 'planner off');
|
|
770
|
-
setTimeout(() => setPill('ok', '
|
|
770
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
771
771
|
return;
|
|
772
772
|
}
|
|
773
773
|
|
|
@@ -783,7 +783,7 @@
|
|
|
783
783
|
setPill('ok', 'planned');
|
|
784
784
|
}
|
|
785
785
|
|
|
786
|
-
setTimeout(() => setPill('ok', '
|
|
786
|
+
setTimeout(() => setPill('ok', 'pronto'), 1200);
|
|
787
787
|
} catch (e) {
|
|
788
788
|
setPill('err', 'plan failed');
|
|
789
789
|
}
|
|
@@ -817,7 +817,7 @@
|
|
|
817
817
|
setOut(out);
|
|
818
818
|
await refreshReports({ selectLatest: true });
|
|
819
819
|
setPill('ok', 'done');
|
|
820
|
-
setTimeout(() => setPill('ok', '
|
|
820
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
821
821
|
} catch (e) {
|
|
822
822
|
setPill('err', 'run failed');
|
|
823
823
|
}
|
|
@@ -838,13 +838,13 @@
|
|
|
838
838
|
let msg = '## Apply result\n\n' + JSON.stringify(summary, null, 2);
|
|
839
839
|
if (summary && Array.isArray(summary.reportsSuggested) && summary.reportsSuggested.length) {
|
|
840
840
|
msg += '\n\n## Suggested reports\n- ' + summary.reportsSuggested.join('\n- ');
|
|
841
|
-
msg += '\n\nUse: **
|
|
841
|
+
msg += '\n\nUse: **Rodar relatórios sugeridos** (barra lateral)';
|
|
842
842
|
}
|
|
843
843
|
|
|
844
844
|
setOut(msg);
|
|
845
845
|
chatAppend('assistant', msg, { markdown: true });
|
|
846
846
|
setPill('ok', 'applied');
|
|
847
|
-
setTimeout(() => setPill('ok', '
|
|
847
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
848
848
|
} catch (e) {
|
|
849
849
|
const msg = (e && e.message) ? e.message : String(e);
|
|
850
850
|
setOut('## Apply failed\n\n' + msg);
|
package/cli/web.js
CHANGED
|
@@ -681,13 +681,13 @@ function buildHtml(safeDefault) {
|
|
|
681
681
|
<aside class="sidebar">
|
|
682
682
|
<div class="sideHeader">
|
|
683
683
|
<div class="logo">FREYA</div>
|
|
684
|
-
<div class="statusPill"><span class="dot" id="dot"></span><span id="pill">
|
|
684
|
+
<div class="statusPill"><span class="dot" id="dot"></span><span id="pill">pronto</span></div>
|
|
685
685
|
</div>
|
|
686
686
|
|
|
687
687
|
<div class="sidePath" id="sidePath">./freya</div>
|
|
688
688
|
|
|
689
689
|
<div class="sideGroup">
|
|
690
|
-
<div class="sideTitle"
|
|
690
|
+
<div class="sideTitle">Área de trabalho</div>
|
|
691
691
|
<div class="help" style="margin-top:-4px">Selecione sua pasta <code>freya/</code> e sincronize quando precisar.</div>
|
|
692
692
|
<div class="row" style="grid-template-columns: 1fr auto">
|
|
693
693
|
<input id="dir" placeholder="./freya" />
|
|
@@ -810,13 +810,13 @@ function buildHtml(safeDefault) {
|
|
|
810
810
|
<div style="height:10px"></div>
|
|
811
811
|
<label style="display:flex; align-items:center; gap:10px; user-select:none; margin: 6px 0 12px 0">
|
|
812
812
|
<input id="prettyPublish" type="checkbox" checked style="width:auto" onchange="togglePrettyPublish()" />
|
|
813
|
-
|
|
813
|
+
Publicação bonita (cards/embeds)
|
|
814
814
|
</label>
|
|
815
815
|
|
|
816
816
|
<div class="stack">
|
|
817
|
-
<button class="btn" onclick="saveSettings()">
|
|
818
|
-
<button class="btn" onclick="publish('discord')">
|
|
819
|
-
<button class="btn" onclick="publish('teams')">
|
|
817
|
+
<button class="btn" onclick="saveSettings()">Salvar configurações</button>
|
|
818
|
+
<button class="btn" onclick="publish('discord')">Publicar selecionado → Discord</button>
|
|
819
|
+
<button class="btn" onclick="publish('teams')">Publicar selecionado → Teams</button>
|
|
820
820
|
</div>
|
|
821
821
|
</div>
|
|
822
822
|
</div>
|
|
@@ -824,13 +824,13 @@ function buildHtml(safeDefault) {
|
|
|
824
824
|
<div class="panel">
|
|
825
825
|
<div class="panelHead"><b>Slugs & Export</b></div>
|
|
826
826
|
<div class="panelBody">
|
|
827
|
-
<label>
|
|
827
|
+
<label>Regras de slug do projeto</label>
|
|
828
828
|
<textarea id="slugRules" rows="8" placeholder="{ \"rules\": [ { \"contains\": \"fideliza\", \"slug\": \"vivo/fidelizacao\" } ] }" style="width:100%; padding:10px 12px; border-radius:12px; border:1px solid var(--line); background: rgba(255,255,255,.72); color: var(--text); outline:none; resize: vertical; font-family: var(--mono);"></textarea>
|
|
829
829
|
<div class="help">Regras usadas pra inferir <code>projectSlug</code>. Formato JSON (objeto com <code>rules</code>).</div>
|
|
830
830
|
<div class="stack" style="margin-top:10px">
|
|
831
|
-
<button class="btn" onclick="reloadSlugRules()">
|
|
832
|
-
<button class="btn" onclick="saveSlugRules()">
|
|
833
|
-
<button class="btn" onclick="exportObsidian()">
|
|
831
|
+
<button class="btn" onclick="reloadSlugRules()">Recarregar regras</button>
|
|
832
|
+
<button class="btn" onclick="saveSlugRules()">Salvar regras</button>
|
|
833
|
+
<button class="btn" onclick="exportObsidian()">Exportar notas (Obsidian)</button>
|
|
834
834
|
</div>
|
|
835
835
|
</div>
|
|
836
836
|
</div>
|
|
@@ -852,7 +852,7 @@ function buildHtml(safeDefault) {
|
|
|
852
852
|
<aside class="chatPane">
|
|
853
853
|
<div class="chatHead">
|
|
854
854
|
<div>
|
|
855
|
-
<div class="chatTitle">
|
|
855
|
+
<div class="chatTitle">Conversa</div>
|
|
856
856
|
<div class="chatSub">Cole seus updates e deixe os Agents planejar/aplicar.</div>
|
|
857
857
|
</div>
|
|
858
858
|
</div>
|
|
@@ -868,8 +868,8 @@ function buildHtml(safeDefault) {
|
|
|
868
868
|
<textarea id="inboxText" rows="5" placeholder="Cole aqui updates do dia (status, blockers, decisões, ideias)…"></textarea>
|
|
869
869
|
|
|
870
870
|
<div class="composerActions">
|
|
871
|
-
<button class="btn primary" type="button" onclick="saveAndPlan()">
|
|
872
|
-
<button class="btn" type="button" onclick="runSuggestedReports()">
|
|
871
|
+
<button class="btn primary" type="button" onclick="saveAndPlan()">Salvar + Processar (Agents)</button>
|
|
872
|
+
<button class="btn" type="button" onclick="runSuggestedReports()">Rodar relatórios sugeridos</button>
|
|
873
873
|
</div>
|
|
874
874
|
|
|
875
875
|
<div class="composerToggles">
|
|
@@ -884,7 +884,7 @@ function buildHtml(safeDefault) {
|
|
|
884
884
|
</div>
|
|
885
885
|
|
|
886
886
|
<div class="statusFooter">
|
|
887
|
-
<span id="status" class="small">
|
|
887
|
+
<span id="status" class="small">pronto</span>
|
|
888
888
|
</div>
|
|
889
889
|
</div>
|
|
890
890
|
</aside>
|