From 23823c9544a0e06bf5b3a47de131e1c30791b754 Mon Sep 17 00:00:00 2001 From: Pat Walls Date: Sun, 23 Sep 2018 12:01:02 -0400 Subject: [PATCH] waitlist page --- app/assets/javascripts/waitlist.coffee | 3 +++ app/assets/stylesheets/waitlist.scss | 3 +++ app/controllers/dashboard_controller.rb | 3 ++- app/controllers/waitlist_controller.rb | 4 ++++ app/helpers/waitlist_helper.rb | 2 ++ app/views/waitlist/show.html.haml | 19 +++++++++++++++++++ config/routes.rb | 1 + test/controllers/waitlist_controller_test.rb | 7 +++++++ 8 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 app/assets/javascripts/waitlist.coffee create mode 100644 app/assets/stylesheets/waitlist.scss create mode 100644 app/controllers/waitlist_controller.rb create mode 100644 app/helpers/waitlist_helper.rb create mode 100644 app/views/waitlist/show.html.haml create mode 100644 test/controllers/waitlist_controller_test.rb diff --git a/app/assets/javascripts/waitlist.coffee b/app/assets/javascripts/waitlist.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/waitlist.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/waitlist.scss b/app/assets/stylesheets/waitlist.scss new file mode 100644 index 0000000..d979184 --- /dev/null +++ b/app/assets/stylesheets/waitlist.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the waitlist controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 3b7717c..f04ea0e 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -2,7 +2,8 @@ class DashboardController < ApplicationController before_action :authenticate_user! def show - redirect_to google_drive_authorize_path if current_user.google_auth_token.nil? + redirect_to waitlist_path if current_user.google_auth_token.nil? + # redirect_to google_drive_authorize_path if current_user.google_auth_token.nil? @posts = current_user.posts end end diff --git a/app/controllers/waitlist_controller.rb b/app/controllers/waitlist_controller.rb new file mode 100644 index 0000000..5614fea --- /dev/null +++ b/app/controllers/waitlist_controller.rb @@ -0,0 +1,4 @@ +class WaitlistController < ApplicationController + def show + end +end diff --git a/app/helpers/waitlist_helper.rb b/app/helpers/waitlist_helper.rb new file mode 100644 index 0000000..0e5d7e2 --- /dev/null +++ b/app/helpers/waitlist_helper.rb @@ -0,0 +1,2 @@ +module WaitlistHelper +end diff --git a/app/views/waitlist/show.html.haml b/app/views/waitlist/show.html.haml new file mode 100644 index 0000000..a95667b --- /dev/null +++ b/app/views/waitlist/show.html.haml @@ -0,0 +1,19 @@ +.profile{ style: ""} + .container{ style: "margin-top:20px;"} + %h4 Hold up! + %p + Hey everyone! + %p + Google has decided to put a user quota on my API account, so I need to wait a bit (I'm working with them) before I can connect more users. + %p + Please check back in a couple hours to set up your blog! + %p + In the meantime, check out how I built and launched this project in 24 hours and streamed the whole process on Twitch! + %p + = link_to "Original Tweet", "https://twitter.com/thepatwalls/status/1043242997050167302" + %p + = link_to "Twitch Live Stream Recording", "https://www.twitch.tv/videos/313288148##" + %p + Thanks for your patience and feel free to contact me about whatever + %p + Pat diff --git a/config/routes.rb b/config/routes.rb index 64bb8af..f0026bc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -12,6 +12,7 @@ get '/google_drive_authorize' => 'google_drive#authorize', as: 'google_drive_authorize' get '/callback' => 'google_drive#callback', as: 'callback' get '/privacy_policy' => 'privacy_policy#show' + get '/waitlist' => 'waitlist#show' get '/:username', to: 'i/posts#index' get '/:username/:post_id', to: 'i/posts#show' diff --git a/test/controllers/waitlist_controller_test.rb b/test/controllers/waitlist_controller_test.rb new file mode 100644 index 0000000..1b2aadb --- /dev/null +++ b/test/controllers/waitlist_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class WaitlistControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end