From c50a69c30f9df36498430eaca9de95db3fc5ed1a Mon Sep 17 00:00:00 2001 From: Natsumi Date: Sat, 16 Nov 2024 14:10:24 +1300 Subject: [PATCH] Rename hiddenFriendRequest to ignoredFriendRequest --- html/src/app.js | 12 ++++++------ html/src/mixins/tabs/notifications.pug | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index 055e5867..ccda956a 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -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); } diff --git a/html/src/mixins/tabs/notifications.pug b/html/src/mixins/tabs/notifications.pug index 1a2e9ac0..27761b20 100644 --- a/html/src/mixins/tabs/notifications.pug +++ b/html/src/mixins/tabs/notifications.pug @@ -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)")