Skip to content

Commit a5f6115

Browse files
committed
labels
1 parent 4d6e4b3 commit a5f6115

File tree

3 files changed

+48
-15
lines changed

3 files changed

+48
-15
lines changed

frontend/src/lib/components/staking/ProjectsTable.svelte

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,7 @@
3636
$: if ($authSignedInStore) {
3737
loadIcpSwapTickers();
3838
}
39-
40-
let columns: ProjectsTableColumn[] = [];
41-
$: columns = [
42-
{
43-
id: "title",
44-
title: $i18n.staking.nervous_systems,
45-
cellComponent: ProjectTitleCell,
46-
alignment: "left",
47-
templateColumns: ["2fr"],
48-
comparator: $authSignedInStore ? compareByProject : undefined,
49-
},
39+
const commonColumns: ProjectsTableColumn[] = [
5040
{
5141
id: "stake",
5242
title: $i18n.neuron_detail.stake,
@@ -77,6 +67,45 @@
7767
},
7868
];
7969
70+
let columns: ProjectsTableColumn[] = [];
71+
$: columns = [
72+
{
73+
id: "title",
74+
title: $i18n.staking.nervous_systems,
75+
cellComponent: ProjectTitleCell,
76+
alignment: "left",
77+
templateColumns: ["2fr"],
78+
comparator: $authSignedInStore ? compareByProject : undefined,
79+
},
80+
...commonColumns,
81+
];
82+
83+
let nnsColumns: ProjectsTableColumn[] = [];
84+
$: nnsColumns = [
85+
{
86+
id: "title",
87+
title: $i18n.staking.nervous_systems_nns,
88+
cellComponent: ProjectTitleCell,
89+
alignment: "left",
90+
templateColumns: ["2fr"],
91+
comparator: $authSignedInStore ? compareByProject : undefined,
92+
},
93+
...commonColumns,
94+
];
95+
96+
let snsColumns: ProjectsTableColumn[] = [];
97+
$: snsColumns = [
98+
{
99+
id: "title",
100+
title: $i18n.staking.nervous_systems_sns,
101+
cellComponent: ProjectTitleCell,
102+
alignment: "left",
103+
templateColumns: ["2fr"],
104+
comparator: $authSignedInStore ? compareByProject : undefined,
105+
},
106+
...commonColumns,
107+
];
108+
80109
let tableProjects: TableProject[];
81110
$: tableProjects = getTableProjects({
82111
universes: $selectableUniversesStore,
@@ -154,19 +183,19 @@
154183
{#if !$authSignedInStore}
155184
<ResponsiveTable
156185
tableData={nnsNeurons}
157-
{columns}
186+
columns={nnsColumns}
158187
on:nnsAction={handleAction}
159188
/>
160189

161190
<ResponsiveTable
162191
tableData={snsNeurons}
163-
{columns}
192+
columns={snsColumns}
164193
on:nnsAction={handleAction}
165194
/>
166195
{:else}
167196
<ResponsiveTable
168197
tableData={nnsNeurons}
169-
{columns}
198+
columns={nnsColumns}
170199
on:nnsAction={handleAction}
171200
bind:order={$projectsTableOrderStore}
172201
displayTableSettings
@@ -199,7 +228,7 @@
199228
{#if snsNeurons.length > 0}
200229
<ResponsiveTable
201230
tableData={snsNeurons}
202-
{columns}
231+
columns={snsColumns}
203232
on:nnsAction={handleAction}
204233
bind:order={$projectsTableOrderStore}
205234
displayTableSettings

frontend/src/lib/i18n/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@
338338
"title": "Stake and earn voting rewards",
339339
"text": "Earn voting rewards by staking your tokens in neurons. Neurons allow you to participate in governance of the Internet Computer, and DAOs deployed on the Internet Computer.",
340340
"nervous_systems": "Nervous Systems",
341+
"nervous_systems_nns": "NNS DAO",
342+
"nervous_systems_sns": "SNS DAO",
341343
"hide_no_neurons_header": "Neurons",
342344
"hide_no_neurons_toggle_label": "Hide projects with 0 neurons",
343345
"hide_no_neurons_table_hint": "Projects with 0 neurons are hidden.",

frontend/src/lib/types/i18n.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ interface I18nStaking {
351351
title: string;
352352
text: string;
353353
nervous_systems: string;
354+
nervous_systems_nns: string;
355+
nervous_systems_sns: string;
354356
hide_no_neurons_header: string;
355357
hide_no_neurons_toggle_label: string;
356358
hide_no_neurons_table_hint: string;

0 commit comments

Comments
 (0)