Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.saas
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ eval_gemfile "Gemfile"

git_source(:bc) { |repo| "https://github.com/basecamp/#{repo}" }

# SaaS-only functionality
gem "activeresource", require: "active_resource"
gem "stripe", "~> 18.0"
gem "queenbee", bc: "queenbee-plugin"
gem "fizzy-saas", bc: "fizzy-saas"
gem "console1984", bc: "console1984"
Expand Down
4 changes: 3 additions & 1 deletion Gemfile.saas.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ GIT

GIT
remote: https://github.com/basecamp/fizzy-saas
revision: f0bc5d811ff80b45dc44b88a13a0a17a3e823143
revision: 8eaa692316bb27ed73bd628b4735082585498ca0
specs:
fizzy-saas (0.1.0)
audits1984
Expand Down Expand Up @@ -558,6 +558,7 @@ GEM
stimulus-rails (1.3.4)
railties (>= 6.0.0)
stringio (3.1.9)
stripe (18.0.1)
thor (1.4.0)
thruster (0.1.17)
thruster (0.1.17-aarch64-linux)
Expand Down Expand Up @@ -684,6 +685,7 @@ DEPENDENCIES
solid_queue (~> 1.2)
sqlite3 (>= 2.0)
stimulus-rails
stripe (~> 18.0)
thruster
trilogy (~> 2.9)
turbo-rails
Expand Down
9 changes: 9 additions & 0 deletions app/assets/stylesheets/web/animation.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@
33% { background-color: var(--color-border-darker); scale: 1; }
}

@keyframes wiggle {
0% { transform: rotate(0deg); }
20% { transform: rotate(3deg); }
40% { transform: rotate(-3deg); }
60% { transform: rotate(3deg); }
80% { transform: rotate(-3deg); }
100% { transform: rotate(0deg); }
}

@keyframes wobble {
0% { transform: rotate(calc(var(--bubble-rotate) + 30deg)); }
15% { border-radius: 66% 34% 72% 28% / 39% 63% 37% 61%; }
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/web/card-perma.css
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
border-radius: 99rem;
}

