screen {
resources {
style """
.log-window__body {
width: fill;
height: fill;
padding: 14;
spacing: 10;
}
.log-window__head { width: fill; align_y: center; spacing: 12; }
.log-window__title { size: 13; bold: true; color: var(--text); }
.log-window__count { width: fill; size: 11; color: var(--muted); }
.log-window__scroll {
width: fill;
height: fill;
background: var(--surface);
border_radius: 4;
padding: 10;
}
.log-window__editor {
width: fill;
height: fill;
background: var(--surface);
border_radius: 4;
padding: 10 12;
font: mono;
}
"""
script(src = "scripts/log_window.luau")
}
column(class = screen) {
row(class = resize__top) {
column(
class = "resize__corner resize__corner--nw",
on_press = window:resize:nw
)
column(
class = resize__edge-h,
on_press = window:resize:n
)
column(
class = "resize__corner resize__corner--ne",
on_press = window:resize:ne
)
}
row(class = resize__mid) {
column(class = resize__edge-v, on_press = window:resize:w)
column(class = resize__body) {
row(class = titlebar) {
row(
class = titlebar__drag,
on_press = window:drag,
on_double_click = window:maximize,
) {
text("●", class = titlebar__dot)
text("@log_window_title", class = titlebar__title)
}
button("—", class = titlebar__btn, on_click = window:minimize)
if @glacier_window_maximized {
button(class = titlebar__btn, on_click = window:maximize) {
container(class = titlebar__icon-box) {
svg(
class = titlebar__icon,
src = "assets/icons/win_restore.svg"
)
}
}
} else {
button(class = titlebar__btn, on_click = window:maximize) {
container(class = titlebar__icon-box) {
svg(
class = titlebar__icon,
src = "assets/icons/win_maximize.svg"
)
}
}
}
button(
"✕",
class = "titlebar__btn titlebar__btn--close",
on_click = window:close
)
}
column(class = log-window__body) {
row(class = log-window__head) {
text("@log_window_title", class = log-window__title)
text(
"{t('log_window.lines_live',
log_window_count=log_window_count)}",
if = @log_window_past,
not_equals = true,
class = log-window__count
)
text(
"{t('log_window.lines_past',
log_window_count=log_window_count)}",
if = @log_window_past,
equals = true,
class = log-window__count
)
button(
"{t('log_window.load_older')}",
if = @log_window_has_more,
equals = true,
class = tabs__tab,
on_click = log_window_load_older
)
button(
"↑",
class = tabs__tab,
on_click = textarea_top:log_window_logs_text,
tooltip = "{t('log_window.go_to_top')}"
)
button(
"↓",
class = tabs__tab,
on_click = textarea_end:log_window_logs_text,
tooltip = "{t('log_window.go_to_bottom')}"
)
button(
"{t('log_window.copy_all')}",
class = tabs__tab,
on_click = copy_ctx:log_window_logs_text
)
}
textarea(
class = log-window__editor,
font = mono,
read_only = true,
:value = log_window_logs_text,
placeholder = "{t('log_window.no_logs_yet_waiting_for')}",
)
}
}
column(class = resize__edge-v, on_press = window:resize:e)
}
row(class = resize__bottom) {
column(
class = "resize__corner resize__corner--sw",
on_press = window:resize:sw
)
column(class = resize__edge-h, on_press = window:resize:s)
column(
class = "resize__corner resize__corner--se",
on_press = window:resize:se
)
}
}
}