Skip to content

Commit

Permalink
fix(components): adjust message layer and update default theme
Browse files Browse the repository at this point in the history
- Remove unnecessary v-if directive in MessageLayer component
- Update logic for determining the origin of messages
- Change default theme to 'theme-default' in index.html
  • Loading branch information
MrCoder committed Dec 16, 2024
1 parent 91205f4 commit b691ea0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
timer = setTimeout(() => {
const theme =
localStorage.getItem(`${location.hostname}-zenuml-theme`) ||
"theme-idle-afternoon";
"theme-default";
window.zenUml
.render(cm.getValue(), {
theme,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ TODO: we may need to consider the width of self message on right most participan
<template>
<div class="message-layer relative z-30 pt-24 pb-10">
<block
v-if="!!origin"
:context="context"
:style="{ 'padding-left': paddingLeft + 'px' }"
:origin="origin"
Expand Down Expand Up @@ -35,7 +34,7 @@ const paddingLeft = computed(() => {

const origin = computed(() => {
const ownableMessages = AllMessages(rootContext.value);
if (ownableMessages.length === 0) return null;
if (ownableMessages.length === 0) return _STARTER_;
return ownableMessages[0].from || _STARTER_;
});

Expand Down

0 comments on commit b691ea0

Please sign in to comment.