Skip to content

Commit

Permalink
chore: disable heartbeats timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
taciturnaxolotl committed Nov 25, 2024
1 parent 7ab9d43 commit 4c41249
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 88 deletions.
2 changes: 0 additions & 2 deletions routes/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ func (h *SettingsHandler) dispatchAction(action string) action {
return h.actionGenerateInvite
case "update_unknown_projects":
return h.actionUpdateExcludeUnknownProjects
case "update_heartbeats_timeout":
return h.actionUpdateHeartbeatsTimeout
}
return nil
}
Expand Down
86 changes: 0 additions & 86 deletions views/settings.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -1027,92 +1027,6 @@
<hr class="border-t border-gray-800 my-4" />
</div>

<!-- Heartbeats Timeout -->
<form class="w-full" action="" method="post">
<input
type="hidden"
name="action"
value="update_heartbeats_timeout"
/>
<div class="flex flex-wrap md:flex-nowrap mb-2 gap-x-4">
<div
class="w-full md:w-1/3 mb-2 md:mb-0 inline-block"
>
<span
class="font-semibold text-text-primary dark:text-text-dark-primary text-lg"
>Heartbeats Timeout</span
>
<p
class="block text-sm text-text-secondary dark:text-text-dark-secondary"
>
This parameter affects the heuristic based
on which a series of consecutive heartbeats
sent by your IDE are aggregated to total
coding time. Please see the
<i>"How are durations calculated?"</i>
section in our
<a
class="link"
href="https://github.com/kcoderhtml/hackatime?tab=readme-ov-file#-faqs"
rel="noreferrer noopener"
target="_blank"
>FAQs</a
>
as well as the discussion in
<a
class="link"
href="https://github.com/muety/wakapi/issues/156"
rel="noreferrer noopener"
target="_blank"
>#156</a
>.
</p>
</div>

<div
class="flex-col w-full md:w-2/3 inline-block space-y-4"
>
<div class="flex justify-between items-center">
<div
class="flex flex-col flex-grow gap-y-1"
>
<label
class="font-semibold text-text-primary dark:text-text-dark-primary"
for="heartbeats_timeout"
>Timeout / offset (seconds)</label
>
<div class="flex gap-x-2 items-center">
<input
class="input-default"
type="number"
id="heartbeats_timeout"
name="heartbeats_timeout"
style="max-width: 100px"
placeholder="120"
min="30"
max="300"
step="10"
required
value="{{ .User.HeartbeatsTimeoutSec }}"
/>
<span
class="text-text-secondary dark:text-text-dark-secondary text-sm"
>(min. 30 seconds, max. 5
minutes)</span
>
</div>
</div>
<button
type="submit"
class="btn-primary h-min"
>
Save
</button>
</div>
</div>
</div>
</form>

<div class="w-full">
<hr class="border-t border-gray-800 my-4" />
</div>
Expand Down

0 comments on commit 4c41249

Please sign in to comment.