diff --git a/Gemfile.lock b/Gemfile.lock index 376b1d6..ff556cd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,79 +1,79 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.0.5) - actionpack (= 7.0.5) - activesupport (= 7.0.5) + actioncable (7.0.5.1) + actionpack (= 7.0.5.1) + activesupport (= 7.0.5.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.5) - actionpack (= 7.0.5) - activejob (= 7.0.5) - activerecord (= 7.0.5) - activestorage (= 7.0.5) - activesupport (= 7.0.5) + actionmailbox (7.0.5.1) + actionpack (= 7.0.5.1) + activejob (= 7.0.5.1) + activerecord (= 7.0.5.1) + activestorage (= 7.0.5.1) + activesupport (= 7.0.5.1) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.5) - actionpack (= 7.0.5) - actionview (= 7.0.5) - activejob (= 7.0.5) - activesupport (= 7.0.5) + actionmailer (7.0.5.1) + actionpack (= 7.0.5.1) + actionview (= 7.0.5.1) + activejob (= 7.0.5.1) + activesupport (= 7.0.5.1) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.5) - actionview (= 7.0.5) - activesupport (= 7.0.5) + actionpack (7.0.5.1) + actionview (= 7.0.5.1) + activesupport (= 7.0.5.1) rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.5) - actionpack (= 7.0.5) - activerecord (= 7.0.5) - activestorage (= 7.0.5) - activesupport (= 7.0.5) + actiontext (7.0.5.1) + actionpack (= 7.0.5.1) + activerecord (= 7.0.5.1) + activestorage (= 7.0.5.1) + activesupport (= 7.0.5.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.5) - activesupport (= 7.0.5) + actionview (7.0.5.1) + activesupport (= 7.0.5.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.5) - activesupport (= 7.0.5) + activejob (7.0.5.1) + activesupport (= 7.0.5.1) globalid (>= 0.3.6) - activemodel (7.0.5) - activesupport (= 7.0.5) - activerecord (7.0.5) - activemodel (= 7.0.5) - activesupport (= 7.0.5) - activestorage (7.0.5) - actionpack (= 7.0.5) - activejob (= 7.0.5) - activerecord (= 7.0.5) - activesupport (= 7.0.5) + activemodel (7.0.5.1) + activesupport (= 7.0.5.1) + activerecord (7.0.5.1) + activemodel (= 7.0.5.1) + activesupport (= 7.0.5.1) + activestorage (7.0.5.1) + actionpack (= 7.0.5.1) + activejob (= 7.0.5.1) + activerecord (= 7.0.5.1) + activesupport (= 7.0.5.1) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.5) + activesupport (7.0.5.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) - bcrypt (3.1.18) + bcrypt (3.1.19) bindex (0.8.1) bootsnap (1.16.0) msgpack (~> 1.2) builder (3.2.4) - capybara (3.39.0) + capybara (3.39.2) addressable matrix mini_mime (>= 0.1.3) @@ -97,20 +97,20 @@ GEM erubi (1.12.0) globalid (1.1.0) activesupport (>= 5.0) - i18n (1.13.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) - importmap-rails (1.1.6) + importmap-rails (1.2.1) actionpack (>= 6.0.0) railties (>= 6.0.0) io-console (0.6.0) - irb (1.6.4) + irb (1.7.0) reline (>= 0.3.0) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - loofah (2.20.0) + loofah (2.21.3) crass (~> 1.0.2) - nokogiri (>= 1.5.9) + nokogiri (>= 1.12.0) mail (2.8.1) mini_mime (>= 0.1.1) net-imap @@ -121,8 +121,8 @@ GEM method_source (1.0.0) mini_mime (1.1.2) mini_portile2 (2.8.2) - minitest (5.18.0) - msgpack (1.7.0) + minitest (5.18.1) + msgpack (1.7.1) mysql2 (0.5.5) net-imap (0.3.6) date @@ -134,53 +134,54 @@ GEM net-smtp (0.3.3) net-protocol nio4r (2.5.9) - nokogiri (1.14.3) - mini_portile2 (~> 2.8.0) + nokogiri (1.15.2) + mini_portile2 (~> 2.8.2) racc (~> 1.4) orm_adapter (0.5.0) public_suffix (5.0.1) - puma (5.6.5) + puma (5.6.6) nio4r (~> 2.0) - racc (1.6.2) + racc (1.7.1) rack (2.2.7) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.5) - actioncable (= 7.0.5) - actionmailbox (= 7.0.5) - actionmailer (= 7.0.5) - actionpack (= 7.0.5) - actiontext (= 7.0.5) - actionview (= 7.0.5) - activejob (= 7.0.5) - activemodel (= 7.0.5) - activerecord (= 7.0.5) - activestorage (= 7.0.5) - activesupport (= 7.0.5) + rails (7.0.5.1) + actioncable (= 7.0.5.1) + actionmailbox (= 7.0.5.1) + actionmailer (= 7.0.5.1) + actionpack (= 7.0.5.1) + actiontext (= 7.0.5.1) + actionview (= 7.0.5.1) + activejob (= 7.0.5.1) + activemodel (= 7.0.5.1) + activerecord (= 7.0.5.1) + activestorage (= 7.0.5.1) + activesupport (= 7.0.5.1) bundler (>= 1.15.0) - railties (= 7.0.5) + railties (= 7.0.5.1) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.5.0) - loofah (~> 2.19, >= 2.19.1) - railties (7.0.5) - actionpack (= 7.0.5) - activesupport (= 7.0.5) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (7.0.5.1) + actionpack (= 7.0.5.1) + activesupport (= 7.0.5.1) method_source rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) rake (13.0.6) - regexp_parser (2.8.0) - reline (0.3.3) + regexp_parser (2.8.1) + reline (0.3.5) io-console (~> 0.5) responders (3.1.0) actionpack (>= 5.2) railties (>= 5.2) rexml (3.2.5) rubyzip (2.3.2) - selenium-webdriver (4.9.1) + selenium-webdriver (4.10.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -193,8 +194,8 @@ GEM sprockets (>= 3.0.0) stimulus-rails (1.2.1) railties (>= 6.0.0) - thor (1.2.1) - timeout (0.3.2) + thor (1.2.2) + timeout (0.4.0) turbo-rails (1.4.0) actionpack (>= 6.0.0) activejob (>= 6.0.0) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 56f94f6..333a019 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -14,26 +14,7 @@ *= require_self */ -html { - box-sizing: border-box; - font-size: 16px; -} - -*, *:before, *:after { - box-sizing: inherit; -} - -body, h1, h2, h3, h4, h5, h6, p, ol, ul { - margin: 0; - padding: 0; - font-weight: normal; -} - -ol, ul { - list-style: none; -} - -img { - max-width: 100%; - height: auto; +body, nav, main, footer { + padding: 1rem; + margin: 1rem; } diff --git a/app/controllers/virtuals_controller.rb b/app/controllers/virtuals_controller.rb index 749c3f1..f405588 100644 --- a/app/controllers/virtuals_controller.rb +++ b/app/controllers/virtuals_controller.rb @@ -1,6 +1,6 @@ class VirtualsController < ApplicationController before_action :set_virtual, only: %i[ show edit update destroy ] - + before_action :set_domain, only: %i[ new create edit update destroy ] # GET /virtuals or /virtuals.json def index @virtuals = Virtual.all @@ -22,10 +22,11 @@ class VirtualsController < ApplicationController # POST /virtuals or /virtuals.json def create @virtual = Virtual.new(virtual_params) + @virtual.domain_id = @domain.id respond_to do |format| if @virtual.save - format.html { redirect_to virtual_url(@virtual), notice: "Virtual was successfully created." } + format.html { redirect_to domain_url(@domain), notice: "Virtual was successfully created." } format.json { render :show, status: :created, location: @virtual } else format.html { render :new, status: :unprocessable_entity } @@ -38,7 +39,7 @@ class VirtualsController < ApplicationController def update respond_to do |format| if @virtual.update(virtual_params) - format.html { redirect_to virtual_url(@virtual), notice: "Virtual was successfully updated." } + format.html { redirect_to domain_url(@domain), notice: "Virtual was successfully updated." } format.json { render :show, status: :ok, location: @virtual } else format.html { render :edit, status: :unprocessable_entity } @@ -52,7 +53,7 @@ class VirtualsController < ApplicationController @virtual.destroy respond_to do |format| - format.html { redirect_to virtuals_url, notice: "Virtual was successfully destroyed." } + format.html { redirect_to domain_url(@domain), notice: "Virtual was successfully destroyed." } format.json { head :no_content } end end @@ -63,6 +64,10 @@ class VirtualsController < ApplicationController @virtual = Virtual.find(params[:id]) end + def set_domain + @domain = Domain.find(params[:domain_id]) + end + # Only allow a list of trusted parameters through. def virtual_params params.require(:virtual).permit(:email, :destination) diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 5ede964..811d9bf 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -1,26 +1,27 @@
<%= notice %>
<%= alert %>
+ + +