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
dd512c14
Commit
dd512c14
authored
4 years ago
by
Eugen Rochko
Browse files
Options
Download
Email Patches
Plain Diff
WIP
parent
9c273c2a
Changes
81
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
app/javascript/mastodon/features/notifications/components/follow_request.js
+1
-1
...todon/features/notifications/components/follow_request.js
app/javascript/mastodon/features/notifications/components/notification.js
+3
-3
...astodon/features/notifications/components/notification.js
app/javascript/mastodon/features/picture_in_picture/components/footer.js
+1
-1
...mastodon/features/picture_in_picture/components/footer.js
app/javascript/mastodon/features/picture_in_picture/components/header.js
+1
-1
...mastodon/features/picture_in_picture/components/header.js
app/javascript/mastodon/features/status/components/detailed_status.js
+3
-3
...pt/mastodon/features/status/components/detailed_status.js
app/javascript/mastodon/features/status/index.js
+1
-1
app/javascript/mastodon/features/status/index.js
app/javascript/mastodon/features/ui/components/boost_modal.js
+1
-1
...javascript/mastodon/features/ui/components/boost_modal.js
app/javascript/mastodon/features/ui/components/columns_area.js
+1
-1
...avascript/mastodon/features/ui/components/columns_area.js
app/javascript/mastodon/features/ui/components/compose_panel.js
+5
-2
...vascript/mastodon/features/ui/components/compose_panel.js
app/javascript/mastodon/features/ui/components/list_panel.js
+1
-1
app/javascript/mastodon/features/ui/components/list_panel.js
app/javascript/mastodon/features/ui/components/media_modal.js
+0
-7
...javascript/mastodon/features/ui/components/media_modal.js
app/javascript/mastodon/features/ui/components/navigation_panel.js
+5
-5
...cript/mastodon/features/ui/components/navigation_panel.js
app/javascript/mastodon/features/ui/components/tabs_bar.js
+3
-3
app/javascript/mastodon/features/ui/components/tabs_bar.js
app/javascript/mastodon/features/ui/index.js
+24
-26
app/javascript/mastodon/features/ui/index.js
app/javascript/mastodon/main.js
+3
-3
app/javascript/mastodon/main.js
app/javascript/mastodon/reducers/accounts_map.js
+15
-0
app/javascript/mastodon/reducers/accounts_map.js
app/javascript/mastodon/reducers/index.js
+2
-0
app/javascript/mastodon/reducers/index.js
app/javascript/mastodon/service_worker/web_push_notifications.js
+1
-1
...ascript/mastodon/service_worker/web_push_notifications.js
app/views/accounts/show.html.haml
+8
-66
app/views/accounts/show.html.haml
app/views/authorize_interactions/_post_follow_actions.html.haml
+1
-1
...ews/authorize_interactions/_post_follow_actions.html.haml
with
80 additions
and
127 deletions
+80
-127
app/javascript/mastodon/features/notifications/components/follow_request.js
+
1
-
1
View file @
dd512c14
...
...
@@ -42,7 +42,7 @@ class FollowRequest extends ImmutablePureComponent {
return
(
<
div
className
=
'
account
'
>
<
div
className
=
'
account__wrapper
'
>
<
Permalink
key
=
{
account
.
get
(
'
id
'
)}
className
=
'
account__display-name
'
title
=
{
account
.
get
(
'
acct
'
)}
href
=
{
account
.
get
(
'
url
'
)}
to
=
{
`/
accounts/
${
account
.
get
(
'
id
'
)}
`
}
>
<
Permalink
key
=
{
account
.
get
(
'
id
'
)}
className
=
'
account__display-name
'
title
=
{
account
.
get
(
'
acct
'
)}
href
=
{
account
.
get
(
'
url
'
)}
to
=
{
`/
@
${
account
.
get
(
'
acct
'
)}
`
}
>
<
div
className
=
'
account__avatar-wrapper
'
><
Avatar
account
=
{
account
}
size
=
{
36
}
/></
div
>
<
DisplayName
account
=
{
account
}
/
>
<
/Permalink
>
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/notifications/components/notification.js
+
3
-
3
View file @
dd512c14
...
...
@@ -68,7 +68,7 @@ class Notification extends ImmutablePureComponent {
const
{
notification
}
=
this
.
props
;
if
(
notification
.
get
(
'
status
'
))
{
this
.
context
.
router
.
history
.
push
(
`/
statuses
/
${
notification
.
get
(
'
status
'
)}
`
);
this
.
context
.
router
.
history
.
push
(
`/
@
${
notification
.
getIn
([
'
status
'
,
'
account
'
,
'
acct
'
])}
/
${
notification
.
get
(
'
status
'
)}
`
);
}
else
{
this
.
handleOpenProfile
();
}
...
...
@@ -76,7 +76,7 @@ class Notification extends ImmutablePureComponent {
handleOpenProfile
=
()
=>
{
const
{
notification
}
=
this
.
props
;
this
.
context
.
router
.
history
.
push
(
`/
accounts/
${
notification
.
getIn
([
'
account
'
,
'
id
'
])}
`
);
this
.
context
.
router
.
history
.
push
(
`/
@
${
notification
.
getIn
([
'
account
'
,
'
acct
'
])}
`
);
}
handleMention
=
e
=>
{
...
...
@@ -315,7 +315,7 @@ class Notification extends ImmutablePureComponent {
const
{
notification
}
=
this
.
props
;
const
account
=
notification
.
get
(
'
account
'
);
const
displayNameHtml
=
{
__html
:
account
.
get
(
'
display_name_html
'
)
};
const
link
=
<
bdi
><
Permalink
className
=
'
notification__display-name
'
href
=
{
account
.
get
(
'
url
'
)}
title
=
{
account
.
get
(
'
acct
'
)}
to
=
{
`/
accounts/
${
account
.
get
(
'
id
'
)}
`
}
dangerouslySetInnerHTML
=
{
displayNameHtml
}
/></
bdi
>
;
const
link
=
<
bdi
><
Permalink
className
=
'
notification__display-name
'
href
=
{
account
.
get
(
'
url
'
)}
title
=
{
account
.
get
(
'
acct
'
)}
to
=
{
`/
@
${
account
.
get
(
'
acct
'
)}
`
}
dangerouslySetInnerHTML
=
{
displayNameHtml
}
/></
bdi
>
;
switch
(
notification
.
get
(
'
type
'
))
{
case
'
follow
'
:
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/picture_in_picture/components/footer.js
+
1
-
1
View file @
dd512c14
...
...
@@ -116,7 +116,7 @@ class Footer extends ImmutablePureComponent {
const
{
status
}
=
this
.
props
;
router
.
history
.
push
(
`/status
es
/
${
status
.
get
(
'
id
'
)}
`
);
router
.
history
.
push
(
`/
@
${
status
.
getIn
([
'
account
'
,
'
acct
'
])}
/
${
status
.
get
(
'
id
'
)}
`
);
}
render
()
{
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/picture_in_picture/components/header.js
+
1
-
1
View file @
dd512c14
...
...
@@ -34,7 +34,7 @@ class Header extends ImmutablePureComponent {
return
(
<
div
className
=
'
picture-in-picture__header
'
>
<
Link
to
=
{
`/
statuses
/
${
statusId
}
`
}
className
=
'
picture-in-picture__header__account
'
>
<
Link
to
=
{
`/
@
${
account
.
get
(
'
acct
'
)}
/
${
statusId
}
`
}
className
=
'
picture-in-picture__header__account
'
>
<
Avatar
account
=
{
account
}
size
=
{
36
}
/
>
<
DisplayName
account
=
{
account
}
/
>
<
/Link
>
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/status/components/detailed_status.js
+
3
-
3
View file @
dd512c14
...
...
@@ -55,7 +55,7 @@ class DetailedStatus extends ImmutablePureComponent {
handleAccountClick
=
(
e
)
=>
{
if
(
e
.
button
===
0
&&
!
(
e
.
ctrlKey
||
e
.
metaKey
)
&&
this
.
context
.
router
)
{
e
.
preventDefault
();
this
.
context
.
router
.
history
.
push
(
`/
accounts/
${
this
.
props
.
status
.
getIn
([
'
account
'
,
'
id
'
])}
`
);
this
.
context
.
router
.
history
.
push
(
`/
@
${
this
.
props
.
status
.
getIn
([
'
account
'
,
'
acct
'
])}
`
);
}
e
.
stopPropagation
();
...
...
@@ -195,7 +195,7 @@ class DetailedStatus extends ImmutablePureComponent {
reblogLink
=
(
<
React
.
Fragment
>
<
React
.
Fragment
>
·
<
/React.Fragment
>
<
Link
to
=
{
`/status
es
/
${
status
.
get
(
'
id
'
)}
/reblogs`
}
className
=
'
detailed-status__link
'
>
<
Link
to
=
{
`/
@
${
status
.
getIn
([
'
account
'
,
'
acct
'
])}
/
${
status
.
get
(
'
id
'
)}
/reblogs`
}
className
=
'
detailed-status__link
'
>
<
Icon
id
=
{
reblogIcon
}
/
>
<
span
className
=
'
detailed-status__reblogs
'
>
<
AnimatedNumber
value
=
{
status
.
get
(
'
reblogs_count
'
)}
/
>
...
...
@@ -219,7 +219,7 @@ class DetailedStatus extends ImmutablePureComponent {
if
(
this
.
context
.
router
)
{
favouriteLink
=
(
<
Link
to
=
{
`/status
es
/
${
status
.
get
(
'
id
'
)}
/favourites`
}
className
=
'
detailed-status__link
'
>
<
Link
to
=
{
`/
@
${
status
.
getIn
([
'
account
'
,
'
acct
'
])}
/
${
status
.
get
(
'
id
'
)}
/favourites`
}
className
=
'
detailed-status__link
'
>
<
Icon
id
=
'
star
'
/>
<
span
className
=
'
detailed-status__favorites
'
>
<
AnimatedNumber
value
=
{
status
.
get
(
'
favourites_count
'
)}
/
>
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/status/index.js
+
1
-
1
View file @
dd512c14
...
...
@@ -396,7 +396,7 @@ class Status extends ImmutablePureComponent {
}
handleHotkeyOpenProfile
=
()
=>
{
this
.
context
.
router
.
history
.
push
(
`/
accounts/
${
this
.
props
.
status
.
getIn
([
'
account
'
,
'
id
'
])}
`
);
this
.
context
.
router
.
history
.
push
(
`/
@
${
this
.
props
.
status
.
getIn
([
'
account
'
,
'
acct
'
])}
`
);
}
handleHotkeyToggleHidden
=
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/ui/components/boost_modal.js
+
1
-
1
View file @
dd512c14
...
...
@@ -68,7 +68,7 @@ class BoostModal extends ImmutablePureComponent {
if
(
e
.
button
===
0
&&
!
(
e
.
ctrlKey
||
e
.
metaKey
))
{
e
.
preventDefault
();
this
.
props
.
onClose
();
this
.
context
.
router
.
history
.
push
(
`/
accounts/
${
this
.
props
.
status
.
getIn
([
'
account
'
,
'
id
'
])}
`
);
this
.
context
.
router
.
history
.
push
(
`/
@
${
this
.
props
.
status
.
getIn
([
'
account
'
,
'
acct
'
])}
`
);
}
}
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/ui/components/columns_area.js
+
1
-
1
View file @
dd512c14
...
...
@@ -191,7 +191,7 @@ class ColumnsArea extends ImmutablePureComponent {
const
columnIndex
=
getIndex
(
this
.
context
.
router
.
history
.
location
.
pathname
);
if
(
singleColumn
)
{
const
floatingActionButton
=
shouldHideFAB
(
this
.
context
.
router
.
history
.
location
.
pathname
)
?
null
:
<
Link
key
=
'
floating-action-button
'
to
=
'
/
statuses/new
'
className
=
'
floating-action-button
'
aria
-
label
=
{
intl
.
formatMessage
(
messages
.
publish
)}
><
Icon
id
=
'
pencil
'
/><
/Link>
;
const
floatingActionButton
=
shouldHideFAB
(
this
.
context
.
router
.
history
.
location
.
pathname
)
?
null
:
<
Link
key
=
'
floating-action-button
'
to
=
'
/
publish
'
className
=
'
floating-action-button
'
aria
-
label
=
{
intl
.
formatMessage
(
messages
.
publish
)}
><
Icon
id
=
'
pencil
'
/><
/Link>
;
const
content
=
columnIndex
!==
-
1
?
(
<
ReactSwipeableViews
key
=
'
content
'
hysteresis
=
{
0.2
}
threshold
=
{
15
}
index
=
{
columnIndex
}
onChangeIndex
=
{
this
.
handleSwipe
}
onTransitionEnd
=
{
this
.
handleAnimationEnd
}
animateTransitions
=
{
shouldAnimate
}
springConfig
=
{{
duration
:
'
400ms
'
,
delay
:
'
0s
'
,
easeFunction
:
'
ease
'
}}
style
=
{{
height
:
'
100%
'
}}
disabled
=
{
disableSwiping
}
>
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/ui/components/compose_panel.js
+
5
-
2
View file @
dd512c14
...
...
@@ -6,6 +6,7 @@ import ComposeFormContainer from 'mastodon/features/compose/containers/compose_f
import
NavigationContainer
from
'
mastodon/features/compose/containers/navigation_container
'
;
import
LinkFooter
from
'
./link_footer
'
;
import
{
changeComposing
}
from
'
mastodon/actions/compose
'
;
import
{
me
}
from
'
mastodon/initial_state
'
;
export
default
@
connect
()
class
ComposePanel
extends
React
.
PureComponent
{
...
...
@@ -26,8 +27,10 @@ class ComposePanel extends React.PureComponent {
return
(
<
div
className
=
'
compose-panel
'
onFocus
=
{
this
.
onFocus
}
>
<
SearchContainer
openInRoute
/>
<
NavigationContainer
onClose
=
{
this
.
onBlur
}
/
>
<
ComposeFormContainer
singleColumn
/>
{
me
&&
<
NavigationContainer
onClose
=
{
this
.
onBlur
}
/>
}
{
me
&&
<
ComposeFormContainer
singleColumn
/>
}
<
LinkFooter
withHotkeys
/>
<
/div
>
);
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/ui/components/list_panel.js
+
1
-
1
View file @
dd512c14
...
...
@@ -46,7 +46,7 @@ class ListPanel extends ImmutablePureComponent {
<
hr
/>
{
lists
.
map
(
list
=>
(
<
NavLink
key
=
{
list
.
get
(
'
id
'
)}
className
=
'
column-link column-link--transparent
'
strict
to
=
{
`/
timelines/
list/
${
list
.
get
(
'
id
'
)}
`
}
><
Icon
className
=
'
column-link__icon
'
id
=
'
list-ul
'
fixedWidth
/>
{
list
.
get
(
'
title
'
)}
<
/NavLink
>
<
NavLink
key
=
{
list
.
get
(
'
id
'
)}
className
=
'
column-link column-link--transparent
'
strict
to
=
{
`/list
s
/
${
list
.
get
(
'
id
'
)}
`
}
><
Icon
className
=
'
column-link__icon
'
id
=
'
list-ul
'
fixedWidth
/>
{
list
.
get
(
'
title
'
)}
<
/NavLink
>
))}
<
/div
>
);
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/ui/components/media_modal.js
+
0
-
7
View file @
dd512c14
...
...
@@ -152,13 +152,6 @@ class MediaModal extends ImmutablePureComponent {
}));
};
handleStatusClick
=
e
=>
{
if
(
e
.
button
===
0
&&
!
(
e
.
ctrlKey
||
e
.
metaKey
))
{
e
.
preventDefault
();
this
.
context
.
router
.
history
.
push
(
`/statuses/
${
this
.
props
.
statusId
}
`
);
}
}
render
()
{
const
{
media
,
statusId
,
intl
,
onClose
}
=
this
.
props
;
const
{
navigationHidden
}
=
this
.
state
;
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/ui/components/navigation_panel.js
+
5
-
5
View file @
dd512c14
...
...
@@ -10,16 +10,16 @@ import TrendsContainer from 'mastodon/features/getting_started/containers/trends
const
NavigationPanel
=
()
=>
(
<
div
className
=
'
navigation-panel
'
>
<
NavLink
className
=
'
column-link column-link--transparent
'
to
=
'
/
timelines/
home
'
data
-
preview
-
title
-
id
=
'
column.home
'
data
-
preview
-
icon
=
'
home
'
><
Icon
className
=
'
column-link__icon
'
id
=
'
home
'
fixedWidth
/><
FormattedMessage
id
=
'
tabs_bar.home
'
defaultMessage
=
'
Home
'
/><
/NavLink
>
<
NavLink
className
=
'
column-link column-link--transparent
'
to
=
'
/home
'
data
-
preview
-
title
-
id
=
'
column.home
'
data
-
preview
-
icon
=
'
home
'
><
Icon
className
=
'
column-link__icon
'
id
=
'
home
'
fixedWidth
/><
FormattedMessage
id
=
'
tabs_bar.home
'
defaultMessage
=
'
Home
'
/><
/NavLink
>
<
NavLink
className
=
'
column-link column-link--transparent
'
to
=
'
/notifications
'
data
-
preview
-
title
-
id
=
'
column.notifications
'
data
-
preview
-
icon
=
'
bell
'
><
NotificationsCounterIcon
className
=
'
column-link__icon
'
/><
FormattedMessage
id
=
'
tabs_bar.notifications
'
defaultMessage
=
'
Notifications
'
/><
/NavLink
>
<
FollowRequestsNavLink
/>
<
NavLink
className
=
'
column-link column-link--transparent
'
to
=
'
/
timelines/
public/local
'
data
-
preview
-
title
-
id
=
'
column.community
'
data
-
preview
-
icon
=
'
users
'
><
Icon
className
=
'
column-link__icon
'
id
=
'
users
'
fixedWidth
/><
FormattedMessage
id
=
'
tabs_bar.local_timeline
'
defaultMessage
=
'
Local
'
/><
/NavLink
>
<
NavLink
className
=
'
column-link column-link--transparent
'
exact
to
=
'
/
timelines/
public
'
data
-
preview
-
title
-
id
=
'
column.public
'
data
-
preview
-
icon
=
'
globe
'
><
Icon
className
=
'
column-link__icon
'
id
=
'
globe
'
fixedWidth
/><
FormattedMessage
id
=
'
tabs_bar.federated_timeline
'
defaultMessage
=
'
Federated
'
/><
/NavLink
>
<
NavLink
className
=
'
column-link column-link--transparent
'
to
=
'
/
timelines/direct
'
><
Icon
className
=
'
column-link__icon
'
id
=
'
envelope
'
fixedWidth
/><
FormattedMessage
id
=
'
navigation_bar.direct
'
defaultMessage
=
'
Direct messages
'
/><
/NavLink
>
<
NavLink
className
=
'
column-link column-link--transparent
'
to
=
'
/public/local
'
data
-
preview
-
title
-
id
=
'
column.community
'
data
-
preview
-
icon
=
'
users
'
><
Icon
className
=
'
column-link__icon
'
id
=
'
users
'
fixedWidth
/><
FormattedMessage
id
=
'
tabs_bar.local_timeline
'
defaultMessage
=
'
Local
'
/><
/NavLink
>
<
NavLink
className
=
'
column-link column-link--transparent
'
exact
to
=
'
/public
'
data
-
preview
-
title
-
id
=
'
column.public
'
data
-
preview
-
icon
=
'
globe
'
><
Icon
className
=
'
column-link__icon
'
id
=
'
globe
'
fixedWidth
/><
FormattedMessage
id
=
'
tabs_bar.federated_timeline
'
defaultMessage
=
'
Federated
'
/><
/NavLink
>
<
NavLink
className
=
'
column-link column-link--transparent
'
to
=
'
/
conversations
'
><
Icon
className
=
'
column-link__icon
'
id
=
'
envelope
'
fixedWidth
/><
FormattedMessage
id
=
'
navigation_bar.direct
'
defaultMessage
=
'
Direct messages
'
/><
/NavLink
>
<
NavLink
className
=
'
column-link column-link--transparent
'
to
=
'
/favourites
'
><
Icon
className
=
'
column-link__icon
'
id
=
'
star
'
fixedWidth
/><
FormattedMessage
id
=
'
navigation_bar.favourites
'
defaultMessage
=
'
Favourites
'
/><
/NavLink
>
<
NavLink
className
=
'
column-link column-link--transparent
'
to
=
'
/bookmarks
'
><
Icon
className
=
'
column-link__icon
'
id
=
'
bookmark
'
fixedWidth
/><
FormattedMessage
id
=
'
navigation_bar.bookmarks
'
defaultMessage
=
'
Bookmarks
'
/><
/NavLink
>
<
NavLink
className
=
'
column-link column-link--transparent
'
to
=
'
/lists
'
><
Icon
className
=
'
column-link__icon
'
id
=
'
list-ul
'
fixedWidth
/><
FormattedMessage
id
=
'
navigation_bar.lists
'
defaultMessage
=
'
Lists
'
/><
/NavLink
>
{
profile_directory
&&
<
NavLink
className
=
'
column-link column-link--transparent
'
to
=
'
/
direct
or
y
'
><
Icon
className
=
'
column-link__icon
'
id
=
'
address-book-o
'
fixedWidth
/><
FormattedMessage
id
=
'
getting_started.directory
'
defaultMessage
=
'
Profile directory
'
/><
/NavLink>
}
{
profile_directory
&&
<
NavLink
className
=
'
column-link column-link--transparent
'
to
=
'
/
expl
or
e
'
><
Icon
className
=
'
column-link__icon
'
id
=
'
address-book-o
'
fixedWidth
/><
FormattedMessage
id
=
'
getting_started.directory
'
defaultMessage
=
'
Profile directory
'
/><
/NavLink>
}
<
ListPanel
/>
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/ui/components/tabs_bar.js
+
3
-
3
View file @
dd512c14
...
...
@@ -8,10 +8,10 @@ import Icon from 'mastodon/components/icon';
import
NotificationsCounterIcon
from
'
./notifications_counter_icon
'
;
export
const
links
=
[
<
NavLink
className
=
'
tabs-bar__link
'
to
=
'
/
timelines/
home
'
data
-
preview
-
title
-
id
=
'
column.home
'
data
-
preview
-
icon
=
'
home
'
><
Icon
id
=
'
home
'
fixedWidth
/><
FormattedMessage
id
=
'
tabs_bar.home
'
defaultMessage
=
'
Home
'
/><
/NavLink>
,
<
NavLink
className
=
'
tabs-bar__link
'
to
=
'
/home
'
data
-
preview
-
title
-
id
=
'
column.home
'
data
-
preview
-
icon
=
'
home
'
><
Icon
id
=
'
home
'
fixedWidth
/><
FormattedMessage
id
=
'
tabs_bar.home
'
defaultMessage
=
'
Home
'
/><
/NavLink>
,
<
NavLink
className
=
'
tabs-bar__link
'
to
=
'
/notifications
'
data
-
preview
-
title
-
id
=
'
column.notifications
'
data
-
preview
-
icon
=
'
bell
'
><
NotificationsCounterIcon
/><
FormattedMessage
id
=
'
tabs_bar.notifications
'
defaultMessage
=
'
Notifications
'
/><
/NavLink>
,
<
NavLink
className
=
'
tabs-bar__link
'
to
=
'
/
timelines/
public/local
'
data
-
preview
-
title
-
id
=
'
column.community
'
data
-
preview
-
icon
=
'
users
'
><
Icon
id
=
'
users
'
fixedWidth
/><
FormattedMessage
id
=
'
tabs_bar.local_timeline
'
defaultMessage
=
'
Local
'
/><
/NavLink>
,
<
NavLink
className
=
'
tabs-bar__link
'
exact
to
=
'
/
timelines/
public
'
data
-
preview
-
title
-
id
=
'
column.public
'
data
-
preview
-
icon
=
'
globe
'
><
Icon
id
=
'
globe
'
fixedWidth
/><
FormattedMessage
id
=
'
tabs_bar.federated_timeline
'
defaultMessage
=
'
Federated
'
/><
/NavLink>
,
<
NavLink
className
=
'
tabs-bar__link
'
to
=
'
/public/local
'
data
-
preview
-
title
-
id
=
'
column.community
'
data
-
preview
-
icon
=
'
users
'
><
Icon
id
=
'
users
'
fixedWidth
/><
FormattedMessage
id
=
'
tabs_bar.local_timeline
'
defaultMessage
=
'
Local
'
/><
/NavLink>
,
<
NavLink
className
=
'
tabs-bar__link
'
exact
to
=
'
/public
'
data
-
preview
-
title
-
id
=
'
column.public
'
data
-
preview
-
icon
=
'
globe
'
><
Icon
id
=
'
globe
'
fixedWidth
/><
FormattedMessage
id
=
'
tabs_bar.federated_timeline
'
defaultMessage
=
'
Federated
'
/><
/NavLink>
,
<
NavLink
className
=
'
tabs-bar__link optional
'
to
=
'
/search
'
data
-
preview
-
title
-
id
=
'
tabs_bar.search
'
data
-
preview
-
icon
=
'
bell
'
><
Icon
id
=
'
search
'
fixedWidth
/><
FormattedMessage
id
=
'
tabs_bar.search
'
defaultMessage
=
'
Search
'
/><
/NavLink>
,
<
NavLink
className
=
'
tabs-bar__link
'
style
=
{{
flexGrow
:
'
0
'
,
flexBasis
:
'
30px
'
}}
to
=
'
/getting-started
'
data
-
preview
-
title
-
id
=
'
getting_started.heading
'
data
-
preview
-
icon
=
'
bars
'
><
Icon
id
=
'
bars
'
fixedWidth
/><
/NavLink>
,
];
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/ui/index.js
+
24
-
26
View file @
dd512c14
...
...
@@ -147,7 +147,7 @@ class SwitchingColumnsArea extends React.PureComponent {
render
()
{
const
{
children
,
mobile
}
=
this
.
props
;
const
redirect
=
mobile
?
<
Redirect
from
=
'
/
'
to
=
'
/
timelines/
home
'
exact
/>
:
<
Redirect
from
=
'
/
'
to
=
'
/getting-started
'
exact
/>
;
const
redirect
=
mobile
?
<
Redirect
from
=
'
/
'
to
=
'
/home
'
exact
/>
:
<
Redirect
from
=
'
/
'
to
=
'
/getting-started
'
exact
/>
;
return
(
<
ColumnsAreaContainer
ref
=
{
this
.
setRef
}
singleColumn
=
{
mobile
}
>
...
...
@@ -155,31 +155,29 @@ class SwitchingColumnsArea extends React.PureComponent {
{
redirect
}
<
WrappedRoute
path
=
'
/getting-started
'
component
=
{
GettingStarted
}
content
=
{
children
}
/
>
<
WrappedRoute
path
=
'
/keyboard-shortcuts
'
component
=
{
KeyboardShortcuts
}
content
=
{
children
}
/
>
<
WrappedRoute
path
=
'
/timelines/home
'
component
=
{
HomeTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/timelines/public
'
exact
component
=
{
PublicTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/timelines/public/local
'
exact
component
=
{
CommunityTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/timelines/direct
'
component
=
{
DirectTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/timelines/tag/:id
'
component
=
{
HashtagTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/timelines/list/:id
'
component
=
{
ListTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/home
'
component
=
{
HomeTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/public
'
exact
component
=
{
PublicTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/public/local
'
exact
component
=
{
CommunityTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/conversations
'
component
=
{
DirectTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/tags/:id
'
component
=
{
HashtagTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/lists/:id
'
component
=
{
ListTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/notifications
'
component
=
{
Notifications
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/favourites
'
component
=
{
FavouritedStatuses
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/bookmarks
'
component
=
{
BookmarkedStatuses
}
content
=
{
children
}
/
>
<
WrappedRoute
path
=
'
/pinned
'
component
=
{
PinnedStatuses
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/search
'
component
=
{
Search
}
content
=
{
children
}
/
>
<
WrappedRoute
path
=
'
/
direct
or
y
'
component
=
{
Directory
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/statuses/new
'
component
=
{
Compose
}
content
=
{
children
}
/
>
<
WrappedRoute
path
=
'
/
statuses/:statusId
'
exact
component
=
{
Status
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/
statuses/:statusId/reblogs
'
component
=
{
Reblogs
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/
statuses/:statusId/favourite
s
'
component
=
{
F
avourite
s
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/
accounts/:accountId
'
exact
component
=
{
Account
Timeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/acc
ounts/:accountId/with_replies
'
component
=
{
AccountTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
,
withReplies
:
true
}}
/
>
<
WrappedRoute
path
=
'
/acc
ounts/:accountId/followers
'
component
=
{
Follower
s
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/acc
ounts/:accountId/following
'
component
=
{
Following
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/acc
ounts/:accountId/media
'
component
=
{
AccountGallery
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/
expl
or
e
'
component
=
{
Directory
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/publish
'
component
=
{
Compose
}
content
=
{
children
}
/
>
<
WrappedRoute
path
=
'
/
@:acct
'
exact
component
=
{
AccountTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/
@:acct/with_replies
'
component
=
{
AccountTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
,
withReplies
:
true
}}
/
>
<
WrappedRoute
path
=
'
/
@:acct/follower
s
'
component
=
{
F
ollower
s
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/@:acct/following
'
component
=
{
Following
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/
@:acct/media
'
component
=
{
Account
Gallery
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/
@:
acc
t/tagged/:tag
'
component
=
{
AccountTimeline
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/
@:
acc
t/:statusId
'
exact
component
=
{
Statu
s
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/
@:
acc
t/:statusId/reblogs
'
component
=
{
Reblogs
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/
@:
acc
t/:statusId/favourites
'
component
=
{
Favourites
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/follow_requests
'
component
=
{
FollowRequests
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
<
WrappedRoute
path
=
'
/blocks
'
component
=
{
Blocks
}
content
=
{
children
}
componentParams
=
{{
shouldUpdateScroll
:
this
.
shouldUpdateScroll
}}
/
>
...
...
@@ -447,7 +445,7 @@ class UI extends React.PureComponent {
}
handleHotkeyGoToHome
=
()
=>
{
this
.
context
.
router
.
history
.
push
(
'
/
timelines/
home
'
);
this
.
context
.
router
.
history
.
push
(
'
/home
'
);
}
handleHotkeyGoToNotifications
=
()
=>
{
...
...
@@ -455,15 +453,15 @@ class UI extends React.PureComponent {
}
handleHotkeyGoToLocal
=
()
=>
{
this
.
context
.
router
.
history
.
push
(
'
/
timelines/
public/local
'
);
this
.
context
.
router
.
history
.
push
(
'
/public/local
'
);
}
handleHotkeyGoToFederated
=
()
=>
{
this
.
context
.
router
.
history
.
push
(
'
/
timelines/
public
'
);
this
.
context
.
router
.
history
.
push
(
'
/public
'
);
}
handleHotkeyGoToDirect
=
()
=>
{
this
.
context
.
router
.
history
.
push
(
'
/
timelines/direct
'
);
this
.
context
.
router
.
history
.
push
(
'
/
conversations
'
);
}
handleHotkeyGoToStart
=
()
=>
{
...
...
@@ -479,7 +477,7 @@ class UI extends React.PureComponent {
}
handleHotkeyGoToProfile
=
()
=>
{
this
.
context
.
router
.
history
.
push
(
`/accounts/
${
me
}
`
);
this
.
context
.
router
.
history
.
push
(
`/accounts/
${
me
}
`
);
// FIXME
}
handleHotkeyGoToBlocked
=
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/main.js
+
3
-
3
View file @
dd512c14
...
...
@@ -13,9 +13,9 @@ function main() {
if
(
window
.
history
&&
history
.
replaceState
)
{
const
{
pathname
,
search
,
hash
}
=
window
.
location
;
const
path
=
pathname
+
search
+
hash
;
if
(
!
(
/^
\/
web
(
$|
\/)
/
).
test
(
path
))
{
history
.
replaceState
(
null
,
document
.
title
,
`/web
${
path
}
`
);
}
//
if (!(/^\/web($|\/)/).test(path)) {
//
history.replaceState(null, document.title, `/web${path}`);
//
}
}
ready
(()
=>
{
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/reducers/accounts_map.js
0 → 100644
+
15
-
0
View file @
dd512c14
import
{
ACCOUNT_IMPORT
,
ACCOUNTS_IMPORT
}
from
'
../actions/importer
'
;
import
{
Map
as
ImmutableMap
}
from
'
immutable
'
;
const
initialState
=
ImmutableMap
();
export
default
function
accountsMap
(
state
=
initialState
,
action
)
{
switch
(
action
.
type
)
{
case
ACCOUNT_IMPORT
:
return
state
.
set
(
action
.
account
.
acct
,
action
.
account
.
id
);
case
ACCOUNTS_IMPORT
:
return
state
.
withMutations
(
map
=>
action
.
accounts
.
forEach
(
account
=>
map
.
set
(
account
.
acct
,
account
.
id
)));
default
:
return
state
;
}
};
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/reducers/index.js
+
2
-
0
View file @
dd512c14
...
...
@@ -38,6 +38,7 @@ import missed_updates from './missed_updates';
import
announcements
from
'
./announcements
'
;
import
markers
from
'
./markers
'
;
import
picture_in_picture
from
'
./picture_in_picture
'
;
import
accounts_map
from
'
./accounts_map
'
;
const
reducers
=
{
announcements
,
...
...
@@ -52,6 +53,7 @@ const reducers = {
status_lists
,
accounts
,
accounts_counters
,
accounts_map
,
statuses
,
relationships
,
settings
,
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/service_worker/web_push_notifications.js
+
1
-
1
View file @
dd512c14
...
...
@@ -90,7 +90,7 @@ const handlePush = (event) => {
options
.
tag
=
notification
.
id
;
options
.
badge
=
'
/badge.png
'
;
options
.
image
=
notification
.
status
&&
notification
.
status
.
media_attachments
.
length
>
0
&&
notification
.
status
.
media_attachments
[
0
].
preview_url
||
undefined
;
options
.
data
=
{
access_token
,
preferred_locale
,
id
:
notification
.
status
?
notification
.
status
.
id
:
notification
.
account
.
id
,
url
:
notification
.
status
?
`/
web/statuses
/
${
notification
.
status
.
id
}
`
:
`/
web/accounts/
${
notification
.
account
.
id
}
`
};
options
.
data
=
{
access_token
,
preferred_locale
,
id
:
notification
.
status
?
notification
.
status
.
id
:
notification
.
account
.
id
,
url
:
notification
.
status
?
`/
@
${
notification
.
account
.
acct
}
/
${
notification
.
status
.
id
}
`
:
`/
@
${
notification
.
account
.
acct
}
`
};
if
(
notification
.
status
&&
notification
.
status
.
spoiler_text
||
notification
.
status
.
sensitive
)
{
options
.
data
.
hiddenBody
=
htmlToPlainText
(
notification
.
status
.
content
);
...
...
This diff is collapsed.
Click to expand it.
app/views/accounts/show.html.haml
+
8
-
66
View file @
dd512c14
...
...
@@ -16,71 +16,13 @@
=
opengraph
'og:type'
,
'profile'
=
render
'og'
,
account:
@account
,
url:
short_account_url
(
@account
,
only_path:
false
)
%meta
{
name:
'applicationServerKey'
,
content:
Rails
.
configuration
.
x
.
vapid_public_key
}
=
render_initial_state
=
javascript_pack_tag
'application'
,
crossorigin:
'anonymous'
=
render
'header'
,
account:
@account
,
with_bio:
true
.app-holder
#mastodon
{
data:
{
props:
Oj
.
dump
(
default_props
)
}
}
%noscript
=
image_pack_tag
'logo.svg'
,
alt:
'Mastodon'
.grid
.column-0
.h-feed
%data
.p-name
{
value:
"#{@account.username} on #{site_hostname}"
}
/
.account__section-headline
=
active_link_to
t
(
'accounts.posts_tab_heading'
),
short_account_url
(
@account
)
=
active_link_to
t
(
'accounts.posts_with_replies'
),
short_account_with_replies_url
(
@account
)
=
active_link_to
t
(
'accounts.media'
),
short_account_media_url
(
@account
)
-
if
user_signed_in?
&&
@account
.
blocking?
(
current_account
)
.nothing-here.nothing-here--under-tabs
=
t
(
'accounts.unavailable'
)
-
elsif
@statuses
.
empty?
=
nothing_here
'nothing-here--under-tabs'
-
else
.activity-stream.activity-stream--under-tabs
-
if
params
[
:page
].
to_i
.
zero?
=
render
partial:
'statuses/status'
,
collection:
@pinned_statuses
,
as: :status
,
locals:
{
pinned:
true
}
-
if
@newer_url
.entry
=
link_to_newer
@newer_url
=
render
partial:
'statuses/status'
,
collection:
@statuses
,
as: :status
-
if
@older_url
.entry
=
link_to_older
@older_url
.column-1
-
if
@account
.
memorial?
.memoriam-widget
=
t
(
'in_memoriam_html'
)
-
elsif
@account
.
moved?
=
render
'moved'
,
account:
@account
=
render
'bio'
,
account:
@account
-
if
@endorsed_accounts
.
empty?
&&
@account
.
id
==
current_account
&
.
id
.placeholder-widget
=
t
(
'accounts.endorsements_hint'
)
-
elsif
!
@endorsed_accounts
.
empty?
.endorsements-widget
%h4
=
t
'accounts.choices_html'
,
name:
content_tag
(
:bdi
,
display_name
(
@account
,
custom_emojify:
true
))
-
@endorsed_accounts
.
each
do
|
account
|
=
account_link_to
account
-
if
@featured_hashtags
.
empty?
&&
@account
.
id
==
current_account
&
.
id
.placeholder-widget
=
t
(
'accounts.featured_tags_hint'
)
=
link_to
settings_featured_tags_path
do
=
t
(
'featured_tags.add_new'
)
=
fa_icon
'chevron-right fw'
-
else
-
@featured_hashtags
.
each
do
|
featured_tag
|
.directory__tag
{
class:
params
[
:tag
]
==
featured_tag
.
name
?
'active'
:
nil
}
=
link_to
short_account_tag_path
(
@account
,
featured_tag
.
tag
)
do
%h4
=
fa_icon
'hashtag'
=
featured_tag
.
name
%small
-
if
featured_tag
.
last_status_at
.
nil?
=
t
(
'accounts.nothing_here'
)
-
else
%time
.formatted
{
datetime:
featured_tag
.
last_status_at
.
iso8601
,
title:
l
(
featured_tag
.
last_status_at
)
}=
l
featured_tag
.
last_status_at
.trends__item__current
=
number_to_human
featured_tag
.
statuses_count
,
strip_insignificant_zeros:
true
=
render
'application/sidebar'
%div
=
t
(
'errors.noscript_html'
,
apps_path:
'https://joinmastodon.org/apps'
)
This diff is collapsed.
Click to expand it.
app/views/authorize_interactions/_post_follow_actions.html.haml
+
1
-
1
View file @
dd512c14
.post-follow-actions
%div
=
link_to
t
(
'authorize_follow.post_follow.web'
),
web_url
(
"
account
s/
#{
@resource
.
id
}
"
),
class:
'button button--block'
%div
=
link_to
t
(
'authorize_follow.post_follow.web'
),
short_
account
_path
(
@resource
.
acct
),
class:
'button button--block'
%div
=
link_to
t
(
'authorize_follow.post_follow.return'
),
ActivityPub
::
TagManager
.
instance
.
url_for
(
@resource
),
class:
'button button--block'
%div
=
t
(
'authorize_follow.post_follow.close'
)
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
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