chore: fun stuff now the timer is on and complete is on

This commit is contained in:
Zlatko Đurić 2025-04-13 21:56:16 +02:00
parent 30e4a4a62a
commit 5510af02a1
5 changed files with 16 additions and 11 deletions

BIN
assets/time-out.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -31,6 +31,7 @@ export class TimerScreen extends FormApplication {
const overrides = {
height: "auto",
width: "33rem",
id: "yet-another-timer",
template: templatePath,
title: game.i18n?.localize("YAT.title") || "Yet another timer",

View File

@ -14,7 +14,7 @@ Hooks.on('init', function() {
Hooks.on('ready', function(details) {
logger.log('Timer module ready:', details);
// startTimers();
startTimers();
isPaused = false;
addSomeTimers();

View File

@ -1 +1,3 @@
<h2>{{ localize "YAT.timer.your-timer-is-complete" name=name }}!</h2>
<img src="modules/yet-another-timer/assets/time-out.jpg">

View File

@ -10,7 +10,7 @@
{{/if}}
</button>
<button class="button resume-button" data-action="add-timer">
{{ localize "YAT.add-timer" }}
{{ localize "YAT.status.add-timer" }}
</button>
</section>
@ -19,20 +19,22 @@
<section id="yet-another-timer timers">
{{#each timers }}
<section class="timer-card {{#if isPaused}}{{ localize "YAT.paused" }}{{/if}}" data-timer-name="{{name}}">
<h3 class="title">{{name}}</h3>
<section class="timer-card {{#if isPaused}}{{ localize "YAT.paused" }}{{/if}}" data-timer-name="{{ name }}">
<h3 class="title">{{ name }}</h3>
<div class="content">
<p>{{ localize "YAT.duration" }}: {{duration}}</p>
<p>{{ localize "YAT.time-remaining" }}: {{formatRemainingTime durationSeconds elapsedTimeSeconds}}</p>
<p>{{ localize "YAT.duration" }}: {{ duration }}</p>
<p>{{ localize "YAT.time-remaining" }}: {{ formatRemainingTime durationSeconds elapsedTimeSeconds }}</p>
</div>
<div class="actions">
{{#if isPaused}}
{{ isPaused }}
{{#if isPaused }}
<button class="button resume-button" data-action="resume">{{ localize "YAT.resume" }}</button>
{{else}}
<button class="button pause-button" data-action="pause">{{ localize "YAT.resume" }}</button>
{{/if}}
{{ else }}
<button class="button pause-button" data-action="pause">{{ localize "YAT.pause" }}</button>
{{/if }}
<button class="button delete-button" data-action="delete">{{ localize "YAT.delete" }}</button>
</div>
</section>
{{/each}}
{{/each }}
</section>