Skip to content

Commit 6e0f010

Browse files
committed
fix(#118): log title unreadable
1 parent 7fbd647 commit 6e0f010

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

classes/Actions/WebhookAction.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Kirby\Http\Remote;
66
use Kirby\Http\Url;
7+
use Kirby\Toolkit\I18n;
78
use Throwable;
89

910
/**
@@ -84,7 +85,11 @@ public function run(): void
8485
}
8586

8687
if ($request->code() > 299) {
87-
$this->cancel('dreamform.actions.webhook.log.error');
88+
$this->cancel(
89+
I18n::template('dreamform.actions.webhook.log.error', replace: [
90+
'url' => $this->block()->webhookUrl()->value()
91+
])
92+
);
8893
}
8994

9095
$this->log([

index.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/log/EmailEntry.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const props = defineProps({
1111
body: String
1212
})
1313
14-
const body = props.body.replaceAll(`\n`, "<br>").replaceAll("———", "<hr>")
14+
const body = props.body.replaceAll('\n', "<br>").replaceAll("———", "<hr>")
1515
1616
const isExpanded = ref(false)
1717
const uuid = ref(Math.random().toString(36).substring(2))

src/components/log/EntryBase.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const date = formatDate(props.timestamp)
2222
<div class="df-log-entry-heading">
2323
<span
2424
v-html="
25-
encodeURIComponent($t(props.title, props.template, props.title))
25+
$t(props.title, props.template, props.title)
2626
"
2727
></span>
2828
<span> • {{ date }}</span>

src/utils/date.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export function formatDate(timestamp) {
22
const locale = window.panel.user.language
33
const rtf = new Intl.RelativeTimeFormat(locale, { numeric: "auto" })
44

5-
const diff = (Date().now() - timestamp * 1000) / 1000
5+
const diff = (Date.now() - timestamp * 1000) / 1000
66
const units = [
77
{ unit: "year", seconds: 365 * 24 * 60 * 60 },
88
{ unit: "month", seconds: 30 * 24 * 60 * 60 },

0 commit comments

Comments
 (0)