Compare commits

...

24 Commits
main ... main

Author SHA1 Message Date
Hampton Moore 652882a81b Add prefers-color-scheme based theme 2022-11-09 14:33:12 -05:00
Ariadne Conill 1e00edfc35 config: production: traefik does not support sendfile mode 2022-11-08 09:59:32 +00:00
Ariadne Conill 8d07052d6d version: change to +glitch+th for client compatibility 2022-11-08 07:16:56 +00:00
Ariadne Conill 2c4738f592 version: change +glitch suffix to +th, since we have local modifications 2022-11-07 23:24:11 +00:00
Ariadne Conill 2bee8024c2 Merge https://gitea.treehouse.systems/treehouse/mastodon-glitch into rebase/4.0.0rc2 2022-11-07 23:20:04 +00:00
Ariadne Conill 10c928a72e fix autocomplete 2022-11-07 17:32:46 +00:00
Ariadne Conill d0e2d7df37 config: CSP: add unsafe-eval for scripts 2022-11-07 17:30:16 +00:00
Ariadne Conill 152f5c7983 app: api: base_controller: allow API access to be configurable 2022-11-06 19:13:50 +00:00
Ariadne Conill 7ceda772e4 locales: fix YAML quoting issue
Psych::SyntaxError: (/opt/mastodon/config/locales/simple_form.en.yml): mapping values are not allowed in this context at line 102 column 103
2022-11-06 18:43:54 +00:00
Ariadne Conill 8fb8a2667a Merge branch 'rebase/4.0.0rc1' 2022-11-06 18:23:41 +00:00
kouhai dev 6b7b80a892 update account request question prompt 2022-11-06 18:22:00 +00:00
Ariadne Conill a82113dbd9 vanilla: emoji: use 63x63 grid for emoji 2022-11-06 18:21:57 +00:00
Ariadne Conill 728ed66f8a glitch: emoji: set sprite sheet to 63x63 2022-11-06 18:21:52 +00:00
Ariadne Conill 117d2ed9c7 dockerfile: implement emoji-mart patch 2022-11-06 18:20:15 +00:00
Ariadne Conill 4c38a2d32c update emoji-mart sprite sheet for emoji 13.1 2022-11-06 18:20:15 +00:00
Ariadne Conill c01750a3dd add emoji 13.1 data for emoji-mart 2022-11-06 18:20:15 +00:00
kouhai dev 0ae6ca72de update account request question prompt 2022-11-06 01:36:06 -07:00
Ariadne Conill 47493323fa fixup! 2022-06-12 01:07:56 +00:00
Ariadne Conill 5f634378a2 glitch: fixup! 2022-06-12 01:07:52 +00:00
Ariadne Conill 2298d5b3ce vanilla: emoji: use 63x63 grid for emoji 2022-06-12 00:45:41 +00:00
Ariadne Conill 2ccc011e3f glitch: emoji: set sprite sheet to 63x63 2022-06-12 00:43:28 +00:00
Ariadne Conill 39f42334c2 dockerfile: implement emoji-mart patch 2022-06-11 23:57:03 +00:00
Ariadne Conill 648cad5619 update emoji-mart sprite sheet for emoji 13.1 2022-06-11 23:52:40 +00:00
Ariadne Conill a0479b5d4c add emoji 13.1 data for emoji-mart 2022-06-11 23:51:31 +00:00
14 changed files with 47 additions and 19 deletions

View File

@ -111,7 +111,10 @@ ENV BIND="0.0.0.0"
USER mastodon
# Precompile assets
# TODO(kaniini): Yarn install is invoked to allow us to pre-patch emoji-mart
# we should set up a deviation instead.
RUN cd ~ && \
yarn install && cp ./emoji_data/all.json ./node_modules/emoji-mart/data/all.json && \
OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
yarn cache clean

View File

