Clickable inbox entries
This commit is contained in:
@ -0,0 +1,7 @@
|
||||
import { Controller } from "stimulus"
|
||||
|
||||
export default class extends Controller {
|
||||
onClick() {
|
||||
window.location = this.data.get('link');
|
||||
}
|
||||
}
|
@ -1,6 +1,12 @@
|
||||
.inbox {
|
||||
table-layout: fixed;
|
||||
|
||||
tbody {
|
||||
tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
@ -25,7 +25,9 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Emails}}
|
||||
<tr>
|
||||
<tr data-controller="inbox-entry"
|
||||
data-action="click->inbox-entry#onClick"
|
||||
data-inbox-entry-link="./emails/{{ .ID }}">
|
||||
<td class="email-subject"><div>{{ .Subject }}</div></td>
|
||||
<td class="email-from">
|
||||
{{range .From}}
|
||||
|
Reference in New Issue
Block a user