update UI

This commit is contained in:
Juergen Kunz
2025-06-27 09:28:07 +00:00
parent bf9f805c71
commit 405990563b
4 changed files with 809 additions and 254 deletions

View File

@@ -17,10 +17,10 @@
}, },
"devDependencies": { "devDependencies": {
"@git.zone/tsbuild": "^2.6.4", "@git.zone/tsbuild": "^2.6.4",
"@git.zone/tsbundle": "^2.4.0", "@git.zone/tsbundle": "^2.5.1",
"@git.zone/tsrun": "^1.3.3", "@git.zone/tsrun": "^1.3.3",
"@git.zone/tstest": "^2.3.1", "@git.zone/tstest": "^2.3.1",
"@git.zone/tswatch": "^2.0.1", "@git.zone/tswatch": "^2.1.2",
"@types/node": "^22.0.0", "@types/node": "^22.0.0",
"node-forge": "^1.3.1" "node-forge": "^1.3.1"
}, },
@@ -30,8 +30,8 @@
"@api.global/typedserver": "^3.0.74", "@api.global/typedserver": "^3.0.74",
"@api.global/typedsocket": "^3.0.0", "@api.global/typedsocket": "^3.0.0",
"@apiclient.xyz/cloudflare": "^6.4.1", "@apiclient.xyz/cloudflare": "^6.4.1",
"@design.estate/dees-catalog": "^1.9.0", "@design.estate/dees-catalog": "^1.10.2",
"@design.estate/dees-element": "^2.0.44", "@design.estate/dees-element": "^2.0.45",
"@push.rocks/projectinfo": "^5.0.1", "@push.rocks/projectinfo": "^5.0.1",
"@push.rocks/qenv": "^6.1.0", "@push.rocks/qenv": "^6.1.0",
"@push.rocks/smartacme": "^8.0.0", "@push.rocks/smartacme": "^8.0.0",
@@ -46,7 +46,7 @@
"@push.rocks/smartnetwork": "^4.0.2", "@push.rocks/smartnetwork": "^4.0.2",
"@push.rocks/smartpath": "^5.0.5", "@push.rocks/smartpath": "^5.0.5",
"@push.rocks/smartpromise": "^4.0.3", "@push.rocks/smartpromise": "^4.0.3",
"@push.rocks/smartproxy": "^19.6.12", "@push.rocks/smartproxy": "^19.6.13",
"@push.rocks/smartrequest": "^2.1.0", "@push.rocks/smartrequest": "^2.1.0",
"@push.rocks/smartrule": "^2.0.1", "@push.rocks/smartrule": "^2.0.1",
"@push.rocks/smartrx": "^3.0.10", "@push.rocks/smartrx": "^3.0.10",

1011
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -438,14 +438,28 @@ export class OpsViewEmails extends DeesElement {
await DeesModal.createAndShow({ await DeesModal.createAndShow({
heading: forward ? 'Forward Email' : replyTo ? 'Reply to Email' : 'New Email', heading: forward ? 'Forward Email' : replyTo ? 'Reply to Email' : 'New Email',
width: 'large',
content: html` content: html`
<div style="width: 700px; max-width: 90vw;"> <div>
<dees-form @formData=${async (e: CustomEvent) => { <dees-form @formData=${async (e: CustomEvent) => {
await this.sendEmail(e.detail); await this.sendEmail(e.detail);
// Close modal after sending // Close modal after sending
const modals = document.querySelectorAll('dees-modal'); const modals = document.querySelectorAll('dees-modal');
modals.forEach(m => (m as any).destroy?.()); modals.forEach(m => (m as any).destroy?.());
}}> }}>
<dees-input-dropdown
key="from"
label="From"
.options=${[
{ key: 'admin@dcrouter.local', value: 'Admin <admin@dcrouter.local>' },
{ key: 'noreply@dcrouter.local', value: 'No Reply <noreply@dcrouter.local>' },
{ key: 'support@dcrouter.local', value: 'Support <support@dcrouter.local>' },
{ key: 'alerts@dcrouter.local', value: 'Alerts <alerts@dcrouter.local>' }
]}
.selectedKey=${'admin@dcrouter.local'}
required
></dees-input-dropdown>
<dees-input-tags <dees-input-tags
key="to" key="to"
label="To" label="To"
@@ -475,13 +489,12 @@ export class OpsViewEmails extends DeesElement {
required required
></dees-input-text> ></dees-input-text>
<dees-editor <dees-input-wysiwyg
key="body" key="body"
label="Message" label="Message"
.mode=${'markdown'} outputFormat="html"
.height=${400} .value=${replyTo && !forward ? `<p></p><hr><p>On ${new Date(replyTo.date).toLocaleString()}, ${replyTo.from} wrote:</p><blockquote>${replyTo.html || `<p>${replyTo.body}</p>`}</blockquote>` : replyTo && forward ? (replyTo.html || `<p>${replyTo.body}</p>`) : ''}
.value=${replyTo && !forward ? `\n\n---\nOn ${new Date(replyTo.date).toLocaleString()}, ${replyTo.from} wrote:\n\n${replyTo.body}` : replyTo && forward ? replyTo.body : ''} ></dees-input-wysiwyg>
></dees-editor>
<dees-input-fileupload <dees-input-fileupload
key="attachments" key="attachments"
@@ -568,12 +581,13 @@ export class OpsViewEmails extends DeesElement {
// Add to sent folder (mock) // Add to sent folder (mock)
const newEmail: IEmail = { const newEmail: IEmail = {
id: `email-${Date.now()}`, id: `email-${Date.now()}`,
from: 'me@dcrouter.local', from: formData.from || 'admin@dcrouter.local',
to: formData.to || [], to: formData.to || [],
cc: formData.cc || [], cc: formData.cc || [],
bcc: formData.bcc || [], bcc: formData.bcc || [],
subject: formData.subject, subject: formData.subject,
body: formData.body, body: formData.body.replace(/<[^>]*>/g, ''), // Strip HTML for plain text version
html: formData.body, // Store the HTML version
date: Date.now(), date: Date.now(),
read: true, read: true,
folder: 'sent', folder: 'sent',

View File

@@ -101,24 +101,12 @@ export class OpsViewNetwork extends DeesElement {
cssManager.defaultStyles, cssManager.defaultStyles,
viewHostCss, viewHostCss,
css` css`
:host {
display: block;
padding: 24px;
}
.networkContainer { .networkContainer {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 24px; gap: 24px;
} }
dees-statsgrid {
margin-bottom: 24px;
}
dees-chart-area {
margin-bottom: 24px;
}
.protocolBadge { .protocolBadge {
display: inline-flex; display: inline-flex;