diff --git a/assets/app/view/home.rb b/assets/app/view/home.rb index ef393d97c1..0e922e66af 100644 --- a/assets/app/view/home.rb +++ b/assets/app/view/home.rb @@ -20,8 +20,7 @@ def render your_games, other_games = @games.partition { |game| user_in_game?(@user, game) || user_owns_game?(@user, game) } children = [ - render_header, - h(Welcome, show_intro: your_games.empty?), + h(Welcome), h(Chat, user: @user, connection: @connection), ] @@ -103,11 +102,5 @@ def render_filter_row(children) filter_row = h(GameRowFilters) children << filter_row if filter_row end - - def render_header - h('div#greeting.card_header', [ - h(:h2, "Welcome#{@user ? ' ' + @user['name'] : ''}!"), - ]) - end end end diff --git a/assets/app/view/welcome.rb b/assets/app/view/welcome.rb index 82fd00941e..2b221e5375 100644 --- a/assets/app/view/welcome.rb +++ b/assets/app/view/welcome.rb @@ -5,11 +5,10 @@ module View class Welcome < Snabberb::Component needs :app_route, default: nil, store: true - needs :show_intro, default: true def render children = [render_notification] - children << render_introduction if @show_intro + children << render_introduction children << render_buttons h('div#welcome.half', children) @@ -20,17 +19,8 @@ def render_notification

1847AE is in beta. 1894 is in beta. 1822CA is in alpha.

-

Learn how to get notifications by email, Slack, Discord, and Telegram.

-

Please submit problem reports and make suggestions for improvements on - GitHub. Join the - 18xx Slack. - to chat about 18xx and the website. -

-

The 18xx.games Wiki has rules, maps, - and other information about all the games, along with an FAQ.

-

Support our publishers: #{Lib::Publisher.link_list.join}.

-

You can support this project on Patreon.

+

Report bugs and make feature requests on GitHub.

MESSAGE props = { @@ -49,16 +39,12 @@ def render_notification def render_introduction message = <<~MESSAGE -

18xx.games is a website where you can play async or real-time 18xx games (based on the system originally devised by the brilliant Francis Tresham)! - If you are new to 18xx games then Shikoku 1889, 18Chesapeake, or 18MS are good games to begin with.

- -

You can play locally with hot seat mode without an account. If you want to play multiplayer, you'll need to create an account.

- -

If you look at other people's games, you can make moves to play around but it won't affect them and changes won't be saved. - You can clone games in the tools tab and then play around locally.

- -

In multiplayer games, you'll also be able to make moves for other players, this is so people can say 'pass me this SR' and you don't - need to wait. To use this feature in a game, enable "Master Mode" in the Tools tab. Please use it politely!

+

Check out the FAQ, keyboard shortcuts and the Wiki

+

Find games in the chat or on (unofficial) Discord servers

+

Setup turn notifications via webhook to Slack, Discord, and Telegram

+

Ask questions in #18xxgames on the 18XX Slack

+

Buy physical copies of 18XX games from publishers:
#{Lib::Publisher.link_list.join}.

+

Keep the servers running by becoming a member on Patreon

MESSAGE props = { diff --git a/spec/assets_spec.rb b/spec/assets_spec.rb index 7126711649..2091a38ba7 100644 --- a/spec/assets_spec.rb +++ b/spec/assets_spec.rb @@ -228,11 +228,11 @@ def render(**needs) describe '#html' do it 'renders logged out' do - expect(render).to include('Welcome!') + expect(render).to include('18xx.Games') end it 'renders home logged in' do - expect(render(user: { name: 'toby', settings: { consent: true } })).to include('Welcome toby!') + expect(render(user: { name: 'toby', settings: { consent: true } })).to include('Profile (toby)') end it 'consent logged in' do