Skip to content

Commit 70ff7ff

Browse files
committed
fix(auth): Use WordmarkLogo react component in auth layout to include lightbg asset
* styles: fix align and height Signed-off-by: lindwurm <lindwurm.q@gmail.com>
1 parent 5cfd483 commit 70ff7ff

3 files changed

Lines changed: 17 additions & 5 deletions

File tree

app/javascript/entrypoints/public.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import loadKeyboardExtensions from '../mastodon/load_keyboard_extensions';
2020
import { loadLocale, getLocale } from '../mastodon/locales';
2121
import { loadPolyfills } from '../mastodon/polyfills';
2222
import ready from '../mastodon/ready';
23+
import { WordmarkLogo } from '@/mastodon/components/logo';
2324

2425
import 'cocoon-js-vanilla';
2526

@@ -183,6 +184,12 @@ function loaded() {
183184
});
184185
}
185186

187+
const authLogoHost = document.querySelector<HTMLElement>('.logo-react-root');
188+
if (authLogoHost) {
189+
const root = createRoot(authLogoHost);
190+
root.render(<WordmarkLogo />);
191+
}
192+
186193
on(
187194
'input',
188195
'input#user_account_attributes_username',

app/javascript/styles/mods/custom.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,12 @@
3838
.compose-form__submit > button {
3939
padding: 7px 50%;
4040
}
41+
42+
.logo-react-root {
43+
text-align: center;
44+
45+
img {
46+
height: 48px;
47+
width: auto;
48+
}
49+
}

app/views/layouts/auth.html.haml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44
- content_for :content do
55
.container-alt
66
.logo-container
7-
- if within_authorization_flow?
8-
= logo_as_symbol(:wordmark)
9-
- else
10-
= link_to root_path do
11-
= logo_as_symbol(:wordmark)
7+
.logo-react-root
128

139
.form-container
1410
= render 'flashes'

0 commit comments

Comments
 (0)