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
8 changes: 0 additions & 8 deletions app/controllers/static_pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,13 @@ def index

if !current_user.heartbeats.exists? || params[:show_wakatime_setup_notice]
@show_wakatime_setup_notice = true
if (ssp = Cache::SetupSocialProofJob.perform_now)
@ssp_message, @ssp_users_recent, @ssp_users_size = ssp.values_at(:message, :users_recent, :users_size)
end
end

render inertia: "Home/SignedIn", props: signed_in_props
else
# Set homepage SEO content for logged-out users only
set_homepage_seo_content

@usage_social_proof = Cache::UsageSocialProofJob.perform_now

@home_stats = Cache::HomeStatsJob.perform_now

render inertia: "Home/SignedOut", props: signed_out_props
Expand Down Expand Up @@ -137,9 +132,6 @@ def signed_in_props
flavor_text: @flavor_text.to_s,
trust_level_red: current_user&.trust_level == "red",
show_wakatime_setup_notice: !!@show_wakatime_setup_notice,
ssp_message: @ssp_message,
ssp_users_recent: @ssp_users_recent || [],
ssp_users_size: @ssp_users_size || @ssp_users_recent&.size || 0,
github_uid_blank: current_user&.github_uid.blank?,
dashboard_stats: dashboard_stats || InertiaRails.defer { dashboard_stats_payload }
}
Expand Down
9 changes: 1 addition & 8 deletions app/javascript/pages/Home/SignedIn.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { Deferred, router } from "@inertiajs/svelte";
import type {
ActivityGraphData,
SocialProofUser,
FilterableDashboardData,
TodayStats,
ProgrammingGoalProgress,
Expand All @@ -21,18 +20,12 @@
flavor_text,
trust_level_red,
show_wakatime_setup_notice,
ssp_message,
ssp_users_recent,
ssp_users_size,
github_uid_blank,
dashboard_stats,
}: {
flavor_text: string;
trust_level_red: boolean;
show_wakatime_setup_notice: boolean;
ssp_message?: string | null;
ssp_users_recent: SocialProofUser[];
ssp_users_size: number;
github_uid_blank: boolean;
dashboard_stats?: {
filterable_dashboard_data: FilterableDashboardData;
Expand Down Expand Up @@ -78,7 +71,7 @@
{/if}

{#if show_wakatime_setup_notice}
<SetupNotice {ssp_message} {ssp_users_recent} {ssp_users_size} />
<SetupNotice />
{:else if github_uid_blank}
<GitHubLinkBanner />
{/if}
Expand Down
18 changes: 0 additions & 18 deletions app/javascript/pages/Home/signedIn/SetupNotice.svelte
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
<script lang="ts">
import Button from "../../../components/Button.svelte";
import SocialProofUsers from "./SocialProofUsers.svelte";
import { users } from "../../../api";

type SocialProofUser = { display_name: string; avatar_url: string };

let {
ssp_message,
ssp_users_recent,
ssp_users_size,
}: {
ssp_message?: string | null;
ssp_users_recent: SocialProofUser[];
ssp_users_size: number;
} = $props();

const wakatimeSetupPath = users.wakatimeSetup.path();
</script>

Expand All @@ -37,9 +24,4 @@
>
</div>
</div>
<SocialProofUsers
users={ssp_users_recent}
total_size={ssp_users_size}
message={ssp_message}
/>
</div>
82 changes: 0 additions & 82 deletions app/javascript/pages/Home/signedIn/SocialProofUsers.svelte

This file was deleted.

2 changes: 0 additions & 2 deletions app/javascript/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ export type ProjectStats = {
activity_graph: ActivityGraphData;
};

export type SocialProofUser = { display_name: string; avatar_url: string };

export type FilterableDashboardData = {
total_time: number;
total_heartbeats: number;
Expand Down
43 changes: 0 additions & 43 deletions app/jobs/cache/setup_social_proof_job.rb

This file was deleted.

23 changes: 0 additions & 23 deletions app/jobs/cache/usage_social_proof_job.rb

This file was deleted.

10 changes: 0 additions & 10 deletions config/initializers/good_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,6 @@
class: "Cache::ActiveProjectsJob",
kwargs: { force_reload: true }
},
cache_usage_social_proof: {
cron: "* * * * *",
class: "Cache::UsageSocialProofJob",
kwargs: { force_reload: true }
},
cache_setup_social_proof: {
cron: "* * * * *",
class: "Cache::SetupSocialProofJob",
kwargs: { force_reload: true }
},
cache_minutes_logged: {
cron: "* * * * *",
class: "Cache::MinutesLoggedJob",
Expand Down
4 changes: 1 addition & 3 deletions lib/tasks/cache.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ namespace :cache do
Cache::HomeStatsJob,
Cache::HeartbeatCountsJob,
Cache::ActiveProjectsJob,
Cache::MinutesLoggedJob,
Cache::SetupSocialProofJob,
Cache::UsageSocialProofJob
Cache::MinutesLoggedJob
]

cache_jobs.each do |job_class|
Expand Down