Skip to content

Commit e6d4759

Browse files
committed
fix: allow modifying go-cat web title
1 parent 67ad8ba commit e6d4759

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

ui/go-cat-ui/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="utf-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77

8-
<title>Environment Catalog - go-cat</title>
8+
<title>go-cat</title>
99

1010
<link
1111
rel="stylesheet"

ui/go-cat-ui/src/App.svelte

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ import Monitoring from './Monitoring.svelte';
2828
import InfraType from './InfraType.svelte';
2929
3030
let data = infra_json["infra"];
31+
let catalog_name = import.meta.env.VITE_APP_CATALOG_NAME;
32+
if (catalog_name == "" || catalog_name == null) {
33+
catalog_name = "Environment Catalog"
34+
}
3135
3236
const fuse = new Fuse(data, {
3337
keys: [
@@ -70,13 +74,17 @@ import InfraType from './InfraType.svelte';
7074
7175
</script>
7276

77+
<svelte:head>
78+
<title> {catalog_name} | go-cat </title>
79+
</svelte:head>
7380

7481

7582
<main>
83+
7684
<section class="section">
7785
<div class="container">
7886

79-
<h1 class="title">Environment List</h1>
87+
<h1 class="title">{catalog_name}</h1>
8088
<p id="last_updated" class="subtitle is-loading">
8189
Last updated <strong>{relativeTime.from(new Date(infra_json["updated_at"]))}</strong>.
8290
</p>
@@ -207,4 +215,4 @@ import InfraType from './InfraType.svelte';
207215

208216
</div>
209217
</section>
210-
</main>
218+
</main>

0 commit comments

Comments
 (0)