mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-04 09:02:50 +00:00
feat: learn chat message
This commit is contained in:
@@ -4,6 +4,7 @@ const config = {
|
|||||||
"node_modules/@fontsource-variable/material-symbols-rounded/files/material-symbols-rounded-latin-full-normal.woff2",
|
"node_modules/@fontsource-variable/material-symbols-rounded/files/material-symbols-rounded-latin-full-normal.woff2",
|
||||||
outputPath: "src/lib/assets/icons.min.woff2",
|
outputPath: "src/lib/assets/icons.min.woff2",
|
||||||
icons: [
|
icons: [
|
||||||
|
"rocket_launch",
|
||||||
"deployed_code_update",
|
"deployed_code_update",
|
||||||
"adjust",
|
"adjust",
|
||||||
"add",
|
"add",
|
||||||
|
|||||||
@@ -191,6 +191,14 @@
|
|||||||
onmouseout={() => (toolbarHover = false)}
|
onmouseout={() => (toolbarHover = false)}
|
||||||
onblur={() => (toolbarHover = false)}
|
onblur={() => (toolbarHover = false)}
|
||||||
>
|
>
|
||||||
|
{#if event.getType() === "m.room.message"}
|
||||||
|
{@const message = event.event.content?.["body"]}
|
||||||
|
<a
|
||||||
|
class="icon rocket"
|
||||||
|
href="/learn/sentence/?sentence={encodeURIComponent(message)}"
|
||||||
|
>rocket_launch</a
|
||||||
|
>
|
||||||
|
{/if}
|
||||||
<button class="icon">add_reaction</button>
|
<button class="icon">add_reaction</button>
|
||||||
<button class="icon">reply</button>
|
<button class="icon">reply</button>
|
||||||
{#if event.event.content?.["m.replay"]}
|
{#if event.event.content?.["m.replay"]}
|
||||||
@@ -231,6 +239,21 @@
|
|||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes rocket {
|
||||||
|
0% {
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
90% {
|
||||||
|
transform: translate(4px, -4px);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.icon.rocket {
|
||||||
|
animation: rocket 2s;
|
||||||
|
}
|
||||||
|
|
||||||
.toolbar {
|
.toolbar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -26px;
|
top: -26px;
|
||||||
@@ -242,6 +265,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
|
||||||
|
a,
|
||||||
button {
|
button {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
width: 24px;
|
width: 24px;
|
||||||
|
|||||||
Reference in New Issue
Block a user