forked from mastodon/mastodon
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'parent/main' into upstream-20231116
- Loading branch information
Showing
162 changed files
with
1,916 additions
and
1,205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
# Github status check is not blocking | ||
informational: true | ||
patch: | ||
default: | ||
# Github status check is not blocking | ||
informational: true | ||
comment: | ||
# Only write a comment in PR if there are changes | ||
require_changes: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# frozen_string_literal: true | ||
|
||
if ENV['CI'] | ||
require 'simplecov-lcov' | ||
SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true | ||
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter | ||
else | ||
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter | ||
end | ||
|
||
SimpleCov.start 'rails' do | ||
enable_coverage :branch | ||
|
||
add_filter 'lib/linter' | ||
|
||
add_group 'Libraries', 'lib' | ||
add_group 'Policies', 'app/policies' | ||
add_group 'Presenters', 'app/presenters' | ||
add_group 'Serializers', 'app/serializers' | ||
add_group 'Services', 'app/services' | ||
add_group 'Validators', 'app/validators' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import PropTypes from 'prop-types'; | ||
import { useState, useCallback } from 'react'; | ||
|
||
import { defineMessages } from 'react-intl'; | ||
|
||
import classNames from 'classnames'; | ||
|
||
import { useDispatch } from 'react-redux'; | ||
|
||
import { ReactComponent as ContentCopyIcon } from '@material-symbols/svg-600/outlined/content_copy.svg'; | ||
|
||
import { showAlert } from 'mastodon/actions/alerts'; | ||
import { IconButton } from 'mastodon/components/icon_button'; | ||
|
||
const messages = defineMessages({ | ||
copied: { id: 'copy_icon_button.copied', defaultMessage: 'Copied to clipboard' }, | ||
}); | ||
|
||
export const CopyIconButton = ({ title, value, className }) => { | ||
const [copied, setCopied] = useState(false); | ||
const dispatch = useDispatch(); | ||
|
||
const handleClick = useCallback(() => { | ||
navigator.clipboard.writeText(value); | ||
setCopied(true); | ||
dispatch(showAlert({ message: messages.copied })); | ||
setTimeout(() => setCopied(false), 700); | ||
}, [setCopied, value, dispatch]); | ||
|
||
return ( | ||
<IconButton | ||
className={classNames(className, copied ? 'copied' : 'copyable')} | ||
title={title} | ||
onClick={handleClick} | ||
iconComponent={ContentCopyIcon} | ||
/> | ||
); | ||
}; | ||
|
||
CopyIconButton.propTypes = { | ||
title: PropTypes.string, | ||
value: PropTypes.string, | ||
className: PropTypes.string, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,23 @@ | ||
import { useIntl, defineMessages } from 'react-intl'; | ||
|
||
import { CircularProgress } from './circular_progress'; | ||
|
||
export const LoadingIndicator: React.FC = () => ( | ||
<div className='loading-indicator'> | ||
<CircularProgress size={50} strokeWidth={6} /> | ||
</div> | ||
); | ||
const messages = defineMessages({ | ||
loading: { id: 'loading_indicator.label', defaultMessage: 'Loading…' }, | ||
}); | ||
|
||
export const LoadingIndicator: React.FC = () => { | ||
const intl = useIntl(); | ||
|
||
return ( | ||
<div | ||
className='loading-indicator' | ||
role='progressbar' | ||
aria-busy | ||
aria-live='polite' | ||
aria-label={intl.formatMessage(messages.loading)} | ||
> | ||
<CircularProgress size={50} strokeWidth={6} /> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
app/javascript/mastodon/features/onboarding/components/progress_indicator.jsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.