Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
mastodon
Commits
83b21e90
Commit
83b21e90
authored
3 years ago
by
Yamagishi Kazutoshi
Committed by
GitHub
2 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Bump React from 16.14.0 to 18.1.0
parent
f804c009
Changes
226
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
app/javascript/mastodon/components/status_action_bar.js
+0
-1
app/javascript/mastodon/components/status_action_bar.js
app/javascript/mastodon/components/status_content.js
+2
-2
app/javascript/mastodon/components/status_content.js
app/javascript/mastodon/components/status_list.js
+0
-1
app/javascript/mastodon/components/status_list.js
app/javascript/mastodon/components/timeline_hint.js
+0
-1
app/javascript/mastodon/components/timeline_hint.js
app/javascript/mastodon/containers/account_container.js
+0
-1
app/javascript/mastodon/containers/account_container.js
app/javascript/mastodon/containers/admin_component.js
+2
-2
app/javascript/mastodon/containers/admin_component.js
app/javascript/mastodon/containers/compose_container.js
+2
-2
app/javascript/mastodon/containers/compose_container.js
app/javascript/mastodon/containers/domain_container.js
+0
-1
app/javascript/mastodon/containers/domain_container.js
app/javascript/mastodon/containers/mastodon.js
+2
-2
app/javascript/mastodon/containers/mastodon.js
app/javascript/mastodon/containers/media_container.js
+5
-5
app/javascript/mastodon/containers/media_container.js
app/javascript/mastodon/containers/status_container.js
+0
-1
app/javascript/mastodon/containers/status_container.js
app/javascript/mastodon/containers/timeline_container.js
+6
-6
app/javascript/mastodon/containers/timeline_container.js
app/javascript/mastodon/features/account/components/account_note.js
+5
-5
...ript/mastodon/features/account/components/account_note.js
app/javascript/mastodon/features/account/components/header.js
+2
-3
...javascript/mastodon/features/account/components/header.js
app/javascript/mastodon/features/account_gallery/components/media_item.js
+0
-1
...astodon/features/account_gallery/components/media_item.js
app/javascript/mastodon/features/account_gallery/index.js
+0
-1
app/javascript/mastodon/features/account_gallery/index.js
app/javascript/mastodon/features/account_timeline/components/header.js
+0
-1
...t/mastodon/features/account_timeline/components/header.js
app/javascript/mastodon/features/account_timeline/components/limited_account_hint.js
+2
-2
...tures/account_timeline/components/limited_account_hint.js
app/javascript/mastodon/features/account_timeline/components/moved_note.js
+0
-1
...stodon/features/account_timeline/components/moved_note.js
app/javascript/mastodon/features/account_timeline/containers/header_container.js
+0
-1
.../features/account_timeline/containers/header_container.js
with
28 additions
and
40 deletions
+28
-40
app/javascript/mastodon/components/status_action_bar.js
+
0
-
1
View file @
83b21e90
import
React
from
'
react
'
;
import
ImmutablePropTypes
from
'
react-immutable-proptypes
'
;
import
{
connect
}
from
'
react-redux
'
;
import
PropTypes
from
'
prop-types
'
;
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/components/status_content.js
+
2
-
2
View file @
83b21e90
import
React
from
'
react
'
;
import
{
PureComponent
}
from
'
react
'
;
import
ImmutablePropTypes
from
'
react-immutable-proptypes
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
FormattedMessage
}
from
'
react-intl
'
;
...
...
@@ -10,7 +10,7 @@ import { autoPlayGif } from 'mastodon/initial_state';
const
MAX_HEIGHT
=
642
;
// 20px * 32 (+ 2px padding at the top)
export
default
class
StatusContent
extends
React
.
PureComponent
{
export
default
class
StatusContent
extends
PureComponent
{
static
contextTypes
=
{
router
:
PropTypes
.
object
,
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/components/status_list.js
+
0
-
1
View file @
83b21e90
import
{
debounce
}
from
'
lodash
'
;
import
React
from
'
react
'
;
import
ImmutablePropTypes
from
'
react-immutable-proptypes
'
;
import
PropTypes
from
'
prop-types
'
;
import
StatusContainer
from
'
../containers/status_container
'
;
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/components/timeline_hint.js
+
0
-
1
View file @
83b21e90
import
React
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
FormattedMessage
}
from
'
react-intl
'
;
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/containers/account_container.js
+
0
-
1
View file @
83b21e90
import
React
from
'
react
'
;
import
{
connect
}
from
'
react-redux
'
;
import
{
defineMessages
,
injectIntl
,
FormattedMessage
}
from
'
react-intl
'
;
import
{
makeGetAccount
}
from
'
../selectors
'
;
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/containers/admin_component.js
+
2
-
2
View file @
83b21e90
import
React
from
'
react
'
;
import
{
PureComponent
}
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
IntlProvider
,
addLocaleData
}
from
'
react-intl
'
;
import
{
getLocale
}
from
'
../locales
'
;
...
...
@@ -6,7 +6,7 @@ import { getLocale } from '../locales';
const
{
localeData
,
messages
}
=
getLocale
();
addLocaleData
(
localeData
);
export
default
class
AdminComponent
extends
React
.
PureComponent
{
export
default
class
AdminComponent
extends
PureComponent
{
static
propTypes
=
{
locale
:
PropTypes
.
string
.
isRequired
,
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/containers/compose_container.js
+
2
-
2
View file @
83b21e90
import
React
from
'
react
'
;
import
{
PureComponent
}
from
'
react
'
;
import
{
Provider
}
from
'
react-redux
'
;
import
PropTypes
from
'
prop-types
'
;
import
configureStore
from
'
../store/configureStore
'
;
...
...
@@ -20,7 +20,7 @@ if (initialState) {
store
.
dispatch
(
fetchCustomEmojis
());
export
default
class
TimelineContainer
extends
React
.
PureComponent
{
export
default
class
TimelineContainer
extends
PureComponent
{
static
propTypes
=
{
locale
:
PropTypes
.
string
.
isRequired
,
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/containers/domain_container.js
+
0
-
1
View file @
83b21e90
import
React
from
'
react
'
;
import
{
connect
}
from
'
react-redux
'
;
import
{
blockDomain
,
unblockDomain
}
from
'
../actions/domain_blocks
'
;
import
{
defineMessages
,
injectIntl
,
FormattedMessage
}
from
'
react-intl
'
;
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/containers/mastodon.js
+
2
-
2
View file @
83b21e90
import
React
from
'
react
'
;
import
{
PureComponent
}
from
'
react
'
;
import
{
Provider
}
from
'
react-redux
'
;
import
PropTypes
from
'
prop-types
'
;
import
configureStore
from
'
../store/configureStore
'
;
...
...
@@ -28,7 +28,7 @@ const createIdentityContext = state => ({
accessToken
:
state
.
meta
.
access_token
,
});
export
default
class
Mastodon
extends
React
.
PureComponent
{
export
default
class
Mastodon
extends
PureComponent
{
static
propTypes
=
{
locale
:
PropTypes
.
string
.
isRequired
,
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/containers/media_container.js
+
5
-
5
View file @
83b21e90
import
React
,
{
PureComponent
,
Fragment
}
from
'
react
'
;
import
ReactDOM
from
'
react-dom
'
;
import
{
PureComponent
}
from
'
react
'
;
import
{
createPortal
}
from
'
react-dom
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
IntlProvider
,
addLocaleData
}
from
'
react-intl
'
;
import
{
fromJS
}
from
'
immutable
'
;
...
...
@@ -74,7 +74,7 @@ export default class MediaContainer extends PureComponent {
return
(
<
IntlProvider
locale
=
{
locale
}
messages
=
{
messages
}
>
<
Fragment
>
<>
{[].
map
.
call
(
components
,
(
component
,
i
)
=>
{
const
componentName
=
component
.
getAttribute
(
'
data-component
'
);
const
Component
=
MEDIA_COMPONENTS
[
componentName
];
...
...
@@ -94,7 +94,7 @@ export default class MediaContainer extends PureComponent {
}),
});
return
ReactDOM
.
createPortal
(
return
createPortal
(
<
Component
{...
props
}
key
=
{
`media-
${
i
}
`
}
/>
,
component
,
);
...
...
@@ -113,7 +113,7 @@ export default class MediaContainer extends PureComponent {
/
>
)}
<
/ModalRoot
>
<
/
Fragment
>
<
/
>
<
/IntlProvider
>
);
}
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/containers/status_container.js
+
0
-
1
View file @
83b21e90
import
React
from
'
react
'
;
import
{
connect
}
from
'
react-redux
'
;
import
Status
from
'
../components/status
'
;
import
{
makeGetStatus
,
makeGetPictureInPicture
}
from
'
../selectors
'
;
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/containers/timeline_container.js
+
6
-
6
View file @
83b21e90
import
React
,
{
Fragm
ent
}
from
'
react
'
;
import
ReactDOM
from
'
react-dom
'
;
import
{
PureCompon
ent
}
from
'
react
'
;
import
{
createPortal
}
from
'
react-dom
'
;
import
{
Provider
}
from
'
react-redux
'
;
import
PropTypes
from
'
prop-types
'
;
import
configureStore
from
'
../store/configureStore
'
;
...
...
@@ -20,7 +20,7 @@ if (initialState) {
store
.
dispatch
(
hydrateStore
(
initialState
));
}
export
default
class
TimelineContainer
extends
React
.
PureComponent
{
export
default
class
TimelineContainer
extends
PureComponent
{
static
propTypes
=
{
locale
:
PropTypes
.
string
.
isRequired
,
...
...
@@ -46,14 +46,14 @@ export default class TimelineContainer extends React.PureComponent {
return
(
<
IntlProvider
locale
=
{
locale
}
messages
=
{
messages
}
>
<
Provider
store
=
{
store
}
>
<
Fragment
>
<>
{
timeline
}
{
ReactDOM
.
createPortal
(
{
createPortal
(
<
ModalContainer
/>
,
document
.
getElementById
(
'
modal-container
'
),
)}
<
/
Fragment
>
<
/
>
<
/Provider
>
<
/IntlProvider
>
);
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/account/components/account_note.js
+
5
-
5
View file @
83b21e90
import
React
from
'
react
'
;
import
{
PureComponent
}
from
'
react
'
;
import
ImmutablePropTypes
from
'
react-immutable-proptypes
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
defineMessages
,
injectIntl
,
FormattedMessage
}
from
'
react-intl
'
;
...
...
@@ -10,7 +10,7 @@ const messages = defineMessages({
placeholder
:
{
id
:
'
account_note.placeholder
'
,
defaultMessage
:
'
Click to add a note
'
},
});
class
InlineAlert
extends
React
.
PureComponent
{
class
InlineAlert
extends
PureComponent
{
static
propTypes
=
{
show
:
PropTypes
.
bool
,
...
...
@@ -22,7 +22,7 @@ class InlineAlert extends React.PureComponent {
static
TRANSITION_DELAY
=
200
;
componentWillReceiveProps
(
nextProps
)
{
UNSAFE_
componentWillReceiveProps
(
nextProps
)
{
if
(
!
this
.
props
.
show
&&
nextProps
.
show
)
{
this
.
setState
({
mountMessage
:
true
});
}
else
if
(
this
.
props
.
show
&&
!
nextProps
.
show
)
{
...
...
@@ -59,11 +59,11 @@ class AccountNote extends ImmutablePureComponent {
saved
:
false
,
};
componentWillMount
()
{
UNSAFE_
componentWillMount
()
{
this
.
_reset
();
}
componentWillReceiveProps
(
nextProps
)
{
UNSAFE_
componentWillReceiveProps
(
nextProps
)
{
const
accountWillChange
=
!
is
(
this
.
props
.
account
,
nextProps
.
account
);
const
newState
=
{};
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/account/components/header.js
+
2
-
3
View file @
83b21e90
import
React
from
'
react
'
;
import
ImmutablePropTypes
from
'
react-immutable-proptypes
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
defineMessages
,
injectIntl
,
FormattedMessage
}
from
'
react-intl
'
;
...
...
@@ -282,10 +281,10 @@ class Header extends ImmutablePureComponent {
{
!
suspended
&&
(
<
div
className
=
'
account__header__tabs__buttons
'
>
{
!
hidden
&&
(
<
React
.
Fragment
>
<>
{
actionBtn
}
{
bellBtn
}
<
/
React.Fragment
>
<
/
>
)}
<
DropdownMenuContainer
items
=
{
menu
}
icon
=
'
ellipsis-v
'
size
=
{
24
}
direction
=
'
right
'
/>
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/account_gallery/components/media_item.js
+
0
-
1
View file @
83b21e90
...
...
@@ -4,7 +4,6 @@ import Icon from 'mastodon/components/icon';
import
{
autoPlayGif
,
displayMedia
,
useBlurhash
}
from
'
mastodon/initial_state
'
;
import
{
isIOS
}
from
'
mastodon/is_mobile
'
;
import
PropTypes
from
'
prop-types
'
;
import
React
from
'
react
'
;
import
ImmutablePropTypes
from
'
react-immutable-proptypes
'
;
import
ImmutablePureComponent
from
'
react-immutable-pure-component
'
;
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/account_gallery/index.js
+
0
-
1
View file @
83b21e90
import
React
from
'
react
'
;
import
{
connect
}
from
'
react-redux
'
;
import
ImmutablePropTypes
from
'
react-immutable-proptypes
'
;
import
PropTypes
from
'
prop-types
'
;
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/account_timeline/components/header.js
+
0
-
1
View file @
83b21e90
import
React
from
'
react
'
;
import
ImmutablePropTypes
from
'
react-immutable-proptypes
'
;
import
PropTypes
from
'
prop-types
'
;
import
InnerHeader
from
'
../../account/components/header
'
;
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/account_timeline/components/limited_account_hint.js
+
2
-
2
View file @
83b21e90
import
React
from
'
react
'
;
import
{
PureComponent
}
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
connect
}
from
'
react-redux
'
;
import
{
revealAccount
}
from
'
mastodon/actions/accounts
'
;
...
...
@@ -14,7 +14,7 @@ const mapDispatchToProps = (dispatch, { accountId }) => ({
});
export
default
@
connect
(()
=>
{},
mapDispatchToProps
)
class
LimitedAccountHint
extends
React
.
PureComponent
{
class
LimitedAccountHint
extends
PureComponent
{
static
propTypes
=
{
accountId
:
PropTypes
.
string
.
isRequired
,
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/account_timeline/components/moved_note.js
+
0
-
1
View file @
83b21e90
import
React
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
import
ImmutablePropTypes
from
'
react-immutable-proptypes
'
;
import
{
FormattedMessage
}
from
'
react-intl
'
;
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/account_timeline/containers/header_container.js
+
0
-
1
View file @
83b21e90
import
React
from
'
react
'
;
import
{
connect
}
from
'
react-redux
'
;
import
{
makeGetAccount
,
getAccountHidden
}
from
'
../../../selectors
'
;
import
Header
from
'
../components/header
'
;
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
6
7
8
…
12
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment