Merge commit '14bb6bb29a
' into kb_migration
This commit is contained in:
commit
5b8ca44e3d
20 changed files with 726 additions and 169 deletions
|
@ -13,7 +13,7 @@ import { registrationsOpen } from 'mastodon/initial_state';
|
|||
|
||||
const mapStateToProps = (state, { accountId }) => ({
|
||||
displayNameHtml: state.getIn(['accounts', accountId, 'display_name_html']),
|
||||
signupUrl: state.getIn(['server', 'server', 'registrations', 'url'], '/auth/sign_up') || '/auth/sign_up',
|
||||
signupUrl: state.getIn(['server', 'server', 'registrations', 'url'], null) || '/auth/sign_up',
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
|
|
@ -168,8 +168,9 @@ const makeMapStateToProps = () => {
|
|||
};
|
||||
|
||||
const truncate = (str, num) => {
|
||||
if (str.length > num) {
|
||||
return str.slice(0, num) + '…';
|
||||
const arr = Array.from(str);
|
||||
if (arr.length > num) {
|
||||
return arr.slice(0, num).join('') + '…';
|
||||
} else {
|
||||
return str;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ const SignInBanner = () => {
|
|||
|
||||
let signupButton;
|
||||
|
||||
const signupUrl = useAppSelector((state) => state.getIn(['server', 'server', 'registrations', 'url'], '/auth/sign_up') || '/auth/sign_up');
|
||||
const signupUrl = useAppSelector((state) => state.getIn(['server', 'server', 'registrations', 'url'], null) || '/auth/sign_up');
|
||||
|
||||
if (registrationsOpen) {
|
||||
signupButton = (
|
||||
|
|
|
@ -19,7 +19,7 @@ class FetchResourceService < BaseService
|
|||
|
||||
private
|
||||
|
||||
def process(url, terminal = false)
|
||||
def process(url, terminal: false)
|
||||
@url = url
|
||||
|
||||
perform_request { |response| process_response(response, terminal) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue