mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-31 10:12:21 +01:00
fix(skills): size the raw editor from its source lines
This commit is contained in:
+2
-2
@@ -272,7 +272,7 @@ export function openMemoryModal(tabName = 'browse') {
|
||||
if (tab) {
|
||||
tab.click();
|
||||
} else if (target === 'skills') {
|
||||
import('./skills.js?v=20260909kebabconsistency1').then(m => {
|
||||
import('./skills.js?v=20261028skillheight1').then(m => {
|
||||
if (m.loadSkills) m.loadSkills(true);
|
||||
else if (m.default?.loadSkills) m.default.loadSkills(true);
|
||||
});
|
||||
@@ -1613,7 +1613,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
});
|
||||
// Lazy-load skills tab (cascade=true → play the domino-in entrance)
|
||||
if (target === 'skills') {
|
||||
import('./skills.js?v=20260909kebabconsistency1').then(m => { if (m.loadSkills) m.loadSkills(true); else if (m.default?.loadSkills) m.default.loadSkills(true); });
|
||||
import('./skills.js?v=20261028skillheight1').then(m => { if (m.loadSkills) m.loadSkills(true); else if (m.default?.loadSkills) m.default.loadSkills(true); });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1288,6 +1288,9 @@ function _toggleSkillEdit(card, name) {
|
||||
ta.className = 'skill-md-editor';
|
||||
ta.spellcheck = false;
|
||||
ta.value = (card._md != null ? card._md : (pre ? pre.textContent : '')) || '';
|
||||
// Let the source set the intrinsic height; the card's existing flex/max
|
||||
// height keeps long files bounded and the Save footer reachable.
|
||||
ta.rows = Math.max(ta.rows, ta.value.split(/\r\n|\r|\n/).length);
|
||||
ta.addEventListener('click', (e) => e.stopPropagation());
|
||||
if (pre) pre.style.display = 'none';
|
||||
preview.insertBefore(ta, preview.querySelector('.doclib-card-expanded-actions'));
|
||||
|
||||
Reference in New Issue
Block a user