Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit e28e51d
Author: mogaminsk <mgmnjp@icloud.com>
Date:   Mon Apr 29 19:55:22 2024 +0900

    add `word-break: keep-all` into badge

commit 7d3fe2b
Author: Claire <claire.github-309c@sitedethib.com>
Date:   Mon Apr 29 11:55:41 2024 +0200

    Add loading indicator and empty result message to advanced interface search (mastodon#30085)

commit ac7f4d5
Author: Matt Jankowski <matt@jankowski.online>
Date:   Mon Apr 29 05:55:37 2024 -0400

    Use composable query in `Status.without_replies` scope (mastodon#30086)

commit 95e9de5
Author: Claire <claire.github-309c@sitedethib.com>
Date:   Mon Apr 29 11:45:58 2024 +0200

    Prevent accidental serialization of `Account` and `User` records (mastodon#30079)

commit e336466
Author: Matt Jankowski <matt@jankowski.online>
Date:   Mon Apr 29 05:33:27 2024 -0400

    Use shared form partial for `admin/rules` views (mastodon#30067)

commit a9816f0
Author: Matt Jankowski <matt@jankowski.online>
Date:   Mon Apr 29 05:33:06 2024 -0400

    Use shared form partial for `admin/warning_presets` views (mastodon#30069)

commit b9b4db4
Author: Renaud Chaput <renchap@gmail.com>
Date:   Mon Apr 29 11:29:59 2024 +0200

    Remove usage of deprecated `defaultTypes` on React functional components (mastodon#30099)

commit 2739d8d
Author: Matt Jankowski <matt@jankowski.online>
Date:   Mon Apr 29 05:10:23 2024 -0400

    Use shorter `render` call in `admin/webhooks` view (mastodon#30071)

commit bbf1b60
Author: Matt Jankowski <matt@jankowski.online>
Date:   Mon Apr 29 05:04:35 2024 -0400

    Remove unused `Account.popular` scope (mastodon#30068)

commit 6931cf5
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Apr 29 09:03:27 2024 +0000

    Update dependency aws-sdk-s3 to v1.148.0 (mastodon#30076)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 2123281
Author: Matt Jankowski <matt@jankowski.online>
Date:   Mon Apr 29 05:02:47 2024 -0400

    Move `Account` limits to constants (mastodon#30087)

commit f0c9cba
Author: Matt Jankowski <matt@jankowski.online>
Date:   Mon Apr 29 05:01:46 2024 -0400

    Use `EXPIRATION_DURATIONS` constant in `CustomFilter` class (mastodon#30088)

commit 4527e01
Author: Renaud Chaput <renchap@gmail.com>
Date:   Mon Apr 29 10:23:05 2024 +0200

    Convert `entrypoints/sign_up` to Typescript (mastodon#30106)

commit 9be7efe
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Mon Apr 29 08:15:43 2024 +0000

    New Crowdin Translations (automated) (mastodon#30092)

    Co-authored-by: GitHub Actions <noreply@github.com>

commit 00aec2f
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Apr 29 08:10:20 2024 +0000

    Update peter-evans/create-pull-request action to v6.0.5 (mastodon#30112)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 0efa985
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Apr 29 10:10:04 2024 +0200

    Update libretranslate/libretranslate Docker tag to v1.5.7 (mastodon#30111)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 2322336
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Apr 29 10:09:50 2024 +0200

    Update eslint (non-major) (mastodon#30110)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit c0584a6
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Apr 29 08:09:27 2024 +0000

    Update devDependencies (non-major) (mastodon#30109)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 31f3dd5
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Apr 29 10:08:58 2024 +0200

    Update dependency rubocop to v1.63.4 (mastodon#30096)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit d8a4cea
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Apr 29 10:08:43 2024 +0200

    Update dependency haml_lint to v0.58.0 (mastodon#30094)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 3690906
Author: Renaud Chaput <renchap@gmail.com>
Date:   Mon Apr 29 10:02:41 2024 +0200

    Convert easy entrypoints files to Typescript (mastodon#30102)

commit 4f4b779
Author: David Beck <davbeck@users.noreply.github.com>
Date:   Mon Apr 29 00:55:58 2024 -0700

    Remove home marker updates (mastodon#22721)

commit 7201f99
Author: Matt Jankowski <matt@jankowski.online>
Date:   Mon Apr 29 03:41:59 2024 -0400

    Change default ruby version to 3.3.1 (mastodon#28013)
  • Loading branch information
mgmn committed Apr 29, 2024
1 parent a492647 commit edf2d3a
Show file tree
Hide file tree
Showing 146 changed files with 602 additions and 555 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Expand Up @@ -70,7 +70,7 @@ services:
hard: -1

libretranslate:
image: libretranslate/libretranslate:v1.5.6
image: libretranslate/libretranslate:v1.5.7
restart: unless-stopped
volumes:
- lt-data:/home/libretranslate/.local
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin-download.yml
Expand Up @@ -52,7 +52,7 @@ jobs:

# Create or update the pull request
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6.0.4
uses: peter-evans/create-pull-request@v6.0.5
with:
commit-message: 'New Crowdin translations'
title: 'New Crowdin Translations (automated)'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-ruby.yml
Expand Up @@ -115,8 +115,8 @@ jobs:
matrix:
ruby-version:
- '3.1'
- '3.2'
- '.ruby-version'
- '3.3'
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -190,8 +190,8 @@ jobs:
matrix:
ruby-version:
- '3.1'
- '3.2'
- '.ruby-version'
- '3.3'

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -289,8 +289,8 @@ jobs:
matrix:
ruby-version:
- '3.1'
- '3.2'
- '.ruby-version'
- '3.3'
search-image:
- docker.elastic.co/elasticsearch/elasticsearch:7.17.13
include:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
@@ -1 +1 @@
3.2.4
3.3.1
6 changes: 3 additions & 3 deletions Dockerfile
Expand Up @@ -7,15 +7,15 @@
ARG TARGETPLATFORM=${TARGETPLATFORM}
ARG BUILDPLATFORM=${BUILDPLATFORM}

# Ruby image to use for base image, change with [--build-arg RUBY_VERSION="3.2.4"]
ARG RUBY_VERSION="3.2.4"
# Ruby image to use for base image, change with [--build-arg RUBY_VERSION="3.3.1"]
ARG RUBY_VERSION="3.3.1"
# # Node version to use in base image, change with [--build-arg NODE_MAJOR_VERSION="20"]
ARG NODE_MAJOR_VERSION="20"
# Debian image to use for base image, change with [--build-arg DEBIAN_VERSION="bookworm"]
ARG DEBIAN_VERSION="bookworm"
# Node image to use for base image based on combined variables (ex: 20-bookworm-slim)
FROM docker.io/node:${NODE_MAJOR_VERSION}-${DEBIAN_VERSION}-slim as node
# Ruby image to use for base image based on combined variables (ex: 3.2.4-slim-bookworm)
# Ruby image to use for base image based on combined variables (ex: 3.3.1-slim-bookworm)
FROM docker.io/ruby:${RUBY_VERSION}-slim-${DEBIAN_VERSION} as ruby

# Resulting version string is vX.X.X-MASTODON_VERSION_PRERELEASE+MASTODON_VERSION_METADATA
Expand Down
20 changes: 10 additions & 10 deletions Gemfile.lock
Expand Up @@ -102,17 +102,17 @@ GEM
attr_required (1.0.2)
awrence (1.2.1)
aws-eventstream (1.3.0)
aws-partitions (1.916.0)
aws-sdk-core (3.192.1)
aws-partitions (1.920.0)
aws-sdk-core (3.193.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.79.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-kms (1.80.0)
aws-sdk-core (~> 3, >= 3.193.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.147.0)
aws-sdk-core (~> 3, >= 3.192.0)
aws-sdk-s3 (1.148.0)
aws-sdk-core (~> 3, >= 3.193.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
Expand Down Expand Up @@ -304,7 +304,7 @@ GEM
activesupport (>= 5.1)
haml (>= 4.0.6)
railties (>= 5.1)
haml_lint (0.57.0)
haml_lint (0.58.0)
haml (>= 5.0)
parallel (~> 1.10)
rainbow
Expand Down Expand Up @@ -498,7 +498,7 @@ GEM
orm_adapter (0.5.0)
ox (2.14.18)
parallel (1.24.0)
parser (3.3.0.5)
parser (3.3.1.0)
ast (~> 2.4.1)
racc
parslet (2.0.0)
Expand Down Expand Up @@ -644,7 +644,7 @@ GEM
rspec-mocks (~> 3.0)
sidekiq (>= 5, < 8)
rspec-support (3.13.1)
rubocop (1.63.3)
rubocop (1.63.4)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand Down Expand Up @@ -952,7 +952,7 @@ DEPENDENCIES
xorcist (~> 1.1)

RUBY VERSION
ruby 3.2.3p157
ruby 3.3.1p55

BUNDLED WITH
2.5.9
@@ -1,5 +1,5 @@
import './public-path';
import main from "mastodon/main";
import main from 'mastodon/main';

import { start } from '../mastodon/common';
import { loadLocale } from '../mastodon/locales';
Expand All @@ -10,6 +10,6 @@ start();
loadPolyfills()
.then(loadLocale)
.then(main)
.catch(e => {
.catch((e: unknown) => {
console.error(e);
});
Expand Up @@ -2,7 +2,9 @@ import './public-path';
import ready from '../mastodon/ready';

ready(() => {
const image = document.querySelector('img');
const image = document.querySelector<HTMLImageElement>('img');

if (!image) return;

image.addEventListener('mouseenter', () => {
image.src = '/oops.gif';
Expand All @@ -11,4 +13,6 @@ ready(() => {
image.addEventListener('mouseleave', () => {
image.src = '/oops.png';
});
}).catch((e: unknown) => {
console.error(e);
});
File renamed without changes.
File renamed without changes.
Expand Up @@ -2,7 +2,7 @@
// to share the same assets regardless of instance configuration.
// See https://webpack.js.org/guides/public-path/#on-the-fly

function removeOuterSlashes(string) {
function removeOuterSlashes(string: string) {
return string.replace(/^\/*/, '').replace(/\/*$/, '');
}

Expand All @@ -15,7 +15,9 @@ function formatPublicPath(host = '', path = '') {
return `${formattedHost}/${formattedPath}/`;
}

const cdnHost = document.querySelector('meta[name=cdn-host]');
const cdnHost = document.querySelector<HTMLMetaElement>('meta[name=cdn-host]');

// eslint-disable-next-line no-undef
__webpack_public_path__ = formatPublicPath(cdnHost ? cdnHost.content : '', process.env.PUBLIC_OUTPUT_PATH);
__webpack_public_path__ = formatPublicPath(
cdnHost ? cdnHost.content : '',
process.env.PUBLIC_OUTPUT_PATH,
);
Expand Up @@ -2,7 +2,7 @@ import './public-path';
import { createRoot } from 'react-dom/client';

import { start } from '../mastodon/common';
import ComposeContainer from '../mastodon/containers/compose_container';
import ComposeContainer from '../mastodon/containers/compose_container';
import { loadPolyfills } from '../mastodon/polyfills';
import ready from '../mastodon/ready';

Expand All @@ -16,17 +16,21 @@ function loaded() {

if (!attr) return;

const props = JSON.parse(attr);
const props = JSON.parse(attr) as object;
const root = createRoot(mountNode);

root.render(<ComposeContainer {...props} />);
}
}

function main() {
ready(loaded);
ready(loaded).catch((error: unknown) => {
console.error(error);
});
}

loadPolyfills().then(main).catch(error => {
console.error(error);
});
loadPolyfills()
.then(main)
.catch((error: unknown) => {
console.error(error);
});
42 changes: 0 additions & 42 deletions app/javascript/entrypoints/sign_up.js

This file was deleted.

48 changes: 48 additions & 0 deletions app/javascript/entrypoints/sign_up.ts
@@ -0,0 +1,48 @@
import './public-path';
import axios from 'axios';

import ready from '../mastodon/ready';

async function checkConfirmation() {
const response = await axios.get('/api/v1/emails/check_confirmation');

if (response.data) {
window.location.href = '/start';
}
}

ready(() => {
setInterval(() => {
void checkConfirmation();
}, 5000);

document
.querySelectorAll<HTMLButtonElement>('button.timer-button')
.forEach((button) => {
let counter = 30;

const container = document.createElement('span');

const updateCounter = () => {
container.innerText = ` (${counter})`;
};

updateCounter();

const countdown = setInterval(() => {
counter--;

if (counter === 0) {
button.disabled = false;
button.removeChild(container);
clearInterval(countdown);
} else {
updateCounter();
}
}, 1000);

button.appendChild(container);
});
}).catch((e: unknown) => {
throw e;
});
22 changes: 0 additions & 22 deletions app/javascript/mastodon/actions/markers.ts
@@ -1,5 +1,3 @@
import { List as ImmutableList } from 'immutable';

import { debounce } from 'lodash';

import type { MarkerJSON } from 'mastodon/api_types/markers';
Expand Down Expand Up @@ -71,19 +69,6 @@ interface MarkerParam {
last_read_id?: string;
}

function getLastHomeId(state: RootState): string | undefined {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return (
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
state
// @ts-expect-error state.timelines is not yet typed
.getIn(['timelines', 'home', 'items'], ImmutableList())
// @ts-expect-error state.timelines is not yet typed
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
.find((item) => item !== null)
);
}

function getLastNotificationId(state: RootState): string | undefined {
// @ts-expect-error state.notifications is not yet typed
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call
Expand All @@ -93,15 +78,8 @@ function getLastNotificationId(state: RootState): string | undefined {
const buildPostMarkersParams = (state: RootState) => {
const params = {} as { home?: MarkerParam; notifications?: MarkerParam };

const lastHomeId = getLastHomeId(state);
const lastNotificationId = getLastNotificationId(state);

if (lastHomeId && compareId(lastHomeId, state.markers.home) > 0) {
params.home = {
last_read_id: lastHomeId,
};
}

if (
lastNotificationId &&
compareId(lastNotificationId, state.markers.notifications) > 0
Expand Down
6 changes: 1 addition & 5 deletions app/javascript/mastodon/components/badge.jsx
Expand Up @@ -7,7 +7,7 @@ import PersonIcon from '@/material-icons/400-24px/person.svg?react';
import SmartToyIcon from '@/material-icons/400-24px/smart_toy.svg?react';


export const Badge = ({ icon, label, domain, roleId }) => (
export const Badge = ({ icon = <PersonIcon />, label, domain, roleId }) => (
<div className='account-role' data-account-role-id={roleId}>
{icon}
{label}
Expand All @@ -22,10 +22,6 @@ Badge.propTypes = {
roleId: PropTypes.string
};

Badge.defaultProps = {
icon: <PersonIcon />,
};

export const GroupBadge = () => (
<Badge icon={<GroupsIcon />} label={<FormattedMessage id='account.badges.group' defaultMessage='Group' />} />
);
Expand Down

0 comments on commit edf2d3a

Please sign in to comment.