Skip to content

Commit

Permalink
Bagel o themes (#9)
Browse files Browse the repository at this point in the history
* Tangerine UI

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update themes.yml

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update localized string name

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update themes.yml

Rolle's BirdUI theme

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Create mastodon-bird-ui-dark.scss

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Create mastodon-bird-ui-light.scss

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Create mastodon-bird-ui-contrast

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Create mastodon-bird-ui-accessible

Support for accessibility

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update en.yml

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Rename mastodon-bird-ui-contrast to mastodon-bird-ui-contrast.scss

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Rename mastodon-bird-ui-accessible to mastodon-bird-ui-accessible.scss

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Add files via upload

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update themes.yml

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update themes.yml

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update en.yml

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update layout-single-column.scss

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update layout-single-column.scss

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update layout-multiple-columns.scss

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update layout-multiple-columns.scss

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update layout-multiple-columns.scss

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update layout-single-column.scss

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update layout-single-column.scss

Compose-form is not taking effects without `!important`

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update layout-multiple-columns.scss

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Change default ruby version to 3.3.1 (mastodon#28013)

* Remove home marker updates (mastodon#22721)

* Convert easy entrypoints files to Typescript (mastodon#30102)

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

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

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

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

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

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

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

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

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

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

* 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>

* New Crowdin Translations (automated) (mastodon#30092)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Disable `Style/SignalException` cop (mastodon#30064)

* Remove unused memoization in `CustomFilter#expires_in` method (mastodon#30117)

* Update dependency ws to v8.17.0 (mastodon#30097)

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

* Added peach theme by nileane

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Delete app/javascript/styles/mastodon-bird-ui/layout-multiple-columns.css

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Delete app/javascript/styles/mastodon-bird-ui/layout-single-column.css

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update layout-single-column.scss

Restored attribution to the original author and indicating the version of my modified work.

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update layout-multiple-columns.scss

Restore attribution to the original author and indicating the version of my modified work.

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update layout-single-column.scss

Fixed incorrect branch tag from ronilaukkarinen

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update themes.yml

Added support for peach theme

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Update en.yml

Added support for peach theme

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

* Added support for peach theme

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>

---------

Signed-off-by: Nathan Sparrow <24910097+DismalShadowX@users.noreply.github.com>
Co-authored-by: Matt Jankowski <matt@jankowski.online>
Co-authored-by: David Beck <davbeck@users.noreply.github.com>
Co-authored-by: Renaud Chaput <renchap@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <noreply@github.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
  • Loading branch information
8 people committed Apr 29, 2024
1 parent 7bb9b4f commit 8b6ebf7
Show file tree
Hide file tree
Showing 154 changed files with 1,159 additions and 1,080 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
8 changes: 0 additions & 8 deletions .rubocop_todo.yml
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
@@ -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 8b6ebf7

Please sign in to comment.