Skip to content

Commit 077640b

Browse files
committed
make email field clickable
1 parent 665d84c commit 077640b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Diff for: packages/experiments-realm/email.gts

+9
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ export class EmailField extends StringField {
6969
<template>
7070
{{#if @model}}
7171
<EntityDisplayWithIcon @title={{@model}} @underline={{false}}>
72+
<:title>
73+
<a href='mailto:{{@model}}' rel='noopener noreferrer'>
74+
{{@model}}
75+
</a>
76+
</:title>
7277
<:icon>
7378
<MailIcon class='icon' />
7479
</:icon>
@@ -78,6 +83,10 @@ export class EmailField extends StringField {
7883
.icon {
7984
color: var(--boxel-400);
8085
}
86+
a:hover {
87+
text-decoration: underline;
88+
color: inherit;
89+
}
8190
</style>
8291
</template>
8392
};

Diff for: packages/experiments-realm/website.gts

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ export class WebsiteField extends UrlField {
2020
<template>
2121
<EntityDisplayWithIcon>
2222
<:title>
23+
{{! Display only domain and path, unlike URLField's full URL representation }}
24+
{{! Custom atom implementation for handling URL interactions }}
2325
{{#if @model}}
2426
{{#if (isValidUrl @model)}}
2527
<a href={{@model}} target='_blank' rel='noopener noreferrer'>

0 commit comments

Comments
 (0)