diff --git a/apps/frontend/src/assets/logos/curseforge.svg b/apps/frontend/src/assets/logos/curseforge.svg
index 5664d7d6..aace1835 100644
--- a/apps/frontend/src/assets/logos/curseforge.svg
+++ b/apps/frontend/src/assets/logos/curseforge.svg
@@ -1,4 +1,3 @@
-
+
\ No newline at end of file
diff --git a/apps/frontend/src/ui/components/game/PlayerHead.tsx b/apps/frontend/src/ui/components/game/PlayerHead.tsx
index fae70ed6..cde33e63 100644
--- a/apps/frontend/src/ui/components/game/PlayerHead.tsx
+++ b/apps/frontend/src/ui/components/game/PlayerHead.tsx
@@ -8,7 +8,7 @@ type PlayerHeadProps = JSX.IntrinsicElements['img'] & {
};
function crafatar(uuid: string) {
- return `https://crafatar.com/avatars/${uuid}?size=48`;
+ return `https://crafatar.com/avatars/${uuid}?size=48&overlay`;
}
function PlayerHead(props: PlayerHeadProps) {
diff --git a/apps/frontend/src/ui/components/overlay/Modal.tsx b/apps/frontend/src/ui/components/overlay/Modal.tsx
index 50e76f39..49353acf 100644
--- a/apps/frontend/src/ui/components/overlay/Modal.tsx
+++ b/apps/frontend/src/ui/components/overlay/Modal.tsx
@@ -127,7 +127,7 @@ export type ModalProps = {
function Modal(props: ModalProps) {
return (
-
+
{props.children}
);
diff --git a/apps/frontend/src/ui/components/overlay/Popup.tsx b/apps/frontend/src/ui/components/overlay/Popup.tsx
index 02bb08e4..f6d6cd04 100644
--- a/apps/frontend/src/ui/components/overlay/Popup.tsx
+++ b/apps/frontend/src/ui/components/overlay/Popup.tsx
@@ -19,7 +19,7 @@ export type PopupProps = Omit
[0], 'children'> & Parent
function Popup(props: PopupProps) {
let popupRef!: HTMLDivElement;
- function onMouseDown(e: MouseEvent) {
+ function onClick(e: MouseEvent) {
e.stopPropagation();
if (!popupRef || !props.visible())
return;
@@ -31,9 +31,9 @@ function Popup(props: PopupProps) {
createEffect(() => {
if (props.visible())
- document.addEventListener('mousedown', onMouseDown);
+ document.addEventListener('click', onClick);
else
- document.removeEventListener('mousedown', onMouseDown);
+ document.removeEventListener('click', onClick);
});
return (
diff --git a/apps/frontend/src/ui/hooks/useNotifications.tsx b/apps/frontend/src/ui/hooks/useNotifications.tsx
index 1f6aafbe..a874084a 100644
--- a/apps/frontend/src/ui/hooks/useNotifications.tsx
+++ b/apps/frontend/src/ui/hooks/useNotifications.tsx
@@ -18,17 +18,6 @@ export function NotificationProvider(props: ParentProps) {
let unlisten: UnlistenFn | undefined;
onMount(() => {
- document.addEventListener('keypress', (e) => {
- if (e.key === 'n')
- setNotifications(notifications => ({
- ...notifications,
- [Math.random().toString()]: {
- title: 'Test',
- message: 'This is a test notification',
- },
- }));
- });
-
events.ingressPayload.listen((e) => {
setNotifications(notifications => ({
...notifications,
diff --git a/apps/frontend/src/ui/pages/cluster/ClusterLogs.tsx b/apps/frontend/src/ui/pages/cluster/ClusterLogs.tsx
index e143cd73..e34b9043 100644
--- a/apps/frontend/src/ui/pages/cluster/ClusterLogs.tsx
+++ b/apps/frontend/src/ui/pages/cluster/ClusterLogs.tsx
@@ -9,11 +9,13 @@ import useCommand, { tryResult } from '~ui/hooks/useCommand';
import useSettings from '~ui/hooks/useSettings';
import { join } from 'pathe';
import { createEffect, createSignal, For, Show, untrack } from 'solid-js';
+import useNotifications from "~ui/hooks/useNotifications.tsx";
function ClusterLogs() {
const [cluster] = useClusterContext();
const [logs] = useCommand(() => bridge.commands.getClusterLogs(cluster()!.uuid));
const { settings } = useSettings();
+ const notifications = useNotifications();
const [activeLogFile, setActiveLogFile] = createSignal(null);
const [logContent, setLogContent] = createSignal(null);
@@ -46,7 +48,11 @@ function ClusterLogs() {
return;
const id = await tryResult(() => bridge.commands.uploadLog(cluster()!.uuid, log));
- open(`https://mclo.gs/${id}`);
+
+ open(`https://mclo.gs/${id}`).then(() => notifications.set("logs", {
+ title: "Log Uploaded",
+ message: "Opening in your browser."
+ }));
}
const missingLogs = () => logs() === undefined || logs()?.length === 0 || false;
diff --git a/packages/client/src/utils/markdown.ts b/packages/client/src/utils/markdown.ts
index f5854b33..0a986506 100644
--- a/packages/client/src/utils/markdown.ts
+++ b/packages/client/src/utils/markdown.ts
@@ -15,7 +15,7 @@ export const configuredXss: FilterXSS = new FilterXSS({
kbd: ['id'],
input: ['checked', 'disabled', 'type'],
iframe: ['width', 'height', 'allowfullscreen', 'frameborder', 'start', 'end'],
- img: [...(whiteList.img || []), 'usemap', 'style'],
+ img: [...(whiteList.img || []), 'usemap', 'style', 'align'],
map: ['name'],
area: [...(whiteList.a || []), 'coords'],
a: [...(whiteList.a || []), 'rel'],
@@ -23,6 +23,8 @@ export const configuredXss: FilterXSS = new FilterXSS({
th: [...(whiteList.th || []), 'style'],
picture: [],
source: ['media', 'sizes', 'src', 'srcset', 'type'],
+ p: [...(whiteList.p || []), 'align'],
+ div: [...(whiteList.p || []), 'align'],
// Other
center: [],