Make a couple changes to Twitch MVP before push (#2622)

This commit is contained in:
Ben Halpern 2019-04-29 18:53:09 -04:00 committed by GitHub
parent ec388804df
commit 4b91dd5912
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 7 deletions

View file

@ -64,6 +64,7 @@
</div>
<% else %>
<div class="live-upcoming-info">
<h1>Nothing is live right now. Check out the <a href="/events">Events Page</a> for a full schedule.</h1>
<h1>We are working on more ways to bring live coding to the community.</h1>
<h2>Check out <a href="/settings/integrations">the integrations tab in your settings</a>.</h2>
</div>
<% end %>

View file

@ -6,3 +6,13 @@
</div>
<%= javascript_pack_tag "githubRepos", defer: true %>
<% end %>
<%= form_for(@user) do |f| %>
<h2>Live Streaming (Beta)</h2>
<div class="field">
<%= f.label :twitch_username, "Twitch Username" %>
<%= f.text_field :twitch_username %>
</div>
<p><em>Add your Twitch username, and then checkout <a href="/live/<%= @user.username %>">dev.to/live/<%= @user.username %></a>.</em></p>
<p><em>It's a new thing we're trying out. Soon we'll be able to indicate when any community member is currently streaming.</em></p>
<% end %>

View file

@ -150,11 +150,6 @@
<%= f.label :twitch_url, "Twitch URL" %>
<%= f.url_field :twitch_url %>
</div>
<p><strong>Streaming</strong></p>
<div class="field">
<%= f.label :twitch_username, "Twitch User Name" %>
<%= f.text_field :twitch_username %>
</div>
<div class="field">
<label></label>
<%= f.hidden_field :tab, value: @tab %>

View file

@ -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"

View file

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