mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 22:46:06 +02:00
Icon
This commit is contained in:
@@ -280,14 +280,14 @@
|
|||||||
<template v-if="groupDialog.ref.myMember">
|
<template v-if="groupDialog.ref.myMember">
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-if="groupDialog.ref.myMember.isSubscribedToAnnouncements"
|
v-if="groupDialog.ref.myMember.isSubscribedToAnnouncements"
|
||||||
:icon="Close"
|
:icon="MuteNotification"
|
||||||
command="Unsubscribe To Announcements"
|
command="Unsubscribe To Announcements"
|
||||||
divided>
|
divided>
|
||||||
{{ t('dialog.group.actions.unsubscribe') }}
|
{{ t('dialog.group.actions.unsubscribe') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-else
|
v-else
|
||||||
:icon="Check"
|
:icon="Bell"
|
||||||
command="Subscribe To Announcements"
|
command="Subscribe To Announcements"
|
||||||
divided>
|
divided>
|
||||||
{{ t('dialog.group.actions.subscribe') }}
|
{{ t('dialog.group.actions.subscribe') }}
|
||||||
@@ -1123,6 +1123,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
ArrowDown,
|
ArrowDown,
|
||||||
|
Bell,
|
||||||
ChatLineSquare,
|
ChatLineSquare,
|
||||||
Check,
|
Check,
|
||||||
CircleCheck,
|
CircleCheck,
|
||||||
@@ -1136,6 +1137,7 @@
|
|||||||
Loading,
|
Loading,
|
||||||
Message,
|
Message,
|
||||||
MoreFilled,
|
MoreFilled,
|
||||||
|
MuteNotification,
|
||||||
Operation,
|
Operation,
|
||||||
Refresh,
|
Refresh,
|
||||||
Share,
|
Share,
|
||||||
@@ -1187,9 +1189,9 @@
|
|||||||
showGroupDialog,
|
showGroupDialog,
|
||||||
leaveGroupPrompt,
|
leaveGroupPrompt,
|
||||||
setGroupVisibility,
|
setGroupVisibility,
|
||||||
|
setGroupSubscription,
|
||||||
applyGroupMember,
|
applyGroupMember,
|
||||||
handleGroupMember,
|
handleGroupMember,
|
||||||
handleGroupMemberProps,
|
|
||||||
showGroupMemberModerationDialog
|
showGroupMemberModerationDialog
|
||||||
} = useGroupStore();
|
} = useGroupStore();
|
||||||
|
|
||||||
@@ -1449,21 +1451,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setGroupSubscription(groupId, subscribe) {
|
|
||||||
return groupRequest
|
|
||||||
.setGroupMemberProps(currentUser.value.id, groupId, {
|
|
||||||
isSubscribedToAnnouncements: subscribe
|
|
||||||
})
|
|
||||||
.then((args) => {
|
|
||||||
handleGroupMemberProps(args);
|
|
||||||
ElMessage({
|
|
||||||
message: 'Group subscription updated',
|
|
||||||
type: 'success'
|
|
||||||
});
|
|
||||||
return args;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function blockGroup(groupId) {
|
function blockGroup(groupId) {
|
||||||
ElMessageBox.confirm('Are you sure you want to block this group?', 'Confirm', {
|
ElMessageBox.confirm('Are you sure you want to block this group?', 'Confirm', {
|
||||||
confirmButtonText: 'Confirm',
|
confirmButtonText: 'Confirm',
|
||||||
|
|||||||
@@ -708,9 +708,8 @@
|
|||||||
:disabled="group.privacy !== 'default'"
|
:disabled="group.privacy !== 'default'"
|
||||||
trigger="click"
|
trigger="click"
|
||||||
size="small"
|
size="small"
|
||||||
style="margin-right: 5px"
|
style="margin-right: 5px">
|
||||||
@click.stop>
|
<el-button @click.stop size="small">
|
||||||
<el-button size="small">
|
|
||||||
<span v-if="group.myMember.visibility === 'visible'">{{
|
<span v-if="group.myMember.visibility === 'visible'">{{
|
||||||
t('dialog.group.tags.visible')
|
t('dialog.group.tags.visible')
|
||||||
}}</span>
|
}}</span>
|
||||||
@@ -749,15 +748,20 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<!--//- JSON is missing isSubscribedToAnnouncements, can't be implemented-->
|
<!--//- JSON is missing isSubscribedToAnnouncements, can't be implemented-->
|
||||||
<!--//- el-dropdown(@click.native.stop trigger="click" size="small" style="margin-right:5px")-->
|
<!-- <el-button
|
||||||
<!--//- el-tooltip(placement="top")-->
|
@click.stop="
|
||||||
<!--//- template(#content)-->
|
setGroupSubscription(group.id, !group.myMember.isSubscribedToAnnouncements)
|
||||||
<!--//- span(v-if="group.myMember.isSubscribedToAnnouncements") {{ t('dialog.group.actions.unsubscribe') }}-->
|
"
|
||||||
<!--//- span(v-else) {{ t('dialog.group.actions.subscribe') }}-->
|
size="small">
|
||||||
<!--//- el-button(v-if="group.myMember.isSubscribedToAnnouncements" @click.stop="setGroupSubscription(group.id, false)" circle size="small")-->
|
<span v-if="group.myMember.isSubscribedToAnnouncements"
|
||||||
<!--//- i.el-icon-chat-line-square-->
|
><el-icon style="margin-left: 5px"><MuteNotification /></el-icon>
|
||||||
<!--//- el-button(v-else circle @click.stop="setGroupSubscription(group.id, true)" size="small")-->
|
{{ t('dialog.group.tags.subscribed') }}</span
|
||||||
<!--//- i.el-icon-chat-square(style="color:#f56c6c")-->
|
>
|
||||||
|
<span v-else
|
||||||
|
><el-icon style="margin-left: 5px"><Bell /></el-icon>
|
||||||
|
{{ t('dialog.group.tags.unsubscribed') }}</span
|
||||||
|
>
|
||||||
|
</el-button> -->
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
placement="right"
|
placement="right"
|
||||||
:content="t('dialog.user.groups.leave_group_tooltip')">
|
:content="t('dialog.user.groups.leave_group_tooltip')">
|
||||||
@@ -1339,6 +1343,7 @@
|
|||||||
leaveGroup,
|
leaveGroup,
|
||||||
leaveGroupPrompt,
|
leaveGroupPrompt,
|
||||||
setGroupVisibility,
|
setGroupVisibility,
|
||||||
|
setGroupSubscription,
|
||||||
handleGroupList,
|
handleGroupList,
|
||||||
showModerateGroupDialog
|
showModerateGroupDialog
|
||||||
} = useGroupStore();
|
} = useGroupStore();
|
||||||
|
|||||||
@@ -564,6 +564,21 @@ export const useGroupStore = defineStore('Group', () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setGroupSubscription(groupId, subscribe) {
|
||||||
|
return groupRequest
|
||||||
|
.setGroupMemberProps(userStore.currentUser.id, groupId, {
|
||||||
|
isSubscribedToAnnouncements: subscribe
|
||||||
|
})
|
||||||
|
.then((args) => {
|
||||||
|
handleGroupMemberProps(args);
|
||||||
|
ElMessage({
|
||||||
|
message: 'Group subscription updated',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
return args;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {object} json
|
* @param {object} json
|
||||||
@@ -1070,6 +1085,7 @@ export const useGroupStore = defineStore('Group', () => {
|
|||||||
leaveGroupPrompt,
|
leaveGroupPrompt,
|
||||||
updateGroupPostSearch,
|
updateGroupPostSearch,
|
||||||
setGroupVisibility,
|
setGroupVisibility,
|
||||||
|
setGroupSubscription,
|
||||||
applyGroupMember,
|
applyGroupMember,
|
||||||
loadCurrentUserGroups,
|
loadCurrentUserGroups,
|
||||||
handleGroupPost,
|
handleGroupPost,
|
||||||
|
|||||||
Reference in New Issue
Block a user