1
0
Fork 0
forked from gitea/nas

Merge commit '99e3e152cd' into kb_migration

This commit is contained in:
KMY 2023-04-09 09:29:15 +09:00
commit dc6948e319
5 changed files with 9 additions and 4 deletions

View file

@ -55,10 +55,10 @@ export default class ConversationsList extends ImmutablePureComponent {
}, 300, { leading: true }); }, 300, { leading: true });
render () { render () {
const { conversations, onLoadMore, ...other } = this.props; const { conversations, isLoading, onLoadMore, ...other } = this.props;
return ( return (
<ScrollableList {...other} onLoadMore={onLoadMore && this.handleLoadOlder} ref={this.setRef}> <ScrollableList {...other} isLoading={isLoading} showLoading={isLoading && conversations.isEmpty()} onLoadMore={onLoadMore && this.handleLoadOlder} ref={this.setRef}>
{conversations.map(item => ( {conversations.map(item => (
<ConversationContainer <ConversationContainer
key={item.get('id')} key={item.get('id')}

View file

@ -89,8 +89,10 @@ class DirectTimeline extends React.PureComponent {
trackScroll={!pinned} trackScroll={!pinned}
scrollKey={`direct_timeline-${columnId}`} scrollKey={`direct_timeline-${columnId}`}
timelineId='direct' timelineId='direct'
bindToDocument={!multiColumn}
onLoadMore={this.handleLoadMore} onLoadMore={this.handleLoadMore}
prepend={<div className='follow_requests-unlocked_explanation'><span><FormattedMessage id='compose_form.encryption_warning' defaultMessage='Posts on Mastodon are not end-to-end encrypted. Do not share any dangerous information over Mastodon.' /> <a href='/terms' target='_blank'><FormattedMessage id='compose_form.direct_message_warning_learn_more' defaultMessage='Learn more' /></a></span></div>} prepend={<div className='follow_requests-unlocked_explanation'><span><FormattedMessage id='compose_form.encryption_warning' defaultMessage='Posts on Mastodon are not end-to-end encrypted. Do not share any dangerous information over Mastodon.' /> <a href='/terms' target='_blank'><FormattedMessage id='compose_form.direct_message_warning_learn_more' defaultMessage='Learn more' /></a></span></div>}
alwaysPrepend
emptyMessage={<FormattedMessage id='empty_column.direct' defaultMessage="You don't have any private mentions yet. When you send or receive one, it will show up here." />} emptyMessage={<FormattedMessage id='empty_column.direct' defaultMessage="You don't have any private mentions yet. When you send or receive one, it will show up here." />}
/> />

View file

@ -117,11 +117,12 @@ function main() {
const datetime = new Date(content.getAttribute('datetime')); const datetime = new Date(content.getAttribute('datetime'));
const now = new Date(); const now = new Date();
content.title = dateTimeFormat.format(datetime); const timeGiven = content.getAttribute('datetime').includes('T');
content.title = timeGiven ? dateTimeFormat.format(datetime) : dateFormat.format(datetime);
content.textContent = timeAgoString({ content.textContent = timeAgoString({
formatMessage: ({ id, defaultMessage }, values) => (new IntlMessageFormat(messages[id] || defaultMessage, locale)).format(values), formatMessage: ({ id, defaultMessage }, values) => (new IntlMessageFormat(messages[id] || defaultMessage, locale)).format(values),
formatDate: (date, options) => (new Intl.DateTimeFormat(locale, options)).format(date), formatDate: (date, options) => (new Intl.DateTimeFormat(locale, options)).format(date),
}, datetime, now, now.getFullYear(), content.getAttribute('datetime').includes('T')); }, datetime, now, now.getFullYear(), timeGiven);
}); });
const reactComponents = document.querySelectorAll('[data-component]'); const reactComponents = document.querySelectorAll('[data-component]');

View file

@ -4395,6 +4395,7 @@ a.status-card.compact:hover {
.follow_requests-unlocked_explanation { .follow_requests-unlocked_explanation {
background: darken($ui-base-color, 4%); background: darken($ui-base-color, 4%);
contain: initial; contain: initial;
flex-grow: 0;
} }
.error-column { .error-column {

View file

@ -6,6 +6,7 @@ class NotifyService < BaseService
NON_EMAIL_TYPES = %i( NON_EMAIL_TYPES = %i(
admin.report admin.report
admin.sign_up admin.sign_up
update
).freeze ).freeze
def call(recipient, type, activity) def call(recipient, type, activity)