semantic markup update
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
|
||||
// [DEF:fetchLogs:Function]
|
||||
// @PURPOSE: Fetches logs for the current task.
|
||||
// @PRE: taskId must be set.
|
||||
// @POST: logs array is updated with data from taskService.
|
||||
async function fetchLogs() {
|
||||
if (!taskId) return;
|
||||
try {
|
||||
@@ -41,6 +43,8 @@
|
||||
|
||||
// [DEF:scrollToBottom:Function]
|
||||
// @PURPOSE: Scrolls the log container to the bottom.
|
||||
// @PRE: logContainer element must be bound.
|
||||
// @POST: logContainer scrollTop is set to scrollHeight.
|
||||
function scrollToBottom() {
|
||||
if (logContainer) {
|
||||
setTimeout(() => {
|
||||
@@ -52,6 +56,8 @@
|
||||
|
||||
// [DEF:handleScroll:Function]
|
||||
// @PURPOSE: Updates auto-scroll preference based on scroll position.
|
||||
// @PRE: logContainer scroll event fired.
|
||||
// @POST: autoScroll boolean is updated.
|
||||
function handleScroll() {
|
||||
if (!logContainer) return;
|
||||
// If user scrolls up, disable auto-scroll
|
||||
@@ -63,6 +69,8 @@
|
||||
|
||||
// [DEF:close:Function]
|
||||
// @PURPOSE: Closes the log viewer modal.
|
||||
// @PRE: Modal is open.
|
||||
// @POST: Modal is closed and close event is dispatched.
|
||||
function close() {
|
||||
dispatch('close');
|
||||
show = false;
|
||||
@@ -71,6 +79,8 @@
|
||||
|
||||
// [DEF:getLogLevelColor:Function]
|
||||
// @PURPOSE: Returns the CSS color class for a given log level.
|
||||
// @PRE: level string is provided.
|
||||
// @POST: Returns tailwind color class string.
|
||||
function getLogLevelColor(level) {
|
||||
switch (level) {
|
||||
case 'INFO': return 'text-blue-600';
|
||||
@@ -99,6 +109,8 @@
|
||||
|
||||
// [DEF:onDestroy:Function]
|
||||
// @PURPOSE: Cleans up the polling interval.
|
||||
// @PRE: Component is being destroyed.
|
||||
// @POST: Polling interval is cleared.
|
||||
onDestroy(() => {
|
||||
if (interval) clearInterval(interval);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user