1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Compare commits

...

4 commits

11 changed files with 21 additions and 44 deletions

View file

@ -60,7 +60,7 @@ export interface BaseNotificationGroupJSON {
interface NotificationGroupWithStatusJSON extends BaseNotificationGroupJSON {
type: NotificationWithStatusType;
status: ApiStatusJSON;
status_id: string;
}
interface NotificationWithStatusJSON extends BaseNotificationJSON {

View file

@ -49,22 +49,15 @@ export const FilteredNotificationsBanner: React.FC = () => {
<span>
<FormattedMessage
id='filtered_notifications_banner.pending_requests'
defaultMessage='Notifications from {count, plural, =0 {no one} one {one person} other {# people}} you may know'
defaultMessage='From {count, plural, =0 {no one} one {one person} other {# people}} you may know'
values={{ count: policy.summary.pending_requests_count }}
/>
</span>
</div>
<div className='filtered-notifications-banner__badge'>
<div className='filtered-notifications-banner__badge__badge'>
{toCappedNumber(policy.summary.pending_notifications_count)}
</div>
<FormattedMessage
id='filtered_notifications_banner.mentions'
defaultMessage='{count, plural, one {mention} other {mentions}}'
values={{ count: policy.summary.pending_notifications_count }}
/>
</div>
</Link>
);
};

View file

@ -300,8 +300,7 @@
"filter_modal.select_filter.subtitle": "Use an existing category or create a new one",
"filter_modal.select_filter.title": "Filter this post",
"filter_modal.title.status": "Filter a post",
"filtered_notifications_banner.mentions": "{count, plural, one {mention} other {mentions}}",
"filtered_notifications_banner.pending_requests": "Notifications from {count, plural, =0 {no one} one {one person} other {# people}} you may know",
"filtered_notifications_banner.pending_requests": "From {count, plural, =0 {no one} one {one person} other {# people}} you may know",
"filtered_notifications_banner.title": "Filtered notifications",
"firehose.all": "All",
"firehose.local": "This server",

View file

@ -124,9 +124,9 @@ export function createNotificationGroupFromJSON(
case 'mention':
case 'poll':
case 'update': {
const { status, ...groupWithoutStatus } = group;
const { status_id: statusId, ...groupWithoutStatus } = group;
return {
statusId: status.id,
statusId,
sampleAccountIds,
...groupWithoutStatus,
};

View file

@ -10170,20 +10170,6 @@ noscript {
}
}
&__badge {
display: flex;
align-items: center;
border-radius: 999px;
background: var(--background-border-color);
color: $darker-text-color;
padding: 4px;
padding-inline-end: 8px;
gap: 6px;
font-weight: 500;
font-size: 11px;
line-height: 16px;
word-break: keep-all;
&__badge {
background: $ui-button-background-color;
color: $white;
@ -10191,7 +10177,6 @@ noscript {
padding: 2px 8px;
}
}
}
.notification-request {
display: flex;

View file

@ -2,8 +2,8 @@
class RemoveUnneededIndexes < ActiveRecord::Migration[5.0]
def change
remove_index :notifications, name: 'index_notifications_on_account_id'
remove_index :settings, name: 'index_settings_on_target_type_and_target_id'
remove_index :statuses_tags, name: 'index_statuses_tags_on_tag_id'
remove_index :notifications, :account_id, name: 'index_notifications_on_account_id'
remove_index :settings, [:target_type, :target_id], name: 'index_settings_on_target_type_and_target_id'
remove_index :statuses_tags, :tag_id, name: 'index_statuses_tags_on_tag_id'
end
end

View file

@ -5,6 +5,6 @@ class AddIndexOnStreamEntries < ActiveRecord::Migration[5.2]
def change
add_index :stream_entries, [:account_id, :activity_type, :id], algorithm: :concurrently
remove_index :stream_entries, name: :index_stream_entries_on_account_id
remove_index :stream_entries, :account_id, name: :index_stream_entries_on_account_id
end
end

View file

@ -2,7 +2,7 @@
class RemoveDuplicateIndexesInLists < ActiveRecord::Migration[5.2]
def change
remove_index :list_accounts, name: 'index_list_accounts_on_account_id'
remove_index :list_accounts, name: 'index_list_accounts_on_list_id'
remove_index :list_accounts, :account_id, name: 'index_list_accounts_on_account_id'
remove_index :list_accounts, :list_id, name: 'index_list_accounts_on_list_id'
end
end

View file

@ -5,6 +5,6 @@ class MoreFasterIndexOnNotifications < ActiveRecord::Migration[5.2]
def change
add_index :notifications, [:account_id, :id], order: { id: :desc }, algorithm: :concurrently
remove_index :notifications, name: :index_notifications_on_id_and_account_id_and_activity_type
remove_index :notifications, [:id, :account_id, :activity_type], name: :index_notifications_on_id_and_account_id_and_activity_type
end
end

View file

@ -7,6 +7,6 @@ class AddIndexOnStatusesForApiV1AccountsAccountIdStatuses < ActiveRecord::Migrat
safety_assured do
add_index :statuses, [:account_id, :id, :visibility, :updated_at], order: { id: :desc }, algorithm: :concurrently, name: :index_statuses_20180106
end
remove_index :statuses, name: :index_statuses_on_account_id_id
remove_index :statuses, [:account_id, :id], name: :index_statuses_on_account_id_id
end
end

View file

@ -2,8 +2,8 @@
class RemoveUnusedIndexes < ActiveRecord::Migration[5.2]
def change
remove_index :statuses, name: 'index_statuses_on_conversation_id'
remove_index :users, name: 'index_users_on_filtered_languages'
remove_index :backups, name: 'index_backups_on_user_id'
remove_index :statuses, :conversation_id, name: 'index_statuses_on_conversation_id'
remove_index :users, :filtered_languages, name: 'index_users_on_filtered_languages'
remove_index :backups, :user_id, name: 'index_backups_on_user_id'
end
end