diff --git a/src/assets/css/channel.scss b/src/assets/css/channel.scss
index 0b8d4ae..4cdfcc6 100644
--- a/src/assets/css/channel.scss
+++ b/src/assets/css/channel.scss
@@ -127,4 +127,16 @@
.messageIn.from-admin.pinned {
background-color: #f8f8f8;
}
+
+
+ .message-operations {
+ position: absolute;
+ width: fit-content;
+ background-color: white;
+ height: fit-content;
+ border-radius: 8px;
+ box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
+ white-space: nowrap;
+ }
+
}
diff --git a/src/assets/icons/ic_edit.vue b/src/assets/icons/ic_edit.vue
new file mode 100644
index 0000000..07827c8
--- /dev/null
+++ b/src/assets/icons/ic_edit.vue
@@ -0,0 +1,9 @@
+
+
+
\ No newline at end of file
diff --git a/src/assets/translations/en.json b/src/assets/translations/en.json
index 1f6e8ab..792f31f 100644
--- a/src/assets/translations/en.json
+++ b/src/assets/translations/en.json
@@ -46,7 +46,9 @@
"user_kick_and_ban": "Kick out",
"user_make_admin": "Make admin",
"user_make_moderator": "Make moderator",
- "user_revoke_moderator": "Revoke moderator"
+ "user_revoke_moderator": "Revoke moderator",
+ "pin": "Pin post",
+ "unpin": "Unpin post"
},
"message": {
"you": "You",
diff --git a/src/components/Chat.vue b/src/components/Chat.vue
index d54daef..22170ae 100644
--- a/src/components/Chat.vue
+++ b/src/components/Chat.vue
@@ -35,22 +35,28 @@
-
-
+ :userCanPin="canCreatePoll"
+ />
@@ -723,11 +729,12 @@ export default {
// Add read marker, if it is not newer than the "latest" message we are going to display
//
+ let showReadMarker = false;
let lastDisplayedEvent = undefined;
events = events.flatMap((e) => {
let result = [];
Vue.set(e, "component", this.componentForEvent(e, false));
- if (e.getId() == this.readMarker && lastDisplayedEvent !== undefined) {
+ if (e.getId() == this.readMarker && showReadMarker) {
const readMarkerEvent = ROOM_READ_MARKER_EVENT_PLACEHOLDER;
Vue.set(readMarkerEvent, "component", this.componentForEvent(readMarkerEvent, false));
if (readMarkerEvent.component) {
@@ -738,6 +745,9 @@ export default {
if (e.component) {
Vue.set(e, "nextDisplayedEvent", lastDisplayedEvent);
lastDisplayedEvent = e;
+ if (e.getSender() !== this.$matrix.currentUserId) {
+ showReadMarker = true;
+ }
}
result.push(e);
return result;
@@ -777,6 +787,12 @@ export default {
}
return null;
},
+ messageOperationsComponent() {
+ if (this.room.displayType == ROOM_TYPE_CHANNEL) {
+ return MessageOperationsChannel;
+ }
+ return MessageOperations;
+ },
chatContainerStyle() {
if (this.$config.chat_backgrounds && this.room && this.roomId) {
const roomType = this.isDirectRoom ? "direct" : this.isPublicRoom ? "public" : "invite";
diff --git a/src/components/messages/channel/MessageOperationsChannel.vue b/src/components/messages/channel/MessageOperationsChannel.vue
index 5c6e061..518d2b5 100644
--- a/src/components/messages/channel/MessageOperationsChannel.vue
+++ b/src/components/messages/channel/MessageOperationsChannel.vue
@@ -1,11 +1,25 @@
-
-
- $vuetify.icons.ic_pin_filled
-
-
- $vuetify.icons.ic_pin
-
+
+
+
+ $vuetify.icons.ic_edit
+
+ {{ $t("menu.edit") }}
+
+
+
+ $vuetify.icons.ic_pin
+
+ {{ $t("menu.pin") }}
+
+
+
+ $vuetify.icons.ic_pin
+
+ {{ $t("menu.unpin") }}
+
+
+