Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Block Explorer UI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
Block Explorer UI
Commits
a30c5910
Commit
a30c5910
authored
5 months ago
by
Lukas
Committed by
mcfarhat
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Add last updated tooltip component to votes and voters dialogs
parent
d268d2cb
No related branches found
No related tags found
2 merge requests
!481
bring recent develop changes to mater to match the backend
,
!464
Lbudginas/#371 adjust last updated status
Pipeline
#109042
failed
5 months ago
Stage: build
Stage: test
Stage: test-report-aggregate
Stage: cleanup
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
components/Witnesses/VotersDialog.tsx
+5
-3
5 additions, 3 deletions
components/Witnesses/VotersDialog.tsx
components/Witnesses/VotesHistoryDialog.tsx
+8
-9
8 additions, 9 deletions
components/Witnesses/VotesHistoryDialog.tsx
pages/witnesses.tsx
+3
-3
3 additions, 3 deletions
pages/witnesses.tsx
with
16 additions
and
15 deletions
components/Witnesses/VotersDialog.tsx
+
5
−
3
View file @
a30c5910
...
@@ -13,10 +13,10 @@ import {
...
@@ -13,10 +13,10 @@ import {
TableHeader
,
TableHeader
,
TableRow
,
TableRow
,
}
from
"
@/components/ui/table
"
;
}
from
"
@/components/ui/table
"
;
import
{
Switch
}
from
"
../ui/switch
"
;
import
useWitnessDetails
from
"
@/hooks/api/common/useWitnessDetails
"
;
import
useWitnessDetails
from
"
@/hooks/api/common/useWitnessDetails
"
;
import
CustomPagination
from
"
../CustomPagination
"
;
import
CustomPagination
from
"
../CustomPagination
"
;
import
{
config
}
from
"
@/Config
"
;
import
{
config
}
from
"
@/Config
"
;
import
LastUpdatedTooltip
from
"
../LastUpdatedTooltip
"
;
type
VotersDialogProps
=
{
type
VotersDialogProps
=
{
accountName
:
string
;
accountName
:
string
;
...
@@ -91,9 +91,11 @@ const VotersDialog: React.FC<VotersDialogProps> = ({
...
@@ -91,9 +91,11 @@ const VotersDialog: React.FC<VotersDialogProps> = ({
<
Loader2
className
=
"animate-spin mt-1 h-4 w-4 ml-3 ..."
/>
<
Loader2
className
=
"animate-spin mt-1 h-4 w-4 ml-3 ..."
/>
)
}
)
}
</
div
>
</
div
>
<
div
className
=
"flex justify-
betwe
en"
>
<
div
className
=
"flex justify-en
d
"
>
{
witnessDetails
&&
(
{
witnessDetails
&&
(
<
p
>
Last updated :
{
witnessDetails
.
votes_updated_at
}
</
p
>
<
LastUpdatedTooltip
lastUpdatedAt
=
{
witnessDetails
.
votes_updated_at
}
/>
)
}
)
}
</
div
>
</
div
>
...
...
This diff is collapsed.
Click to expand it.
components/Witnesses/VotesHistoryDialog.tsx
+
8
−
9
View file @
a30c5910
...
@@ -22,6 +22,7 @@ import JumpToPage from "../JumpToPage";
...
@@ -22,6 +22,7 @@ import JumpToPage from "../JumpToPage";
import
CustomPagination
from
"
../CustomPagination
"
;
import
CustomPagination
from
"
../CustomPagination
"
;
import
DateTimePicker
from
"
../DateTimePicker
"
;
import
DateTimePicker
from
"
../DateTimePicker
"
;
import
useWitnessDetails
from
"
@/hooks/api/common/useWitnessDetails
"
;
import
useWitnessDetails
from
"
@/hooks/api/common/useWitnessDetails
"
;
import
LastUpdatedTooltip
from
"
../LastUpdatedTooltip
"
;
type
VotersDialogProps
=
{
type
VotersDialogProps
=
{
accountName
:
string
;
accountName
:
string
;
...
@@ -84,13 +85,9 @@ const VotesHistoryDialog: React.FC<VotersDialogProps> = ({
...
@@ -84,13 +85,9 @@ const VotesHistoryDialog: React.FC<VotersDialogProps> = ({
onOpenChange
=
{
changeVoteHistoryDialogue
}
onOpenChange
=
{
changeVoteHistoryDialogue
}
>
>
<
DialogContent
<
DialogContent
className
=
{
cn
(
className
=
{
cn
(
"
h-3/4 max-w-4xl bg-explorer-bg-start
"
,
{
"
max-w-2xl max-h-[700px] bg-explorer-bg-start overflow-auto
"
,
"
flex justify-center items-center
"
:
!
votesHistory
,
{
})
}
"
flex column justify-center items-center
"
:
!
votesHistory
,
"
h-3/4
"
:
votesHistory
?.
length
>=
16
,
}
)
}
data-testid
=
"votes-history-dialog"
data-testid
=
"votes-history-dialog"
>
>
{
votesHistory
?
(
{
votesHistory
?
(
...
@@ -104,9 +101,11 @@ const VotesHistoryDialog: React.FC<VotersDialogProps> = ({
...
@@ -104,9 +101,11 @@ const VotesHistoryDialog: React.FC<VotersDialogProps> = ({
<
Loader2
className
=
"animate-spin mt-1 h-4 w-4 ml-3 ..."
/>
<
Loader2
className
=
"animate-spin mt-1 h-4 w-4 ml-3 ..."
/>
)
}
)
}
</
div
>
</
div
>
<
div
className
=
"flex justify-
betwe
en"
>
<
div
className
=
"flex justify-en
d
"
>
{
witnessDetails
&&
(
{
witnessDetails
&&
(
<
p
>
Last updated :
{
witnessDetails
.
votes_updated_at
}
</
p
>
<
LastUpdatedTooltip
lastUpdatedAt
=
{
witnessDetails
.
votes_updated_at
}
/>
)
}
)
}
</
div
>
</
div
>
<
div
className
=
"flex justify-around items-center bg-explorer-bg-start rounded text-text p-2"
>
<
div
className
=
"flex justify-around items-center bg-explorer-bg-start rounded text-text p-2"
>
...
...
This diff is collapsed.
Click to expand it.
pages/witnesses.tsx
+
3
−
3
View file @
a30c5910
...
@@ -25,7 +25,7 @@ import {
...
@@ -25,7 +25,7 @@ import {
import
VotersDialog
from
"
@/components/Witnesses/VotersDialog
"
;
import
VotersDialog
from
"
@/components/Witnesses/VotersDialog
"
;
import
VotesHistoryDialog
from
"
@/components/Witnesses/VotesHistoryDialog
"
;
import
VotesHistoryDialog
from
"
@/components/Witnesses/VotesHistoryDialog
"
;
import
WitnessScheduleIcon
from
"
@/components/WitnessScheduleIcon
"
;
import
WitnessScheduleIcon
from
"
@/components/WitnessScheduleIcon
"
;
import
LastUpdated
WitnessIcon
from
"
@/components/LastUpdated
WitnessIcon
"
;
import
LastUpdated
Tooltip
from
"
@/components/LastUpdated
Tooltip
"
;
const
TABLE_CELLS
=
[
const
TABLE_CELLS
=
[
"
Rank
"
,
"
Rank
"
,
...
@@ -170,8 +170,8 @@ export default function Witnesses() {
...
@@ -170,8 +170,8 @@ export default function Witnesses() {
</
Head
>
</
Head
>
<
div
className
=
"md:m-8 max-w-[100vw] px-4"
>
<
div
className
=
"md:m-8 max-w-[100vw] px-4"
>
<
div
className
=
"flex justify-between mt-1 mx-1"
>
<
div
className
=
"flex justify-between mt-1 mx-1"
>
<
WitnessScheduleIcon
/>
<
WitnessScheduleIcon
/>
<
LastUpdated
WitnessIcon
lastUpdatedAt
=
{
witnessesData
.
votes_updated_at
}
/>
<
LastUpdated
Tooltip
lastUpdatedAt
=
{
witnessesData
.
votes_updated_at
}
/>
</
div
>
</
div
>
<
VotersDialog
<
VotersDialog
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment