Merge commit '0231b6d350d6027fa822f286732405b573d634e8' into glitch-soc/merge-upstream
This commit is contained in:
commit
04f4725249
29 files changed
+989
-86
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react-vite';
|
||||
|
||||
import { accountFactoryState, statusFactoryState } from '@/testing/factories';
|
||||
|
||||
import type { StatusQuoteManagerProps } from './status_quoted';
|
||||
import { StatusQuoteManager } from './status_quoted';
|
||||
|
||||
const meta = {
|
||||
title: 'Components/Status/StatusQuoteManager',
|
||||
render(args) {
|
||||
return <StatusQuoteManager {...args} />;
|
||||
},
|
||||
args: {
|
||||
id: '1',
|
||||
},
|
||||
parameters: {
|
||||
state: {
|
||||
accounts: {
|
||||
'1': accountFactoryState({ id: '1', acct: 'hashtaguser' }),
|
||||
},
|
||||
statuses: {
|
||||
'1': statusFactoryState({
|
||||
id: '1',
|
||||
text: 'Hello world!',
|
||||
}),
|
||||
},
|
||||
},
|
||||
},
|
||||
} satisfies Meta<StatusQuoteManagerProps>;
|
||||
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const Default: Story = {};
|
||||
@@ -4,20 +4,19 @@ import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import type { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
import { fetchRelationships } from 'mastodon/actions/accounts';
|
||||
import { revealAccount } from 'mastodon/actions/accounts_typed';
|
||||
import { fetchStatus } from 'mastodon/actions/statuses';
|
||||
import { LearnMoreLink } from 'mastodon/components/learn_more_link';
|
||||
import StatusContainer from 'mastodon/containers/status_container';
|
||||
import { domain } from 'mastodon/initial_state';
|
||||
import type { Account } from 'mastodon/models/account';
|
||||
import type { Status } from 'mastodon/models/status';
|
||||
import { makeGetStatusWithExtraInfo } from 'mastodon/selectors';
|
||||
import { getAccountHidden } from 'mastodon/selectors/accounts';
|
||||
import type { RootState } from 'mastodon/store';
|
||||
import { useAppDispatch, useAppSelector } from 'mastodon/store';
|
||||
|
||||
import { fetchRelationships } from '../actions/accounts';
|
||||
import { revealAccount } from '../actions/accounts_typed';
|
||||
import { fetchStatus } from '../actions/statuses';
|
||||
import { makeGetStatusWithExtraInfo } from '../selectors';
|
||||
import { getAccountHidden } from '../selectors/accounts';
|
||||
|
||||
import { Button } from './button';
|
||||
|
||||
const MAX_QUOTE_POSTS_NESTING_LEVEL = 1;
|
||||
@@ -333,7 +332,7 @@ export const QuotedStatus: React.FC<QuotedStatusProps> = ({
|
||||
);
|
||||
};
|
||||
|
||||
interface StatusQuoteManagerProps {
|
||||
export interface StatusQuoteManagerProps {
|
||||
id: string;
|
||||
contextType?: string;
|
||||
[key: string]: unknown;
|
||||
|
||||
@@ -33,6 +33,7 @@ describe('emojiToUnicodeHex', () => {
|
||||
['⚫', '26AB'],
|
||||
['🖤', '1F5A4'],
|
||||
['💀', '1F480'],
|
||||
['❤️', '2764'], // Checks for trailing variation selector removal.
|
||||
['💂♂️', '1F482-200D-2642-FE0F'],
|
||||
] as const)(
|
||||
'emojiToUnicodeHex converts %s to %s',
|
||||
|
||||
@@ -32,6 +32,12 @@ export function emojiToUnicodeHex(emoji: string): string {
|
||||
codes.push(code);
|
||||
}
|
||||
}
|
||||
|
||||
// Handles how Emojibase removes the variation selector for single code emojis.
|
||||
// See: https://emojibase.dev/docs/spec/#merged-variation-selectors
|
||||
if (codes.at(1) === VARIATION_SELECTOR_CODE && codes.length === 2) {
|
||||
codes.pop();
|
||||
}
|
||||
return hexNumbersToString(codes);
|
||||
}
|
||||
|
||||
|
||||
@@ -114,9 +114,36 @@
|
||||
"alt_text_modal.done": "Valmis",
|
||||
"announcement.announcement": "Teadaanne",
|
||||
"annual_report.announcement.action_build": "Koosta kokkuvõte minu tegevusest Mastodonis",
|
||||
"annual_report.announcement.action_dismiss": "Tänan, ei",
|
||||
"annual_report.announcement.action_view": "Vaata kokkuvõtet minu tegevusest Mastodonis",
|
||||
"annual_report.announcement.description": "Vaata teavet oma suhestumise kohta Mastodonis eelmisel aastal.",
|
||||
"annual_report.announcement.title": "{year}. aasta Mastodoni kokkuvõte on valmis",
|
||||
"annual_report.nav_item.badge": "Uus",
|
||||
"annual_report.shared_page.donate": "Anneta",
|
||||
"annual_report.shared_page.footer": "Loodud {heart} Mastodoni meeskonna poolt",
|
||||
"annual_report.shared_page.footer_server_info": "{username} kasutab {domain}-i, üht paljudest kogukondadest, mis toimivad Mastodonil.",
|
||||
"annual_report.summary.archetype.booster.desc_public": "{name} jätkas postituste otsimist, et neid edendada, tugevdades teisi loojaid täiusliku täpsusega.",
|
||||
"annual_report.summary.archetype.booster.desc_self": "Sa jätkasid postituste otsimist, et neid edendada, tugevdades teisi loojaid täiusliku täpsusega.",
|
||||
"annual_report.summary.archetype.booster.name": "Vibukütt",
|
||||
"annual_report.summary.archetype.die_drei_fragezeichen": "???",
|
||||
"annual_report.summary.archetype.lurker.desc_public": "Me teame, et {name} oli kusagil seal väljas ja nautis Mastodoni oma vaiksel moel.",
|
||||
"annual_report.summary.archetype.lurker.desc_self": "Me teame, et sa olid kusagil seal väljas ja nautisid Mastodoni oma vaiksel moel.",
|
||||
"annual_report.summary.archetype.lurker.name": "Stoiline",
|
||||
"annual_report.summary.archetype.oracle.desc_public": "{name} lõi rohkem uusi postitusi kui vastuseid, hoides Mastodoni värskena ja tulevikku suunatuna.",
|
||||
"annual_report.summary.archetype.oracle.desc_self": "Sa lõid rohkem uusi postitusi kui vastuseid, hoides Mastodoni värskena ja tulevikku suunatuna.",
|
||||
"annual_report.summary.archetype.oracle.name": "Oraakel",
|
||||
"annual_report.summary.archetype.pollster.desc_public": "{name} lõi rohkem küsitlusi kui teisi postituse tüüpe, äratades Mastodonis uudishimu.",
|
||||
"annual_report.summary.archetype.pollster.desc_self": "Sa lõid rohkem küsitlusi kui teisi postituse tüüpe, äratades Mastodonis uudishimu.",
|
||||
"annual_report.summary.archetype.pollster.name": "Uudishimulik",
|
||||
"annual_report.summary.archetype.replier.desc_public": "{name} vastas sageli teiste inimeste postitustele, pakkudes Mastodonile uusi aruteluteemasid.",
|
||||
"annual_report.summary.archetype.replier.desc_self": "Sa vastasid sageli teiste inimeste postitustele, pakkudes Mastodonile uusi aruteluteemasid.",
|
||||
"annual_report.summary.archetype.replier.name": "Liblikas",
|
||||
"annual_report.summary.archetype.reveal": "Näita mu põhitüüpi",
|
||||
"annual_report.summary.archetype.reveal_description": "Täname, et oled Mastodoni liige! Aeg on välja selgitada, millist põhitüüpi sa {year}. kehastasid.",
|
||||
"annual_report.summary.archetype.title_public": "Kasutaja {name} põhitüüp",
|
||||
"annual_report.summary.archetype.title_self": "Sinu põhitüüp",
|
||||
"annual_report.summary.close": "Sule",
|
||||
"annual_report.summary.copy_link": "Kopeeri link",
|
||||
"annual_report.summary.highlighted_post.title": "Kõige populaarsemad postitused",
|
||||
"annual_report.summary.most_used_app.most_used_app": "enim kasutatud äpp",
|
||||
"annual_report.summary.most_used_hashtag.most_used_hashtag": "enim kasutatud teemaviide",
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
"annual_report.nav_item.badge": "חדש",
|
||||
"annual_report.shared_page.donate": "לתרומה",
|
||||
"annual_report.shared_page.footer": "נוצר עם כל ה-{heart} על ידי צוות מסטודון",
|
||||
"annual_report.shared_page.footer_server_info": "{username} משתמש.ת ב־{domain}, שרת אחד מבין קהילות רבות שבנויות על מסטודון.",
|
||||
"annual_report.summary.archetype.booster.desc_public": "{name} צדו הודעות מעניינות להדהד, והגבירו קולותיהם של יוצרים אחרים בדיוק של חתול המזנק על הטרף.",
|
||||
"annual_report.summary.archetype.booster.desc_self": "צדת הודעות מעניינות להדהד, והגברת קולותיהם של יוצרים אחרים בדיוק של חתול המזנק על הטרף.",
|
||||
"annual_report.summary.archetype.booster.name": "החתול הצייד",
|
||||
@@ -440,6 +441,8 @@
|
||||
"follow_suggestions.who_to_follow": "אחרי מי לעקוב",
|
||||
"followed_tags": "התגיות שהחשבון שלך עוקב אחריהן",
|
||||
"footer.about": "אודות",
|
||||
"footer.about_mastodon": "אודות מסטודון",
|
||||
"footer.about_server": "אודות {domain}",
|
||||
"footer.about_this_server": "אודות",
|
||||
"footer.directory": "ספריית פרופילים",
|
||||
"footer.get_app": "להתקנת היישומון",
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
"annual_report.nav_item.badge": "新",
|
||||
"annual_report.shared_page.donate": "捐助",
|
||||
"annual_report.shared_page.footer": "由 Mastodon 团队用 {heart} 生成",
|
||||
"annual_report.shared_page.footer_server_info": "{username} 使用 {domain},运行 Mastodon 的众多社区之一。",
|
||||
"annual_report.summary.archetype.booster.desc_public": "{name}持续寻找值得转嘟的嘟文,以精准眼光放大其他创作者的影响力。",
|
||||
"annual_report.summary.archetype.booster.desc_self": "你持续寻找值得转嘟的嘟文,以精准眼光放大其他创作者的影响力。",
|
||||
"annual_report.summary.archetype.booster.name": "转发游侠",
|
||||
@@ -440,6 +441,8 @@
|
||||
"follow_suggestions.who_to_follow": "推荐关注",
|
||||
"followed_tags": "已关注话题",
|
||||
"footer.about": "关于",
|
||||
"footer.about_mastodon": "关于 Mastodon",
|
||||
"footer.about_server": "关于 {domain}",
|
||||
"footer.about_this_server": "关于本站",
|
||||
"footer.directory": "用户列表",
|
||||
"footer.get_app": "获取应用",
|
||||
|
||||
@@ -164,6 +164,7 @@ $content-width: 840px;
|
||||
width: 100%;
|
||||
max-width: $content-width;
|
||||
flex: 1 1 auto;
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
@media screen and (max-width: ($content-width + $sidebar-width)) {
|
||||
|
||||
@@ -76,7 +76,7 @@ export const statusFactory: FactoryFunction<ApiStatusJSON> = ({
|
||||
mentions: [],
|
||||
tags: [],
|
||||
emojis: [],
|
||||
contentHtml: '<p>This is a test status.</p>',
|
||||
contentHtml: data.text ?? '<p>This is a test status.</p>',
|
||||
...data,
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user