Rename hiddenFriendRequest to ignoredFriendRequest

This commit is contained in:
Natsumi
2024-11-16 14:10:24 +13:00
parent f56f1b8a83
commit c50a69c30f
2 changed files with 8 additions and 8 deletions

View File

@@ -1857,7 +1857,7 @@ speechSynthesis.getVoices();
API.$on('NOTIFICATION:LIST:HIDDEN', function (args) {
for (var json of args.json) {
json.type = 'hiddenFriendRequest';
json.type = 'ignoredFriendRequest';
this.$emit('NOTIFICATION', {
json,
params: {
@@ -1907,7 +1907,7 @@ speechSynthesis.getVoices();
args.ref = ref;
if (
ref.type === 'friendRequest' ||
ref.type === 'hiddenFriendRequest' ||
ref.type === 'ignoredFriendRequest' ||
ref.type.includes('.')
) {
for (var i = array.length - 1; i >= 0; i--) {
@@ -1975,7 +1975,7 @@ speechSynthesis.getVoices();
for (var i = array.length - 1; i >= 0; i--) {
if (
array[i].type === 'friendRequest' ||
array[i].type === 'hiddenFriendRequest' ||
array[i].type === 'ignoredFriendRequest' ||
array[i].type.includes('.')
) {
array.splice(i, 1);
@@ -7380,7 +7380,7 @@ speechSynthesis.getVoices();
if (ref.senderUserId !== this.currentUser.id) {
if (
ref.type !== 'friendRequest' &&
ref.type !== 'hiddenFriendRequest' &&
ref.type !== 'ignoredFriendRequest' &&
!ref.type.includes('.')
) {
database.addNotificationToDatabase(ref);
@@ -7431,7 +7431,7 @@ speechSynthesis.getVoices();
type: 'info',
callback: (action) => {
if (action === 'confirm') {
if (row.type === 'hiddenFriendRequest') {
if (row.type === 'ignoredFriendRequest') {
API.deleteHiddenFriendRequest(
{
notificationId: row.id
@@ -7458,7 +7458,7 @@ speechSynthesis.getVoices();
$app.removeFromArray(this.notificationTable.data, row);
if (
row.type !== 'friendRequest' &&
row.type !== 'hiddenFriendRequest'
row.type !== 'ignoredFriendRequest'
) {
database.deleteNotification(row.id);
}

View File

@@ -4,7 +4,7 @@ mixin notificationsTab()
template(#tool)
div(style="margin:0 0 10px;display:flex;align-items:center")
el-select(v-model="notificationTable.filters[0].value" @change="saveTableFilters" multiple clearable collapse-tags style="flex:1" :placeholder="$t('view.notification.filter_placeholder')")
el-option(v-once v-for="type in ['requestInvite', 'invite', 'requestInviteResponse', 'inviteResponse', 'friendRequest', 'hiddenFriendRequest', 'message', 'boop', 'groupChange', 'group.announcement', 'group.informative', 'group.invite', 'group.joinRequest', 'group.transfer', 'group.queueReady', 'moderation.warning.group', 'instance.closed']" :key="type" :label="type" :value="type")
el-option(v-once v-for="type in ['requestInvite', 'invite', 'requestInviteResponse', 'inviteResponse', 'friendRequest', 'ignoredFriendRequest', 'message', 'boop', 'groupChange', 'group.announcement', 'group.informative', 'group.invite', 'group.joinRequest', 'group.transfer', 'group.queueReady', 'moderation.warning.group', 'instance.closed']" :key="type" :label="type" :value="type")
el-input(v-model="notificationTable.filters[1].value" :placeholder="$t('view.notification.search_placeholder')" style="flex:none;width:150px;margin:0 10px")
el-tooltip(placement="bottom" :content="$t('view.notification.refresh_tooltip')" :disabled="hideTooltips")
el-button(type="default" :loading="API.isNotificationsLoading" @click="API.refreshNotifications()" icon="el-icon-refresh" circle style="flex:none")
@@ -88,6 +88,6 @@ mixin notificationsTab()
template(v-if="scope.row.type === 'group.queueReady'")
el-tooltip(placement="top" content="Delete log" :disabled="hideTooltips")
el-button(type="text" icon="el-icon-delete" size="mini" style="margin-left:5px" @click="deleteNotificationLog(scope.row)")
template(v-if="scope.row.type !== 'friendRequest' && scope.row.type !== 'hiddenFriendRequest' && !scope.row.type.includes('group.') && !scope.row.type.includes('moderation.')")
template(v-if="scope.row.type !== 'friendRequest' && scope.row.type !== 'ignoredFriendRequest' && !scope.row.type.includes('group.') && !scope.row.type.includes('moderation.')")
el-tooltip(placement="top" content="Delete log" :disabled="hideTooltips")
el-button(type="text" icon="el-icon-delete" size="mini" style="margin-left:5px" @click="deleteNotificationLog(scope.row)")