Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
インターネット蟹工船
mastodon
Commits
1e9d2c4b
Commit
1e9d2c4b
authored
Jan 10, 2017
by
Eugen Rochko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add "not found" component to UI
parent
a1db2a19
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
11 deletions
+44
-11
app/assets/javascripts/components/components/loading_indicator.jsx
...s/javascripts/components/components/loading_indicator.jsx
+12
-10
app/assets/javascripts/components/components/missing_indicator.jsx
...s/javascripts/components/components/missing_indicator.jsx
+17
-0
app/assets/javascripts/components/containers/mastodon.jsx
app/assets/javascripts/components/containers/mastodon.jsx
+2
-0
app/assets/javascripts/components/features/generic_not_found/index.jsx
...vascripts/components/features/generic_not_found/index.jsx
+10
-0
app/assets/javascripts/components/features/status/index.jsx
app/assets/javascripts/components/features/status/index.jsx
+3
-1
No files found.
app/assets/javascripts/components/components/loading_indicator.jsx
View file @
1e9d2c4b
import
{
FormattedMessage
}
from
'
react-intl
'
;
const
LoadingIndicator
=
()
=>
{
const
style
=
{
textAlign
:
'
center
'
,
fontSize
:
'
16px
'
,
fontWeight
:
'
500
'
,
color
:
'
#616b86
'
,
paddingTop
:
'
120px
'
};
return
<
div
style
=
{
style
}
><
FormattedMessage
id
=
'loading_indicator.label'
defaultMessage
=
'Loading...'
/></
div
>;
const
style
=
{
textAlign
:
'
center
'
,
fontSize
:
'
16px
'
,
fontWeight
:
'
500
'
,
color
:
'
#616b86
'
,
paddingTop
:
'
120px
'
};
const
LoadingIndicator
=
()
=>
(
<
div
style
=
{
style
}
>
<
FormattedMessage
id
=
'loading_indicator.label'
defaultMessage
=
'Loading...'
/>
</
div
>
);
export
default
LoadingIndicator
;
app/assets/javascripts/components/components/missing_indicator.jsx
0 → 100644
View file @
1e9d2c4b
import
{
FormattedMessage
}
from
'
react-intl
'
;
const
style
=
{
textAlign
:
'
center
'
,
fontSize
:
'
16px
'
,
fontWeight
:
'
500
'
,
color
:
'
#616b86
'
,
paddingTop
:
'
120px
'
};
const
MissingIndicator
=
()
=>
(
<
div
style
=
{
style
}
>
<
FormattedMessage
id
=
'missing_indicator.label'
defaultMessage
=
'Not found'
/>
</
div
>
);
export
default
MissingIndicator
;
app/assets/javascripts/components/containers/mastodon.jsx
View file @
1e9d2c4b
...
...
@@ -33,6 +33,7 @@ import Favourites from '../features/favourites';
import
HashtagTimeline
from
'
../features/hashtag_timeline
'
;
import
Notifications
from
'
../features/notifications
'
;
import
FollowRequests
from
'
../features/follow_requests
'
;
import
GenericNotFound
from
'
../features/generic_not_found
'
;
import
{
IntlProvider
,
addLocaleData
}
from
'
react-intl
'
;
import
en
from
'
react-intl/locale-data/en
'
;
import
de
from
'
react-intl/locale-data/de
'
;
...
...
@@ -125,6 +126,7 @@ const Mastodon = React.createClass({
</
Route
>
<
Route
path
=
'follow_requests'
component
=
{
FollowRequests
}
/>
<
Route
path
=
'*'
component
=
{
GenericNotFound
}
/>
</
Route
>
</
Router
>
</
Provider
>
...
...
app/assets/javascripts/components/features/generic_not_found/index.jsx
0 → 100644
View file @
1e9d2c4b
import
Column
from
'
../ui/components/column
'
;
import
MissingIndicator
from
'
../../components/missing_indicator
'
;
const
GenericNotFound
=
()
=>
(
<
Column
>
<
MissingIndicator
/>
</
Column
>
);
export
default
GenericNotFound
;
app/assets/javascripts/components/features/status/index.jsx
View file @
1e9d2c4b
...
...
@@ -48,7 +48,8 @@ const Status = React.createClass({
dispatch
:
React
.
PropTypes
.
func
.
isRequired
,
status
:
ImmutablePropTypes
.
map
,
ancestorsIds
:
ImmutablePropTypes
.
list
,
descendantsIds
:
ImmutablePropTypes
.
list
descendantsIds
:
ImmutablePropTypes
.
list
,
me
:
React
.
PropTypes
.
number
},
mixins
:
[
PureRenderMixin
],
...
...
@@ -81,6 +82,7 @@ const Status = React.createClass({
handleMentionClick
(
account
)
{
this
.
props
.
dispatch
(
mentionCompose
(
account
));
if
(
isMobile
(
window
.
innerWidth
))
{
this
.
context
.
router
.
push
(
'
/statuses/new
'
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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