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 = { const overrides = {
height: "auto", height: "auto",
width: "33rem",
id: "yet-another-timer", id: "yet-another-timer",
template: templatePath, template: templatePath,
title: game.i18n?.localize("YAT.title") || "Yet another timer", title: game.i18n?.localize("YAT.title") || "Yet another timer",

View File

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

View File

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