mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Compare commits
5 commits
a2115e145f
...
e1c63adfa2
Author | SHA1 | Date | |
---|---|---|---|
|
e1c63adfa2 | ||
|
a50c8e951f | ||
|
2c1e75727d | ||
|
3a365176aa | ||
|
d92b3e4468 |
14 changed files with 22 additions and 41 deletions
|
@ -60,7 +60,7 @@ export interface BaseNotificationGroupJSON {
|
||||||
|
|
||||||
interface NotificationGroupWithStatusJSON extends BaseNotificationGroupJSON {
|
interface NotificationGroupWithStatusJSON extends BaseNotificationGroupJSON {
|
||||||
type: NotificationWithStatusType;
|
type: NotificationWithStatusType;
|
||||||
status: ApiStatusJSON;
|
status_id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface NotificationWithStatusJSON extends BaseNotificationJSON {
|
interface NotificationWithStatusJSON extends BaseNotificationJSON {
|
||||||
|
|
|
@ -49,22 +49,15 @@ export const FilteredNotificationsBanner: React.FC = () => {
|
||||||
<span>
|
<span>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='filtered_notifications_banner.pending_requests'
|
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 }}
|
values={{ count: policy.summary.pending_requests_count }}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='filtered-notifications-banner__badge'>
|
<div className='filtered-notifications-banner__badge'>
|
||||||
<div className='filtered-notifications-banner__badge__badge'>
|
|
||||||
{toCappedNumber(policy.summary.pending_notifications_count)}
|
{toCappedNumber(policy.summary.pending_notifications_count)}
|
||||||
</div>
|
</div>
|
||||||
<FormattedMessage
|
|
||||||
id='filtered_notifications_banner.mentions'
|
|
||||||
defaultMessage='{count, plural, one {mention} other {mentions}}'
|
|
||||||
values={{ count: policy.summary.pending_notifications_count }}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -300,8 +300,7 @@
|
||||||
"filter_modal.select_filter.subtitle": "Use an existing category or create a new one",
|
"filter_modal.select_filter.subtitle": "Use an existing category or create a new one",
|
||||||
"filter_modal.select_filter.title": "Filter this post",
|
"filter_modal.select_filter.title": "Filter this post",
|
||||||
"filter_modal.title.status": "Filter a post",
|
"filter_modal.title.status": "Filter a post",
|
||||||
"filtered_notifications_banner.mentions": "{count, plural, one {mention} other {mentions}}",
|
"filtered_notifications_banner.pending_requests": "From {count, plural, =0 {no one} one {one person} other {# people}} you may know",
|
||||||
"filtered_notifications_banner.pending_requests": "Notifications from {count, plural, =0 {no one} one {one person} other {# people}} you may know",
|
|
||||||
"filtered_notifications_banner.title": "Filtered notifications",
|
"filtered_notifications_banner.title": "Filtered notifications",
|
||||||
"firehose.all": "All",
|
"firehose.all": "All",
|
||||||
"firehose.local": "This server",
|
"firehose.local": "This server",
|
||||||
|
|
|
@ -124,9 +124,9 @@ export function createNotificationGroupFromJSON(
|
||||||
case 'mention':
|
case 'mention':
|
||||||
case 'poll':
|
case 'poll':
|
||||||
case 'update': {
|
case 'update': {
|
||||||
const { status, ...groupWithoutStatus } = group;
|
const { status_id: statusId, ...groupWithoutStatus } = group;
|
||||||
return {
|
return {
|
||||||
statusId: status.id,
|
statusId,
|
||||||
sampleAccountIds,
|
sampleAccountIds,
|
||||||
...groupWithoutStatus,
|
...groupWithoutStatus,
|
||||||
};
|
};
|
||||||
|
|
|
@ -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 {
|
&__badge {
|
||||||
background: $ui-button-background-color;
|
background: $ui-button-background-color;
|
||||||
color: $white;
|
color: $white;
|
||||||
|
@ -10191,7 +10177,6 @@ noscript {
|
||||||
padding: 2px 8px;
|
padding: 2px 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.notification-request {
|
.notification-request {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -2,3 +2,7 @@ inherit_from: ../../.rubocop.yml
|
||||||
|
|
||||||
Naming/VariableNumber:
|
Naming/VariableNumber:
|
||||||
CheckSymbols: false
|
CheckSymbols: false
|
||||||
|
|
||||||
|
Rails/CreateTableWithTimestamps:
|
||||||
|
Include:
|
||||||
|
- '*.rb'
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
class CreateConversationMutes < ActiveRecord::Migration[5.0]
|
class CreateConversationMutes < ActiveRecord::Migration[5.0]
|
||||||
def change
|
def change
|
||||||
create_table :conversation_mutes do |t|
|
create_table :conversation_mutes do |t| # rubocop:disable Rails/CreateTableWithTimestamps
|
||||||
t.integer :account_id, null: false
|
t.integer :account_id, null: false
|
||||||
t.bigint :conversation_id, null: false
|
t.bigint :conversation_id, null: false
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
class CreateStatusPins < ActiveRecord::Migration[5.1]
|
class CreateStatusPins < ActiveRecord::Migration[5.1]
|
||||||
def change
|
def change
|
||||||
create_table :status_pins do |t|
|
create_table :status_pins do |t| # rubocop:disable Rails/CreateTableWithTimestamps
|
||||||
t.belongs_to :account, foreign_key: { on_delete: :cascade }, null: false
|
t.belongs_to :account, foreign_key: { on_delete: :cascade }, null: false
|
||||||
t.belongs_to :status, foreign_key: { on_delete: :cascade }, null: false
|
t.belongs_to :status, foreign_key: { on_delete: :cascade }, null: false
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
class CreateListAccounts < ActiveRecord::Migration[5.2]
|
class CreateListAccounts < ActiveRecord::Migration[5.2]
|
||||||
def change
|
def change
|
||||||
create_table :list_accounts do |t|
|
create_table :list_accounts do |t| # rubocop:disable Rails/CreateTableWithTimestamps
|
||||||
t.belongs_to :list, foreign_key: { on_delete: :cascade }, null: false
|
t.belongs_to :list, foreign_key: { on_delete: :cascade }, null: false
|
||||||
t.belongs_to :account, foreign_key: { on_delete: :cascade }, null: false
|
t.belongs_to :account, foreign_key: { on_delete: :cascade }, null: false
|
||||||
t.belongs_to :follow, foreign_key: { on_delete: :cascade }, null: false
|
t.belongs_to :follow, foreign_key: { on_delete: :cascade }, null: false
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
class CreateAccountConversations < ActiveRecord::Migration[5.2]
|
class CreateAccountConversations < ActiveRecord::Migration[5.2]
|
||||||
def change
|
def change
|
||||||
create_table :account_conversations do |t|
|
create_table :account_conversations do |t| # rubocop:disable Rails/CreateTableWithTimestamps
|
||||||
t.belongs_to :account, foreign_key: { on_delete: :cascade }
|
t.belongs_to :account, foreign_key: { on_delete: :cascade }
|
||||||
t.belongs_to :conversation, foreign_key: { on_delete: :cascade }
|
t.belongs_to :conversation, foreign_key: { on_delete: :cascade }
|
||||||
t.bigint :participant_account_ids, array: true, null: false, default: []
|
t.bigint :participant_account_ids, array: true, null: false, default: []
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
class CreatePgheroSpaceStats < ActiveRecord::Migration[5.2]
|
class CreatePgheroSpaceStats < ActiveRecord::Migration[5.2]
|
||||||
def change
|
def change
|
||||||
create_table :pghero_space_stats do |t|
|
create_table :pghero_space_stats do |t| # rubocop:disable Rails/CreateTableWithTimestamps
|
||||||
t.text :database
|
t.text :database
|
||||||
t.text :schema
|
t.text :schema
|
||||||
t.text :relation
|
t.text :relation
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
class CreateScheduledStatuses < ActiveRecord::Migration[5.2]
|
class CreateScheduledStatuses < ActiveRecord::Migration[5.2]
|
||||||
def change
|
def change
|
||||||
create_table :scheduled_statuses do |t|
|
create_table :scheduled_statuses do |t| # rubocop:disable Rails/CreateTableWithTimestamps
|
||||||
t.belongs_to :account, foreign_key: { on_delete: :cascade }
|
t.belongs_to :account, foreign_key: { on_delete: :cascade }
|
||||||
t.datetime :scheduled_at, index: true
|
t.datetime :scheduled_at, index: true
|
||||||
t.jsonb :params
|
t.jsonb :params
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
class CreateStatusTrends < ActiveRecord::Migration[6.1]
|
class CreateStatusTrends < ActiveRecord::Migration[6.1]
|
||||||
def change
|
def change
|
||||||
create_table :status_trends do |t|
|
create_table :status_trends do |t| # rubocop:disable Rails/CreateTableWithTimestamps
|
||||||
t.references :status, null: false, foreign_key: { on_delete: :cascade }, index: { unique: true }
|
t.references :status, null: false, foreign_key: { on_delete: :cascade }, index: { unique: true }
|
||||||
t.references :account, null: false, foreign_key: { on_delete: :cascade }
|
t.references :account, null: false, foreign_key: { on_delete: :cascade }
|
||||||
t.float :score, null: false, default: 0
|
t.float :score, null: false, default: 0
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
class CreatePreviewCardTrends < ActiveRecord::Migration[6.1]
|
class CreatePreviewCardTrends < ActiveRecord::Migration[6.1]
|
||||||
def change
|
def change
|
||||||
create_table :preview_card_trends do |t|
|
create_table :preview_card_trends do |t| # rubocop:disable Rails/CreateTableWithTimestamps
|
||||||
t.references :preview_card, null: false, foreign_key: { on_delete: :cascade }, index: { unique: true }
|
t.references :preview_card, null: false, foreign_key: { on_delete: :cascade }, index: { unique: true }
|
||||||
t.float :score, null: false, default: 0
|
t.float :score, null: false, default: 0
|
||||||
t.integer :rank, null: false, default: 0
|
t.integer :rank, null: false, default: 0
|
||||||
|
|
Loading…
Reference in a new issue