sprintify-ui 0.12.4 → 0.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="px-3 py-2"
|
|
3
|
+
class="px-3 py-2 rounded"
|
|
4
4
|
:class="[active ? 'bg-slate-100' : '']"
|
|
5
5
|
>
|
|
6
|
-
<div
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
6
|
+
<div class="flex items-start gap-2">
|
|
7
|
+
<span
|
|
8
|
+
class="mt-1.5 inline-block h-2 w-2 shrink-0 rounded-full bg-red-500"
|
|
9
|
+
:class="[notification.read ? 'invisible' : '']"
|
|
10
|
+
/>
|
|
11
|
+
<div class="min-w-0 flex-1">
|
|
12
|
+
<div
|
|
13
|
+
class="text-sm leading-tight"
|
|
14
|
+
:class="textClasses"
|
|
15
|
+
v-html="notification.text"
|
|
16
|
+
/>
|
|
17
|
+
<BaseDisplayRelativeTime
|
|
18
|
+
v-if="notification.created_at"
|
|
19
|
+
v-slot="{ readableDate }"
|
|
20
|
+
:tooltip="false"
|
|
21
|
+
:value="notification.created_at"
|
|
22
|
+
>
|
|
23
|
+
<p
|
|
24
|
+
class="mt-1 text-xs text-slate-500"
|
|
25
|
+
>
|
|
26
|
+
{{ readableDate }}
|
|
27
|
+
</p>
|
|
28
|
+
</BaseDisplayRelativeTime>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
23
31
|
</div>
|
|
24
32
|
</template>
|
|
25
33
|
|
|
@@ -33,9 +41,7 @@ const props = defineProps<{
|
|
|
33
41
|
}>();
|
|
34
42
|
|
|
35
43
|
const textClasses = computed(() => {
|
|
36
|
-
return props.notification.read ?
|
|
37
|
-
'text-slate-500' :
|
|
38
|
-
"text-black font-medium before:bg-red-500 before:inline-block before:rounded-full before:mr-1 before:relative before:-top-px before:h-2 before:w-2 before:content-['']";
|
|
44
|
+
return props.notification.read ? 'text-slate-900' : 'text-slate-900 font-medium';
|
|
39
45
|
});
|
|
40
46
|
|
|
41
47
|
</script>
|
|
@@ -131,6 +131,12 @@ export default {
|
|
|
131
131
|
text: "You have a new message",
|
|
132
132
|
created_at: DateTime.now().minus({ second: 1 }).toISO(),
|
|
133
133
|
},
|
|
134
|
+
{
|
|
135
|
+
id: "3",
|
|
136
|
+
text: "Please verify your email address",
|
|
137
|
+
created_at: DateTime.now().minus({ second: 1000 }).toISO(),
|
|
138
|
+
read: true,
|
|
139
|
+
},
|
|
134
140
|
{
|
|
135
141
|
id: "2",
|
|
136
142
|
text: "Your inbox is now full. Please empty your inbox before it goes bang.",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
noMargin ? 'tip-tap-no-margin' : ''
|
|
7
7
|
]"
|
|
8
8
|
>
|
|
9
|
-
<div class="px-1 py-1 border-b flex items-center">
|
|
9
|
+
<div class="px-1 py-1 border-b flex flex-wrap items-center">
|
|
10
10
|
<template
|
|
11
11
|
v-for="action in filteredActions"
|
|
12
12
|
:key="action.name"
|
|
@@ -126,7 +126,8 @@
|
|
|
126
126
|
|
|
127
127
|
<div
|
|
128
128
|
class="bg-white p-5"
|
|
129
|
-
:class="[disabled ? 'cursor-not-allowed opacity-80' : '']"
|
|
129
|
+
:class="[disabled ? 'cursor-not-allowed opacity-80' : 'cursor-text']"
|
|
130
|
+
@click="focusEditor"
|
|
130
131
|
>
|
|
131
132
|
<editor-content
|
|
132
133
|
v-if="editor"
|
|
@@ -271,6 +272,20 @@ function pickImage() {
|
|
|
271
272
|
imageInput.value?.click();
|
|
272
273
|
}
|
|
273
274
|
|
|
275
|
+
function focusEditor(event: MouseEvent) {
|
|
276
|
+
if (props.disabled || !editor) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const target = event.target as HTMLElement;
|
|
281
|
+
|
|
282
|
+
if (target.closest('.ProseMirror')) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
editor.chain().focus('end').run();
|
|
287
|
+
}
|
|
288
|
+
|
|
274
289
|
const highlightColors = [
|
|
275
290
|
'#BBF7D0',
|
|
276
291
|
'#BFDBFE',
|