Remove dynamic /live page (#7130)

* Removed dynamic /live page
This commit is contained in:
Anna Buianova 2020-04-07 17:36:21 +03:00 committed by GitHub
parent cecddf3097
commit b2a2f4bee5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 88 deletions

View file

@ -37,7 +37,6 @@ linters:
- '**/app/views/layouts/_styles.html.erb'
- '**/app/views/liquid_embeds/show.html.erb'
- '**/app/views/moderations/mod.html.erb'
- '**/app/views/pages/live.html.erb'
- '**/app/views/pages/onboarding.html.erb'
- '**/app/views/partnerships/show.html.erb'
- '**/app/views/partnerships/index.html.erb'

View file

@ -72,13 +72,6 @@ class PagesController < ApplicationController
end
end
def live
@active_channel = ChatChannel.find_by(channel_name: "Workshop")
@chat_channels = [@active_channel].to_json(
only: %i[channel_name channel_type last_message_at slug status id],
)
end
def crayons
@page = Page.find_by(slug: "crayons")
render :show if @page

View file

@ -1,70 +0,0 @@
<% if user_signed_in? %>
<%= javascript_packs_with_chunks_tag "Chat", defer: true %>
<% end %>
<% title "DEV Live 📡👩‍💻👨‍💻👩‍💻👨‍💻" %>
<link rel="canonical" href="https://dev.to/live" />
<meta name="description" content="DEV LIVE">
<meta name="keywords" content="software development,engineering,rails,javascript,ruby">
<meta property="og:type" content="article" />
<meta property="og:url" content="https://dev.to/live" />
<meta property="og:title" content="DEV LIVE" />
<meta property="og:image" content="https://thepracticaldev.s3.amazonaws.com/i/bqzj1pwho9e0jicqo44s.png" />
<meta property="og:description" content="DEV Live Events" />
<meta property="og:site_name" content="The Practical Dev" />
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@ThePracticalDev">
<meta name="twitter:title" content="DEV LIVE">
<meta property="og:description" content="DEV Live Events" />
<meta name="twitter:image:src" content="https://thepracticaldev.s3.amazonaws.com/i/bqzj1pwho9e0jicqo44s.png">
<style>
<% cache(cache_key_heroku_slug("live-page-css"), expires_in: 1.hour) do %>
<%= Rails.application.assets["live.css"].to_s.html_safe %>
<% end %>
</style>
<% if current_user&.has_role?(:super_admin) %>
<div class="live-container">
<div class="live-component">
<div>
<iframe class="live-video" src="//iframe.dacast.com/b/105417/c/465464" width="1920" height="1080" frameborder="0" scrolling="no" allow="autoplay" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen loading="lazy"></iframe>
</div>
<div class="live-chat-wrapper">
<div id="chat" class="live-chat" data-pusher-key="<%= ApplicationConfig["PUSHER_KEY"] %>" data-chat-channels="<%= @chat_channels %>" data-chat-options="<%= { showChannelsList: false, showTimestamp: false, activeChannelId: @active_channel.id }.to_json %>">
</div>
</div>
</div>
<div class="live-under-message">DEV Live is in beta and currently does not support Safari. We recommend Chrome or Firefox for optimal viewing experience. If you are having issues, contact
<a href="mailto:members@dev.to">members@dev.to</a> for support. ❤️
</div>
</div>
<% elsif false %>
<div class="live-upcoming-info">
<h1 style="text-align: center">
<span style="display: inline-block">DEV LIVE <%= image_tag("emoji/emoji-one-television.png", style: "width: 55px; height: 50px; vertical-align: text-top;", alt: "television emoji") %></span>
</h1>
<h4 style="text-align: center">
<i>Our event is starting soon! Check back very shortly.</i>
</h4>
</div>
<script>
setTimeout(function () {
window.location.reload(1);
}, 2500);
</script>
<% elsif false %>
<div class="live-upcoming-info">
<h1 style="text-align: center;font-size:3.5em;margin:-100px auto">DEV IS
<span style="display: inline-block">LIVE <%= image_tag("emoji/emoji-one-television.png", style: "width: 60px;", alt: "television emoji") %></span>
</h1>
<%= render "devise/registrations/registration_form" %>
</div>
<% else %>
<div class="live-upcoming-info">
<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

@ -305,7 +305,6 @@ Rails.application.routes.draw do
get "/code-of-conduct" => "pages#code_of_conduct"
get "/report-abuse" => "pages#report_abuse"
get "/faq" => "pages#faq"
get "/live" => "pages#live"
get "/welcome" => "pages#welcome"
get "/challenge" => "pages#challenge"
get "/badge" => "pages#badge"

View file

@ -106,15 +106,6 @@ RSpec.describe "Pages", type: :request do
end
end
describe "GET /live" do
context "when nothing is live" do
it "shows the correct message" do
get "/live"
expect(response.body).to include("We are working on more ways to bring live coding to the community")
end
end
end
describe "GET /robots.txt" do
it "has proper text" do
get "/robots.txt"