@ -39,6 +39,8 @@ const notFoundFn = () => (
set='twitter'
size={32}
sheetSize={32}
sheetColumns={60}
sheetRows={60}
backgroundImageFn={backgroundImageFn}
/>
@ -97,12 +99,12 @@ class ModifierPickerMenu extends React.PureComponent {
return (
<div className='emoji-picker-dropdown__modifiers__menu' style={{ display: active ? 'block' : 'none' }} ref={this.setRef}>
<button onClick={this.handleClick} data-index={1}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={1} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
<button onClick={this.handleClick} data-index={2}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={2} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
<button onClick={this.handleClick} data-index={3}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={3} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
<button onClick={this.handleClick} data-index={4}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={4} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
<button onClick={this.handleClick} data-index={5}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={5} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
<button onClick={this.handleClick} data-index={6}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={6} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
<button onClick={this.handleClick} data-index={1}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={1} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
<button onClick={this.handleClick} data-index={2}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={2} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
<button onClick={this.handleClick} data-index={3}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={3} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
<button onClick={this.handleClick} data-index={4}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={4} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
<button onClick={this.handleClick} data-index={5}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={5} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
<button onClick={this.handleClick} data-index={6}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={6} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
</div>
);
}
@ -137,7 +139,7 @@ class ModifierPicker extends React.PureComponent {
return (
<div className='emoji-picker-dropdown__modifiers'>
<Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={modifier} onClick={this.handleClick} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} />
<Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={modifier} onClick={this.handleClick} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} />
<ModifierPickerMenu active={active} onSelect={this.handleSelect} onClose={this.props.onClose} />
</div>
);
@ -278,6 +280,8 @@ class EmojiPickerMenu extends React.PureComponent {
perLine={8}
emojiSize={22}
sheetSize={32}
sheetColumns={60}
sheetRows={60}
custom={buildCustomEmojis(custom_emojis)}
color=''
emoji=''

View File

@ -38,6 +38,8 @@ const notFoundFn = () => (
set='twitter'
size={32}
sheetSize={32}
sheetColumns={60}
sheetRows={60}
backgroundImageFn={backgroundImageFn}
/>
@ -96,12 +98,12 @@ class ModifierPickerMenu extends React.PureComponent {
return (
<div className='emoji-picker-dropdown__modifiers__menu' style={{ display: active ? 'block' : 'none' }} ref={this.setRef}>
<button type='button' onClick={this.handleClick} data-index={1}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={1} backgroundImageFn={backgroundImageFn} /></button>
<button type='button' onClick={this.handleClick} data-index={2}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={2} backgroundImageFn={backgroundImageFn} /></button>
<button type='button' onClick={this.handleClick} data-index={3}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={3} backgroundImageFn={backgroundImageFn} /></button>
<button type='button' onClick={this.handleClick} data-index={4}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={4} backgroundImageFn={backgroundImageFn} /></button>
<button type='button' onClick={this.handleClick} data-index={5}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={5} backgroundImageFn={backgroundImageFn} /></button>
<button type='button' onClick={this.handleClick} data-index={6}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={6} backgroundImageFn={backgroundImageFn} /></button>
<button type='button' onClick={this.handleClick} data-index={1}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={1} backgroundImageFn={backgroundImageFn} /></button>
<button type='button' onClick={this.handleClick} data-index={2}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={2} backgroundImageFn={backgroundImageFn} /></button>
<button type='button' onClick={this.handleClick} data-index={3}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={3} backgroundImageFn={backgroundImageFn} /></button>
<button type='button' onClick={this.handleClick} data-index={4}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={4} backgroundImageFn={backgroundImageFn} /></button>
<button type='button' onClick={this.handleClick} data-index={5}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={5} backgroundImageFn={backgroundImageFn} /></button>
<button type='button' onClick={this.handleClick} data-index={6}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={6} backgroundImageFn={backgroundImageFn} /></button>
</div>
);
}
@ -136,7 +138,7 @@ class ModifierPicker extends React.PureComponent {
return (
<div className='emoji-picker-dropdown__modifiers'>
<Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={modifier} onClick={this.handleClick} backgroundImageFn={backgroundImageFn} />
<Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={modifier} onClick={this.handleClick} backgroundImageFn={backgroundImageFn} />
<ModifierPickerMenu active={active} onSelect={this.handleSelect} onClose={this.props.onClose} />
</div>
);
@ -277,6 +279,8 @@ class EmojiPickerMenu extends React.PureComponent {
perLine={8}
emojiSize={22}
sheetSize={32}
sheetColumns={60}
sheetRows={60}
custom={buildCustomEmojis(custom_emojis)}
color=''
emoji=''

View File

@ -0,0 +1,4 @@
@import 'flavours/glitch/styles/mastodon';
@media (prefers-color-scheme: light) {
@import 'flavours/glitch/styles/mastodon-light';
}

View File

@ -0,0 +1,4 @@
en:
skins:
glitch:
mastodon-system: Mastodon (system-preferred)

View File

@ -4,5 +4,5 @@ en:
mastodon-light: Mastodon (light)
es:
skins:
glitch:
vanilla:
mastodon-light: Mastodon (claro)

View File

@ -0,0 +1,4 @@
@import 'styles/mastodon';
@media (prefers-color-scheme: light) {
@import 'styles/mastodon-light';
}

View File

@ -0,0 +1,4 @@
en:
skins:
vanilla:
mastodon-system: Mastodon (system-preferred)

View File

@ -39,7 +39,7 @@ Rails.application.configure do
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
# Allow to specify public IP of reverse proxy if it's needed
config.action_dispatch.trusted_proxies = ENV['TRUSTED_PROXY_IP'].split(/(?:\s*,\s*|\s+)/).map { |item| IPAddr.new(item) } if ENV['TRUSTED_PROXY_IP'].present?

View File

@ -31,7 +31,7 @@ if Rails.env.production?
p.base_uri :none
p.default_src :none
p.frame_ancestors :none
p.script_src :self, assets_host
p.script_src :self, assets_host, :unsafe_eval
p.font_src :self, assets_host
p.img_src :self, :data, :blob, *data_hosts
p.style_src :self, assets_host

View File

@ -99,7 +99,7 @@ en:
imports:
data: CSV file exported from another Mastodon server
invite_request:
text: This will help us review your application
text: "Be sure to provide at least one link to an established account on another social website: GitHub, Twitter, or a personal blog or website. This will help us review your request in a timely manner."
ip_block:
comment: Optional. Remember why you added this rule.
expires_in: IP addresses are a finite resource, they are sometimes shared and often change hands. For this reason, indefinite IP blocks are not recommended.

1
emoji_data/all.json Normal file

File diff suppressed because one or more lines are too long

View File

@ -21,7 +21,7 @@ module Mastodon
end
def suffix
'+glitch'
'+glitch+th'
end
def to_a

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB