Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bagel o themes #9

Merged
merged 60 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
bee21c1
Tangerine UI
DismalShadowX Apr 23, 2024
c562340
Update themes.yml
DismalShadowX Apr 23, 2024
30e3bff
Update localized string name
DismalShadowX Apr 23, 2024
efadf34
Update themes.yml
DismalShadowX Apr 23, 2024
6e94a18
Create mastodon-bird-ui-dark.scss
DismalShadowX Apr 23, 2024
80244c5
Create mastodon-bird-ui-light.scss
DismalShadowX Apr 23, 2024
59a3693
Create mastodon-bird-ui-contrast
DismalShadowX Apr 23, 2024
04a4434
Create mastodon-bird-ui-accessible
DismalShadowX Apr 23, 2024
b844013
Update en.yml
DismalShadowX Apr 23, 2024
4538343
Rename mastodon-bird-ui-contrast to mastodon-bird-ui-contrast.scss
DismalShadowX Apr 23, 2024
dcc90e8
Rename mastodon-bird-ui-accessible to mastodon-bird-ui-accessible.scss
DismalShadowX Apr 23, 2024
e10d61d
Add files via upload
DismalShadowX Apr 23, 2024
61177b8
Update themes.yml
DismalShadowX Apr 23, 2024
d8614d2
Update themes.yml
DismalShadowX Apr 23, 2024
b5598f7
Update en.yml
DismalShadowX Apr 23, 2024
02440aa
Update layout-single-column.scss
DismalShadowX Apr 23, 2024
3577c2d
Update layout-single-column.scss
DismalShadowX Apr 23, 2024
dfb2a05
Update layout-multiple-columns.scss
DismalShadowX Apr 23, 2024
f71b3be
Update layout-multiple-columns.scss
DismalShadowX Apr 23, 2024
a90a4d7
Update layout-multiple-columns.scss
DismalShadowX Apr 23, 2024
4adc394
Update layout-single-column.scss
DismalShadowX Apr 23, 2024
66205e5
Update layout-single-column.scss
DismalShadowX Apr 24, 2024
6e35916
Update layout-multiple-columns.scss
DismalShadowX Apr 24, 2024
50f952f
Merge branch 'Alpha' into Bagel-O-Themes
DismalShadowX Apr 28, 2024
7201f99
Change default ruby version to 3.3.1 (#28013)
mjankowski Apr 29, 2024
4f4b779
Remove home marker updates (#22721)
davbeck Apr 29, 2024
3690906
Convert easy entrypoints files to Typescript (#30102)
renchap Apr 29, 2024
d8a4cea
Update dependency haml_lint to v0.58.0 (#30094)
renovate[bot] Apr 29, 2024
31f3dd5
Update dependency rubocop to v1.63.4 (#30096)
renovate[bot] Apr 29, 2024
c0584a6
Update devDependencies (non-major) (#30109)
renovate[bot] Apr 29, 2024
2322336
Update eslint (non-major) (#30110)
renovate[bot] Apr 29, 2024
0efa985
Update libretranslate/libretranslate Docker tag to v1.5.7 (#30111)
renovate[bot] Apr 29, 2024
00aec2f
Update peter-evans/create-pull-request action to v6.0.5 (#30112)
renovate[bot] Apr 29, 2024
9be7efe
New Crowdin Translations (automated) (#30092)
github-actions[bot] Apr 29, 2024
4527e01
Convert `entrypoints/sign_up` to Typescript (#30106)
renchap Apr 29, 2024
f0c9cba
Use `EXPIRATION_DURATIONS` constant in `CustomFilter` class (#30088)
mjankowski Apr 29, 2024
2123281
Move `Account` limits to constants (#30087)
mjankowski Apr 29, 2024
6931cf5
Update dependency aws-sdk-s3 to v1.148.0 (#30076)
renovate[bot] Apr 29, 2024
bbf1b60
Remove unused `Account.popular` scope (#30068)
mjankowski Apr 29, 2024
2739d8d
Use shorter `render` call in `admin/webhooks` view (#30071)
mjankowski Apr 29, 2024
b9b4db4
Remove usage of deprecated `defaultTypes` on React functional compone…
renchap Apr 29, 2024
a9816f0
Use shared form partial for `admin/warning_presets` views (#30069)
mjankowski Apr 29, 2024
e336466
Use shared form partial for `admin/rules` views (#30067)
mjankowski Apr 29, 2024
95e9de5
Prevent accidental serialization of `Account` and `User` records (#30…
ClearlyClaire Apr 29, 2024
ac7f4d5
Use composable query in `Status.without_replies` scope (#30086)
mjankowski Apr 29, 2024
7d3fe2b
Add loading indicator and empty result message to advanced interface …
ClearlyClaire Apr 29, 2024
f1a4b4e
Disable `Style/SignalException` cop (#30064)
mjankowski Apr 29, 2024
924af40
Remove unused memoization in `CustomFilter#expires_in` method (#30117)
mjankowski Apr 29, 2024
f5d6362
Update dependency ws to v8.17.0 (#30097)
renovate[bot] Apr 29, 2024
4d12854
Added peach theme by nileane
DismalShadowX Apr 29, 2024
e8c3bce
Delete app/javascript/styles/mastodon-bird-ui/layout-multiple-columns…
DismalShadowX Apr 29, 2024
01f05d9
Delete app/javascript/styles/mastodon-bird-ui/layout-single-column.css
DismalShadowX Apr 29, 2024
36a4a62
Update layout-single-column.scss
DismalShadowX Apr 29, 2024
1b2eaa4
Update layout-multiple-columns.scss
DismalShadowX Apr 29, 2024
b2bf3c6
Update layout-single-column.scss
DismalShadowX Apr 29, 2024
7e7e018
Update themes.yml
DismalShadowX Apr 29, 2024
6d4766d
Update en.yml
DismalShadowX Apr 29, 2024
041de35
Added support for peach theme
DismalShadowX Apr 29, 2024
b317a49
Merge branch 'mastodon:main' into Bagel-O-Themes
DismalShadowX Apr 29, 2024
3beb789
Merge branch 'Alpha' into Bagel-O-Themes
DismalShadowX Apr 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

# Create or update the pull request
- name: Create Pull Request
uses: peter-evans/[email protected].4
uses: peter-evans/[email protected].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
Original file line number Diff line number Diff line change
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
8 changes: 0 additions & 8 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,6 @@ Style/SafeNavigation:
Exclude:
- 'app/models/concerns/account/finder_concern.rb'

# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: only_raise, only_fail, semantic
Style/SignalException:
Exclude:
- 'lib/devise/strategies/two_factor_ldap_authenticatable.rb'
- 'lib/devise/strategies/two_factor_pam_authenticatable.rb'

# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Mode.
Style/StringConcatenation:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.4
3.3.1
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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);
});
Original file line number Diff line number Diff line change
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);
});
Original file line number Diff line number Diff line change
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,
);
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Loading