๐ Time tracking wizard
-Get started with tracking your coding time in just a few minutes.
- <%= link_to "Set up time tracking", my_wakatime_setup_path, role: "button" %> -diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 06871fa..7471403 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -10,7 +10,6 @@ */ @import "https://uchu.style/color.css"; -@import "https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"; @import "settings.css"; /* Force dark mode for all elements */ diff --git a/app/assets/stylesheets/settings.css b/app/assets/stylesheets/settings.css deleted file mode 100644 index 387971a..0000000 --- a/app/assets/stylesheets/settings.css +++ /dev/null @@ -1,160 +0,0 @@ -.settings-page .grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); - gap: 1rem; - margin-top: 2rem; -} - -.settings-page article { - background: var(--pico-card-background-color); - border: var(--pico-border-width) solid var(--pico-card-border-color); - border-radius: var(--pico-border-radius); - box-shadow: var(--pico-card-box-shadow); - transition: box-shadow var(--pico-transition); - margin: 0; -} - -.settings-page article header { - padding: 0.5rem; - border-bottom: 1px solid var(--pico-muted-border-color); -} - -.settings-page article header h2 { - margin-bottom: 0; - font-size: 1.25rem; - font-weight: 600; - color: var(--pico-color); -} - -.settings-page article header p { - margin-bottom: 0; - color: var(--pico-muted-color); - font-size: 0.875rem; -} - -.settings-page article section { - margin-top: 1.5rem; - padding-top: 1rem; - border-top: 1px solid var(--pico-muted-border-color); -} - -.settings-page article section:first-of-type { - margin-top: 0; - padding-top: 0; - border-top: none; -} - -.settings-page article section h3 { - margin-bottom: 0.75rem; - font-size: 1rem; - font-weight: 500; - color: var(--pico-color); -} - -.settings-page article .form-group { - margin-bottom: 1rem; -} - -.settings-page article .form-group:last-child { - margin-bottom: 0; -} - -.settings-page article button[role="button"], -.settings-page article input[type="submit"][role="button"] { - margin-top: 1rem; -} - -.settings-page article .secondary { - background-color: var(--pico-secondary-background); - border-color: var(--pico-secondary-border); - color: var(--pico-secondary-color); -} - -.settings-page article .secondary:hover { - background-color: var(--pico-secondary-hover-background); - border-color: var(--pico-secondary-hover-border); -} - -.settings-page article .code-example { - margin: 1rem 0; - background: var(--pico-code-background-color); - border-radius: var(--pico-border-radius); -} - -.settings-page article .code-example pre { - margin: 0; - background: transparent; - padding: 0; -} - -.settings-page article img { - max-width: 100%; - height: auto; - margin: 1rem 0; - border-radius: var(--pico-border-radius); -} - -.settings-page article pre:not(.code-example pre) { - background: var(--pico-code-background-color); - padding: 0.75rem; - border-radius: var(--pico-border-radius); - font-size: 0.875rem; - overflow-x: auto; -} - -.settings-page .mirror { - padding: 1rem; - background: var(--pico-card-sectioning-background-color); - border-radius: var(--pico-border-radius); - margin-bottom: 1rem; -} - -.settings-page .mirror:last-child { - margin-bottom: 0; -} - -.settings-page .email-form { - margin-top: 1rem; - padding-top: 1rem; - border-top: 1px solid var(--pico-muted-border-color); -} - -.settings-page .email-form .field { - display: flex; - gap: 0.5rem; - align-items: end; -} - -.settings-page .email-form input[type="email"] { - flex: 1; - margin-bottom: 0; -} - -@media (max-width: 768px) { - .settings-page .grid { - grid-template-columns: 1fr; - gap: 1.5rem; - } - - .settings-page article { - padding: 1rem; - } - - .settings-page .email-form .field { - flex-direction: column; - align-items: stretch; - } -} - -/* Dark mode styles (now default) */ -.settings-page article { - background: var(--pico-card-background-color, #1e293b); - border-color: var(--pico-card-border-color, #334155); -} - -.settings-page article:hover { - box-shadow: var( - --pico-card-box-shadow-hover, - 0 0.125rem 1rem rgba(0, 0, 0, 0.3) - ); -} diff --git a/app/views/users/_timezone_leaderboard_toggle.html.erb b/app/views/users/_timezone_leaderboard_toggle.html.erb index 898e929..a6572b9 100644 --- a/app/views/users/_timezone_leaderboard_toggle.html.erb +++ b/app/views/users/_timezone_leaderboard_toggle.html.erb @@ -1,11 +1,13 @@ -
- Regional & Timezone Leaderboards
- Access regional leaderboards that show users in your timezone region or specific timezone. Choose between timezone-specific, regional (UTC offset), or global competition modes.
-
Access regional leaderboards that show users in your timezone region or specific timezone. Choose between timezone-specific, regional (UTC offset), or global competition modes.
+ <%= f.submit "Save", class: "w-full px-4 py-2 bg-primary text-white font-medium rounded-lg transition-colors duration-200" %> +<% end %> diff --git a/app/views/users/_wakatime_config_display.html.erb b/app/views/users/_wakatime_config_display.html.erb index e2f6d42..6797825 100644 --- a/app/views/users/_wakatime_config_display.html.erb +++ b/app/views/users/_wakatime_config_display.html.erb @@ -1,5 +1,5 @@ <% if @user.api_keys.any? %> -+<% else %># put this in your ~/.wakatime.cfg file [settings] @@ -7,10 +7,9 @@ api_url = https://<%= request.host_with_port %>/api/hackatime/v1 api_key = <%= @user.api_keys.last.token %> heartbeat_rate_limit_seconds = 30 -# any other wakatime configs you want to add: https://github.com/wakatime/wakatime-cli/blob/develop/USAGE.md#ini-config-file -+# any other wakatime configs you want to add: https://github.com/wakatime/wakatime-cli/blob/develop/USAGE.md#ini-config-file
- No API keys found. Please migrate your keys from waka.hackclub.com below. New API key generation has yet to be implemented. +No API keys found. Please migrate your keys from waka.hackclub.com below. New API key generation has yet to be implemented.
<% end %> diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index b3a2dd4..9de3072 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -2,358 +2,385 @@ <%= @is_own_settings ? "My Settings" : "Settings | #{@user.username}" %> <% end %> -<% content_for :body_class, "settings-page" %> - -Change your settings for Hackatime and Sailors Log.
+Change your Hackatime experience and preferences
Get started with tracking your coding time in just a few minutes.
+ <%= link_to "Set up time tracking", my_wakatime_setup_path, + class: "inline-flex items-center gap-2 px-4 py-2 bg-primary text-white font-medium rounded transition-colors duration-200" %> +Get started with tracking your coding time in just a few minutes.
- <%= link_to "Set up time tracking", my_wakatime_setup_path, role: "button" %> -This affects how your activity graph and other time-based features are displayed.
+ <%= f.submit "Save Settings", class: "w-full px-4 py-2 bg-primary text-white font-medium rounded transition-colors duration-200" %> <% end %> - +When you're hacking on a project, Hackatime can update your Slack status so you can show it off!
- <% unless @can_enable_slack_status %> - <%= link_to "Re-authorize with Slack to give permission to update your status", slack_auth_path, role: "button", class: "secondary" %> - <% end %> - <%= form_with model: @user, - url: @is_own_settings ? my_settings_path : settings_user_path(@user), - method: :patch do |f| %> - - <%= f.submit "Save Settings", role: "button" %> - <% end %> -You have notifications enabled for the following channels:
-You have no notifications enabled.
- <% end %> -
- You can enable notifications for specific channels by running /sailorslog on in the Slack channel you want to enable notifications for.
-
This is used to show your active projects on the leaderboard & current hacking activity on the dashboard.
- <% if @user.github_uid.present? %> -โ Your GitHub account is linked: <%= link_to "@#{@user.github_username}", "https://github.com/#{@user.github_username}", target: "_blank" %>
- <% if @user.github_access_token.present? %> - <%= link_to "Relink GitHub Account", github_auth_path, data: { turbo: "false" }, role: "button" %> - <%= link_to "Unlink GitHub Account", github_unlink_path, - data: { - turbo_method: :delete, - confirm: "Are you sure? This will remove access to your GitHub data." - }, - role: "button", - class: "outline" %> - <% else %> -โ ๏ธ Your GitHub token has expired. Please relink your account.
- <%= link_to "Relink GitHub Account", github_auth_path, data: { turbo: "false" }, role: "button" %> - <% end %> - <% else %> - <%= link_to "Link GitHub Account", github_auth_path, data: { turbo: "false" }, role: "button" %> - <% end %> -These are the email addresses associated with your account.
- <% if @user.email_addresses.any? %> -No email addresses found.
- <% end %> - -Show your coding stats on your GitHub profile with beautiful badges.
-This badge shows your overall coding statistics.
-