]> source.dussan.org Git - gitea.git/commitdiff
Fix incorrect last online time in runner_edit.tmpl (#24376)
authoryp05327 <576951401@qq.com>
Thu, 27 Apr 2023 07:56:49 +0000 (16:56 +0900)
committerGitHub <noreply@github.com>
Thu, 27 Apr 2023 07:56:49 +0000 (15:56 +0800)
Before:

![image](https://user-images.githubusercontent.com/18380374/234772748-7f4b416f-4056-4a5e-89f0-727d2fa14a41.png)

After:

![image](https://user-images.githubusercontent.com/18380374/234772682-8b076054-d0be-4f5f-892d-8d0427275493.png)

templates/shared/actions/runner_edit.tmpl

index d64479e19badfbaea3bac0ee7457ba3e1e0ce42b..c9edc59b1da86c3f532c40d2cda8495ae6703636 100644 (file)
@@ -13,7 +13,7 @@
                                </div>
                                <div class="field gt-dib gt-mr-4 disabled">
                                        <label>{{.locale.Tr "actions.runners.last_online"}}</label>
-                                       <span>{{TimeSinceUnix .Runner.LastOnline $.locale}}</span>
+                                       <span>{{if .LastOnline}}{{TimeSinceUnix .LastOnline $.locale}}{{else}}{{$.locale.Tr "never"}}{{end}}</span>
                                </div>
                                <div class="field gt-dib gt-mr-4 disabled">
                                        <label>{{.locale.Tr "actions.runners.agent_labels"}}</label>