ssb: Fiddling with message card and compose CSS some more.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled

This commit is contained in:
Cory McWilliams 2024-12-29 15:42:12 -05:00
parent 2f0b4a0187
commit 98f1700049
3 changed files with 36 additions and 29 deletions

View File

@ -1,5 +1,5 @@
{ {
"type": "tildefriends-app", "type": "tildefriends-app",
"emoji": "🦀", "emoji": "🦀",
"previous": "&2aHEnXfmAZgCJxML+RF6j63QIYnI4TR5QvqzCHSitNQ=.sha256" "previous": "&zUbiDsKYgSEnn5g5oDSQ1M5YwGqwHL+3cMO6a6zdCD8=.sha256"
} }

View File

@ -572,13 +572,15 @@ class TfComposeElement extends LitElement {
} }
</style> </style>
<div <div
class="w3-card-4 w3-theme-d4 w3-padding-small" class="w3-card-4 w3-theme-d4 w3-padding w3-margin-top w3-margin-bottom"
style="box-sizing: border-box" style="box-sizing: border-box"
> >
${this.channel !== undefined <header class="w3-container">
? html`<p>To #${this.channel}:</p>` ${this.channel !== undefined
: undefined} ? html`<p>To #${this.channel}:</p>`
${this.render_encrypt()} : undefined}
${this.render_encrypt()}
</header>
<div class="w3-container w3-padding-small"> <div class="w3-container w3-padding-small">
<div class="w3-half"> <div class="w3-half">
<span <span
@ -592,26 +594,28 @@ class TfComposeElement extends LitElement {
.innerText=${live(draft.text ?? '')} .innerText=${live(draft.text ?? '')}
></span> ></span>
</div> </div>
<div class="w3-half w3-padding"> <div class="w3-half">
${content_warning} ${content_warning}
<div id="preview"></div> <p id="preview"></p>
</div> </div>
</div> </div>
${Object.values(draft.mentions || {}).map((x) => ${Object.values(draft.mentions || {}).map((x) =>
self.render_mention(x) self.render_mention(x)
)} )}
${this.render_attach_app()} ${this.render_content_warning()} <footer class="w3-container">
${this.render_new_thread()} ${this.render_attach_app()} ${this.render_content_warning()}
<button class="w3-button w3-theme-d1" id="submit" @click=${this.submit}> ${this.render_new_thread()}
Submit <button class="w3-button w3-theme-d1" id="submit" @click=${this.submit}>
</button> Submit
<button class="w3-button w3-theme-d1" @click=${this.attach}> </button>
Attach <button class="w3-button w3-theme-d1" @click=${this.attach}>
</button> Attach
${this.render_attach_app_button()} ${encrypt} </button>
<button class="w3-button w3-theme-d1" @click=${this.discard}> ${this.render_attach_app_button()} ${encrypt}
Discard <button class="w3-button w3-theme-d1" @click=${this.discard}>
</button> Discard
</button>
</footer>
</div> </div>
`; `;
return result; return result;

View File

@ -320,6 +320,8 @@ ${JSON.stringify(mention, null, 2)}</pre
></tf-message>` ></tf-message>`
)}`; )}`;
} }
} else {
return undefined;
} }
} }
@ -639,7 +641,7 @@ ${JSON.stringify(content, null, 2)}</pre
<span>${raw_button}</span> <span>${raw_button}</span>
</div> </div>
${payload} ${this.render_votes()} ${payload} ${this.render_votes()}
<p> <footer class="w3-container">
${reply} ${reply}
<button class="w3-button w3-theme-d1" @click=${this.react}> <button class="w3-button w3-theme-d1" @click=${this.react}>
React React
@ -654,8 +656,8 @@ ${JSON.stringify(content, null, 2)}</pre
</button> </button>
` `
: undefined} : undefined}
</p> ${this.render_children()}
${this.render_children()} </footer>
</div> </div>
`; `;
} else if (content.type === 'issue') { } else if (content.type === 'issue') {
@ -696,12 +698,12 @@ ${JSON.stringify(content, null, 2)}</pre
<span>${raw_button}</span> <span>${raw_button}</span>
</div> </div>
${content.text} ${this.render_votes()} ${content.text} ${this.render_votes()}
<p> <footer class="w3-container">
<button class="w3-button w3-theme-d1" @click=${this.react}> <button class="w3-button w3-theme-d1" @click=${this.react}>
React React
</button> </button>
</p> ${this.render_children()}
${this.render_children()} </footer>
</div> </div>
`; `;
} else if (content.type === 'blog') { } else if (content.type === 'blog') {
@ -792,13 +794,14 @@ ${JSON.stringify(content, null, 2)}</pre
<div>${body}</div> <div>${body}</div>
${this.render_mentions()} ${this.render_mentions()}
<div> ${this.render_votes()}
<footer class="w3-content">
${reply} ${reply}
<button class="w3-button w3-theme-d1" @click=${this.react}> <button class="w3-button w3-theme-d1" @click=${this.react}>
React React
</button> </button>
</div> ${this.render_children()}
${this.render_votes()} ${this.render_children()} </footer>
</div> </div>
`; `;
} else if (content.type === 'pub') { } else if (content.type === 'pub') {