.btn:not(.popup__btn, .btn--plain, .btn--reversed) {
.btn:not(.popup__btn, .btn--plain, .btn--reversed, .settings-subscription__button) {
--btn-background: var(--card-color);
--btn-color: var(--color-ink-inverted);
}
Expand Down
17 changes: 17 additions & 0 deletions app/assets/stylesheets/web/utilities.css
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,23 @@
.fill-highlight { background-color: var(--color-highlight); }
.fill-transparent { background-color: transparent; }

.fill-highlighter {
display: inline-block;
position: relative;
z-index: 1;

&::before {
background-color: var(--color-highlight);
border-radius: 0.2em;
content: "";
inset-block: 0;
inset-inline: -0.1em;
position: absolute;
transform: skewX(-10deg) rotate(1deg);
z-index: -1;
}
}

.translucent { opacity: var(--opacity, 0.66); }

/* Borders */
Expand Down
20 changes: 0 additions & 20 deletions app/controllers/admin/stats_controller.rb

This file was deleted.

2 changes: 2 additions & 0 deletions app/models/admin.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module Admin
end
2 changes: 2 additions & 0 deletions app/views/account/settings/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@
<%= render "account/settings/export" %>
</div>
</section>

<%= render "account/settings/subscription_panel" if Fizzy.saas? %>
126 changes: 0 additions & 126 deletions app/views/admin/stats/show.html.erb

This file was deleted.

20 changes: 12 additions & 8 deletions app/views/cards/_container.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% cache card do %>
<section id="<%= dom_id(card, :card_container) %>" class="card-perma" style="--card-color: <%= card.color %>;">
<section id="<%= dom_id(card, :card_container) %>" class="card-perma" style="--card-color: <%= card.color %>;">
<% cache card do %>
<div class="card-perma__actions card-perma__actions--left">
<%= render "cards/container/gild", card: card if card.published? && !card.closed? %>
<%= render "cards/container/image", card: card %>
Expand Down Expand Up @@ -33,11 +33,15 @@
<%= render "cards/display/preview/bubble", card: card %>
<% end %>
</div>
<% end %>

<% if card.published? %>
<%= render "cards/container/footer/published", card: card %>
<% elsif card.drafted? %>
<%= render "cards/container/footer/draft", card: card %>
<% if card.published? %>
<%= render "cards/container/footer/published", card: card %>
<% elsif card.drafted? %>
<% if Fizzy.saas? %>
<%= render "cards/container/footer/saas/create", card: card %>
<% else %>
<%= render "cards/container/footer/create", card: card %>
<% end %>
</section>
<% end %>
<% end %>
</section>
19 changes: 19 additions & 0 deletions app/views/cards/container/footer/_create.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div class="card-perma__notch card-perma__notch--bottom flex-column">
<div class="flex gap-half">
<%= button_to card_publish_path(card), name: "creation_type", value: "add", class: "btn",
title: "Create card (#{ hotkey_label(["ctrl", "enter"]) })",
form: { data: { controller: "form" } },
data: { form_target: "submit", controller: "clicker", action: "keydown.ctrl+enter@document->clicker#click keydown.meta+enter@document->clicker#click" } do %>
<span>Create card</span>
<% end %>

<%= button_to card_publish_path(card), method: :post, class: "btn btn--reversed", name: "creation_type", value: "add_another",
title: "Create and add another (#{ hotkey_label(["ctrl", "shift", "enter"]) })", form: { data: { controller: "form" } },
data: { form_target: "submit", controller: "clicker", action: "keydown.ctrl+shift+enter@document->clicker#click keydown.meta+shift+enter@document->clicker#click" } do %>
<span>Create and add another</span>
<% end %>
</div>

<%= render "cards/container/footer/saas/near_notice" if Fizzy.saas? %>
</div>

14 changes: 0 additions & 14 deletions app/views/cards/container/footer/_draft.html.erb

This file was deleted.

1 change: 1 addition & 0 deletions app/views/layouts/shared/_head.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

<%= render "layouts/theme_preference" %>
<%= stylesheet_link_tags %>
<%= stylesheet_link_tag "fizzy/saas", "data-turbo-track": "reload" if Fizzy.saas? %>
<%= javascript_importmap_tags %>

<%= tenanted_action_cable_meta_tag %>
Expand Down
3 changes: 1 addition & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
root "events#index"

namespace :account do
resource :entropy
resource :join_code
resource :settings
resource :entropy
resources :exports, only: [ :create, :show ]
end

Expand Down Expand Up @@ -239,6 +239,5 @@

namespace :admin do
mount MissionControl::Jobs::Engine, at: "/jobs"
get "stats", to: "stats#show"
end
end
23 changes: 0 additions & 23 deletions test/controllers/admin/stats_controller_test.rb

This file was deleted.

6 changes: 6 additions & 0 deletions test/fixtures/accesses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ private_kevin:
account: 37s_uuid
board: private_uuid
user: kevin_uuid

miltons_wish_list_mike:
id: <%= ActiveRecord::FixtureSet.identify("miltons_wish_list_mike", :uuid) %>
account: initech_uuid
board: miltons_wish_list_uuid
user: mike_uuid
11 changes: 11 additions & 0 deletions test/fixtures/cards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,14 @@ paycheck:
status: published
last_active_at: <%= 1.week.ago %>
account: initech_uuid

unfinished_thoughts:
id: <%= ActiveRecord::FixtureSet.identify("unfinished_thoughts", :uuid) %>
number: 3
board: miltons_wish_list_uuid
creator: mike_uuid
title: Some unfinished thoughts
created_at: <%= 1.week.ago %>
status: drafted
last_active_at: <%= 1.week.ago %>
account: initech_uuid
2 changes: 1 addition & 1 deletion test/models/card_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class CardTest < ActiveSupport::TestCase

test "open" do
assert_equal cards(:logo, :layout, :text, :buy_domain).to_set, accounts("37s").cards.open.to_set
assert_equal cards(:radio, :paycheck).to_set, accounts("initech").cards.open.to_set
assert_equal cards(:radio, :paycheck, :unfinished_thoughts).to_set, accounts("initech").cards.open.to_set
end

test "card_unassigned" do
Expand Down