diff --git a/app/assets/stylesheets/application.scss.erb b/app/assets/stylesheets/application.scss.erb index 753124d2..295040ce 100644 --- a/app/assets/stylesheets/application.scss.erb +++ b/app/assets/stylesheets/application.scss.erb @@ -222,7 +222,6 @@ button.button.btn-no:hover { } .new_user{ - height: 412px; margin-left:-166px; box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.23), 0px 3px 3px rgba(0, 0, 0, 0.16); font-family: din-medium; diff --git a/app/assets/stylesheets/clean.css.erb b/app/assets/stylesheets/clean.css.erb index 5c69a01f..a6c2c23f 100644 --- a/app/assets/stylesheets/clean.css.erb +++ b/app/assets/stylesheets/clean.css.erb @@ -329,15 +329,18 @@ body.unauthenticated.action-home { color: #dab539; } +.ctaContainer { + margin: 0 auto; +} .requestInviteCTA { - display: block; + display: inline-block; width: 220px; font-size: 20px; padding: 16px 0; text-align: center; border-radius: 3px; border: 2px solid #a354cd; - margin: 12px auto; + margin: 12px 12px; color: #a354cd; font-family: 'noto-sans-bold', sans-serif; } diff --git a/app/models/user.rb b/app/models/user.rb index d9e25cad..751d8bbe 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -17,8 +17,6 @@ class User < ApplicationRecord has_many :following, class_name: 'Follow' - after_create :generate_code - devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable serialize :settings, UserPreference @@ -36,8 +34,6 @@ class User < ApplicationRecord validates :name, uniqueness: true # done by devise validates :email, uniqueness: true # done by devise - validates :joinedwithcode, presence: true, inclusion: { in: $codes, message: '%{value} is not valid' }, on: :create - # This method associates the attribute ":image" with a file attachment has_attached_file :image, styles: { thirtytwo: ['32x32#', :png], diff --git a/app/views/main/home.html.erb b/app/views/main/home.html.erb index 554ab424..5e77bd29 100644 --- a/app/views/main/home.html.erb +++ b/app/views/main/home.html.erb @@ -8,18 +8,23 @@ <% content_for :title, "Home | Metamaps" %> <% content_for :mobile_title, "Home" %>
-
Make sense, together.
Untangle complex conversations, expand perspectives, and gain insights - about what matter to you and your communities. + about the things that matter to you.
Metamaps enables individual and collaborative sensemaking through concept mapping, live video + text chat, and a shared knowledge graph.
- REQUEST INVITE +
The University of Technology Sydney is using Metamaps + to share knowledge, and think better together. +
+
+ SIGN UP + LOG IN +
diff --git a/app/views/main/requestinvite.html.erb b/app/views/main/requestinvite.html.erb deleted file mode 100644 index c026911a..00000000 --- a/app/views/main/requestinvite.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -<%# - # @file - # Located at /request - # Shows a form where people can request an invite - #%> - -<% content_for :title, "Request Invite | Metamaps" %> -<% content_for :mobile_title, "Request Invite" %> -
- diff --git a/app/views/users/registrations/new.html.erb b/app/views/users/registrations/new.html.erb index 17409d07..0368db01 100644 --- a/app/views/users/registrations/new.html.erb +++ b/app/views/users/registrations/new.html.erb @@ -3,12 +3,14 @@
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :post, :class => "new_user centerGreyForm" }) do |f| %> - +

Sign Up

+
Only email addresses at the uts.edu.au domain name will be able to register.
+
<%= f.label :name, "Name:", :class => "firstFieldText" %> <%= f.text_field :name, :autofocus => true %>
- +
<%= f.label :email, "Email:", :class => "fieldText" %> <%= f.email_field :email %>
@@ -17,13 +19,7 @@
<%= f.label :password_confirmation, "Password Confirmation:", :class => "fieldText" %> <%= f.password_field :password_confirmation %>
- -
<%= f.label "Access Code:", :class => "fieldText" %> - <%= f.text_field :joinedwithcode, :value => params[:code] %>
-
<%= f.submit "Sign up!" %>
- -

Don't have an access code?
Request an Invite
+
<%= f.submit "Sign up" %>
<% end %>
- diff --git a/config/routes.rb b/config/routes.rb index 80c0dbb4..8b166bcf 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,7 +4,6 @@ Metamaps::Application.routes.draw do mount ActionCable.server => '/cable' root to: 'main#home', via: :get - get 'request', to: 'main#requestinvite', as: :request namespace :explore do get 'active' diff --git a/frontend/src/components/UpperLeftUI.js b/frontend/src/components/UpperLeftUI.js index cbead88e..ecfe0a39 100644 --- a/frontend/src/components/UpperLeftUI.js +++ b/frontend/src/components/UpperLeftUI.js @@ -12,19 +12,25 @@ class UpperLeftUI extends Component { onRequestClick: PropTypes.func } + static contextTypes = { + location: PropTypes.object + } + render () { const { map, currentUser, userRequested, requestAnswered, requestApproved, onRequestClick } = this.props + const { pathname } = this.context.location + const unauthedHome = pathname === '/' && !currentUser return
{currentUser && METAMAPS} {!currentUser && METAMAPS}
-
+ {!unauthedHome &&
-
+
} {map && !map.authorizeToEdit(currentUser) &&
View Only
{currentUser && !userRequested &&
Request Access
} diff --git a/frontend/src/components/UpperRightUI.js b/frontend/src/components/UpperRightUI.js index 08276c82..ce2275ab 100644 --- a/frontend/src/components/UpperRightUI.js +++ b/frontend/src/components/UpperRightUI.js @@ -18,6 +18,10 @@ class UpperRightUI extends Component { openInviteLightbox: PropTypes.func } + static contextTypes = { + location: PropTypes.object + } + constructor(props) { super(props) this.state = { @@ -52,6 +56,8 @@ class UpperRightUI extends Component { notifications, fetchNotifications, openInviteLightbox, markAsRead, markAsUnread } = this.props const { accountBoxOpen, notificationsBoxOpen } = this.state + const { pathname } = this.context.location + const unauthedHome = pathname === '/' && !currentUser return
{currentUser &&
@@ -69,7 +75,7 @@ class UpperRightUI extends Component { markAsUnread={markAsUnread} toggleNotificationsBox={this.toggleNotificationsBox}/>} } - {!signInPage &&
+ {!signInPage && !unauthedHome &&
Account
{currentUser && } diff --git a/frontend/src/routes/App.js b/frontend/src/routes/App.js index 79ad3335..72338ef0 100644 --- a/frontend/src/routes/App.js +++ b/frontend/src/routes/App.js @@ -76,12 +76,12 @@ class App extends Component { mobileTitleWidth={mobileTitleWidth} onTitleClick={mobileTitleClick} serverData={serverData} />} - {!unauthedHome && } + {!mobile &&