mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-27 21:48:27 +00:00
use fontFamily + fontSize from settings in console
This commit is contained in:
parent
7d8984b706
commit
801879bddf
@ -3,9 +3,11 @@ import useEvent from '@src/useEvent.mjs';
|
|||||||
import cx from '@src/cx.mjs';
|
import cx from '@src/cx.mjs';
|
||||||
import { nanoid } from 'nanoid';
|
import { nanoid } from 'nanoid';
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
import { useSettings } from '../../../settings.mjs';
|
||||||
|
|
||||||
export function ConsoleTab() {
|
export function ConsoleTab() {
|
||||||
const [log, setLog] = useState([]);
|
const [log, setLog] = useState([]);
|
||||||
|
const { fontFamily, fontSize } = useSettings();
|
||||||
useLogger(
|
useLogger(
|
||||||
useCallback((e) => {
|
useCallback((e) => {
|
||||||
const { message, type, data } = e.detail;
|
const { message, type, data } = e.detail;
|
||||||
@ -27,19 +29,14 @@ export function ConsoleTab() {
|
|||||||
}, []),
|
}, []),
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<div id="console-tab" className="break-all px-4 dark:text-white text-stone-900 text-sm py-2 space-y-1">
|
<div
|
||||||
{!log.length && (
|
id="console-tab"
|
||||||
<pre aria-hidden="true">{`███████╗████████╗██████╗ ██╗ ██╗██████╗ ███████╗██╗
|
className="break-all px-4 dark:text-white text-stone-900 text-sm py-2 space-y-1"
|
||||||
██╔════╝╚══██╔══╝██╔══██╗██║ ██║██╔══██╗██╔════╝██║
|
style={{ fontFamily, fontSize }}
|
||||||
███████╗ ██║ ██████╔╝██║ ██║██║ ██║█████╗ ██║
|
>
|
||||||
╚════██║ ██║ ██╔══██╗██║ ██║██║ ██║██╔══╝ ██║
|
|
||||||
███████║ ██║ ██║ ██║╚██████╔╝██████╔╝███████╗███████╗
|
|
||||||
╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝`}</pre>
|
|
||||||
)}
|
|
||||||
{log.map((l, i) => {
|
{log.map((l, i) => {
|
||||||
const message = linkify(l.message);
|
const message = linkify(l.message);
|
||||||
const color = l.data?.hap?.value?.color;
|
const color = l.data?.hap?.value?.color;
|
||||||
console.log('color', color);
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={l.id}
|
key={l.id}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user