diff --git a/app/views/pages/live.html.erb b/app/views/pages/live.html.erb index f4264283a..ad97a271c 100644 --- a/app/views/pages/live.html.erb +++ b/app/views/pages/live.html.erb @@ -64,6 +64,7 @@ <% else %>
-

Nothing is live right now. Check out the Events Page for a full schedule.

+

We are working on more ways to bring live coding to the community.

+

Check out the integrations tab in your settings.

<% end %> diff --git a/app/views/users/_integrations.html.erb b/app/views/users/_integrations.html.erb index eeb21dc6d..1a8efb0f7 100644 --- a/app/views/users/_integrations.html.erb +++ b/app/views/users/_integrations.html.erb @@ -6,3 +6,13 @@ <%= javascript_pack_tag "githubRepos", defer: true %> <% end %> + +<%= form_for(@user) do |f| %> +

Live Streaming (Beta)

+
+ <%= f.label :twitch_username, "Twitch Username" %> + <%= f.text_field :twitch_username %> +
+

Add your Twitch username, and then checkout dev.to/live/<%= @user.username %>.

+

It's a new thing we're trying out. Soon we'll be able to indicate when any community member is currently streaming.

+<% end %> diff --git a/app/views/users/_profile.html.erb b/app/views/users/_profile.html.erb index 29a8e7a85..fbb416fb4 100644 --- a/app/views/users/_profile.html.erb +++ b/app/views/users/_profile.html.erb @@ -150,11 +150,6 @@ <%= f.label :twitch_url, "Twitch URL" %> <%= f.url_field :twitch_url %> -

Streaming

-
- <%= f.label :twitch_username, "Twitch User Name" %> - <%= f.text_field :twitch_username %> -
<%= f.hidden_field :tab, value: @tab %> diff --git a/config/routes.rb b/config/routes.rb index a190967b6..2c972a2cd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -156,6 +156,7 @@ Rails.application.routes.draw do get "/connect/:slug" => "chat_channels#index" post "/chat_channels/create_chat" => "chat_channels#create_chat" post "/chat_channels/block_chat" => "chat_channels#block_chat" + get "/live/:username" => "twitch_live_streams#show" post "/pusher/auth" => "pusher#auth" diff --git a/spec/requests/pages_spec.rb b/spec/requests/pages_spec.rb index 21d99f106..1574ea6c6 100644 --- a/spec/requests/pages_spec.rb +++ b/spec/requests/pages_spec.rb @@ -77,7 +77,7 @@ RSpec.describe "Pages", type: :request do context "when nothing is live" do it "shows the correct message" do get "/live" - expect(response.body).to include("Nothing is live right now") + expect(response.body).to include("We are working on more ways to bring live coding to the community") end end end