Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wallet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
wallet
Commits
57f61ac4
Commit
57f61ac4
authored
5 years ago
by
NGUYEN DINH Quoc-Huy
Browse files
Options
Downloads
Patches
Plain Diff
Differenciate between disabled and not producing
parent
a2294f84
No related branches found
No related tags found
2 merge requests
!11
merge autoclave into master
,
!7
Refresh Witnesses page design
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/app/components/pages/Witnesses.jsx
+53
-23
53 additions, 23 deletions
src/app/components/pages/Witnesses.jsx
src/app/components/pages/Witnesses.scss
+3
-0
3 additions, 0 deletions
src/app/components/pages/Witnesses.scss
src/app/locales/en.json
+5
-2
5 additions, 2 deletions
src/app/locales/en.json
with
61 additions
and
25 deletions
src/app/components/pages/Witnesses.jsx
+
53
−
23
View file @
57f61ac4
...
@@ -256,8 +256,7 @@ class Witnesses extends React.Component {
...
@@ -256,8 +256,7 @@ class Witnesses extends React.Component {
const
sbdExchangeRate
=
item
.
get
(
'
sbd_exchange_rate
'
);
const
sbdExchangeRate
=
item
.
get
(
'
sbd_exchange_rate
'
);
const
sbdExchangeUpdateDate
=
item
.
get
(
'
last_sbd_exchange_update
'
);
const
sbdExchangeUpdateDate
=
item
.
get
(
'
last_sbd_exchange_update
'
);
const
noBlock7days
=
(
head_block
-
lastBlock
)
*
3
>
604800
;
const
noBlock7days
=
(
head_block
-
lastBlock
)
*
3
>
604800
;
const
isDisabled
=
const
isDisabled
=
signingKey
==
DISABLED_SIGNING_KEY
;
signingKey
==
DISABLED_SIGNING_KEY
||
noBlock7days
;
const
votingActive
=
witnessVotesInProgress
.
has
(
owner
);
const
votingActive
=
witnessVotesInProgress
.
has
(
owner
);
const
classUp
=
const
classUp
=
'
Voting__button Voting__button-up
'
+
'
Voting__button Voting__button-up
'
+
...
@@ -328,7 +327,13 @@ class Witnesses extends React.Component {
...
@@ -328,7 +327,13 @@ class Witnesses extends React.Component {
</
td
>
</
td
>
<
td
className
=
"Witnesses__info"
>
<
td
className
=
"Witnesses__info"
>
<
Link
to
=
{
'
/@
'
+
owner
}
style
=
{
ownerStyle
}
>
<
Link
to
=
{
'
/@
'
+
owner
}
style
=
{
ownerStyle
}
>
<
Userpic
account
=
{
owner
}
size
=
"small"
/>
<
Userpic
account
=
{
owner
}
size
=
"small"
className
=
{
classnames
({
disabled
:
isDisabled
,
})
}
/>
</
Link
>
</
Link
>
<
div
className
=
"Witnesses__info"
>
<
div
className
=
"Witnesses__info"
>
<
div
>
<
div
>
...
@@ -353,30 +358,55 @@ class Witnesses extends React.Component {
...
@@ -353,30 +358,55 @@ class Witnesses extends React.Component {
</
div
>
</
div
>
<
div
>
<
div
>
<
small
>
<
small
>
{
witnessDescription
&&
(
{
noBlock7days
&&
(
<
div
className
=
"Witnesses__description"
>
<
div
>
{
witnessDescription
}
<
strong
>
<
span
role
=
"img"
aria-label
=
{
tt
(
'
witnesses_jsx.not_produced_over_a_week
'
)
}
>
⚠️
</
span
>
{
tt
(
'
witnesses_jsx.not_produced_over_a_week
'
)
}
</
strong
>
</
div
>
)
}
<
div
>
{
witnessDescription
&&
(
<
div
className
=
"Witnesses__description"
>
{
witnessDescription
}
</
div
>
)
}
{
tt
(
'
witnesses_jsx.last_block
'
)
}{
'
'
}
<
Link
to
=
{
`https://hiveblocks.com/b/
${
lastBlock
}
`
}
target
=
"_blank"
>
#
{
lastBlock
}
</
Link
>
{
'
'
}
{
_blockGap
(
head_block
,
lastBlock
)
}
on v
{
runningVersion
}
</
div
>
{
isDisabled
&&
(
<
div
>
{
`
${
tt
(
'
witnesses_jsx.disabled
'
)}
${
_blockGap
(
head_block
,
lastBlock
)}
`
}
</
div
>
</
div
>
)
}
)
}
Produced block
{
'
'
}
<
Link
to
=
{
`https://hiveblocks.com/b/
${
lastBlock
}
`
}
target
=
"_blank"
>
#
{
lastBlock
}
</
Link
>
{
'
'
}
{
_blockGap
(
head_block
,
lastBlock
)
}
on v
{
runningVersion
}
<
br
/>
{
isDisabled
&&
`,
${
tt
(
'
witnesses_jsx.disabled
'
)}
${
_blockGap
(
head_block
,
lastBlock
)}
`
}
{
!
isDisabled
&&
(
{
!
isDisabled
&&
(
<
div
>
<
div
>
{
tt
(
'
witnesses_jsx.witness_age
'
)
}
:
{
'
'
}
{
`
${
tt
(
{
witnessAge
}
'
witnesses_jsx.witness_age
'
)}
:
${
witnessAge
}
`
}
</
div
>
</
div
>
)
}
)
}
</
small
>
</
small
>
...
...
This diff is collapsed.
Click to expand it.
src/app/components/pages/Witnesses.scss
+
3
−
0
View file @
57f61ac4
...
@@ -25,6 +25,9 @@
...
@@ -25,6 +25,9 @@
@media
only
screen
and
(
max-width
:
779px
)
{
@media
only
screen
and
(
max-width
:
779px
)
{
display
:
none
;
display
:
none
;
}
}
}
td
.Witnesses__info
.Userpic.disabled
{
opacity
:
0
.4
;
}
}
.button
{
.button
{
background-color
:
$color-text-hive-red
;
background-color
:
$color-text-hive-red
;
...
...
This diff is collapsed.
Click to expand it.
src/app/locales/en.json
+
5
−
2
View file @
57f61ac4
...
@@ -481,7 +481,7 @@
...
@@ -481,7 +481,7 @@
"witnesses_jsx"
:
{
"witnesses_jsx"
:
{
"witness_thread"
:
"Open witness annoucement"
,
"witness_thread"
:
"Open witness annoucement"
,
"external_site"
:
"Open external site"
,
"external_site"
:
"Open external site"
,
"disabled"
:
"
d
isabled"
,
"disabled"
:
"
D
isabled"
,
"top_witnesses"
:
"Witness Voting"
,
"top_witnesses"
:
"Witness Voting"
,
"you_have_votes_remaining"
:
{
"you_have_votes_remaining"
:
{
"zero"
:
"You have no votes remaining"
,
"zero"
:
"You have no votes remaining"
,
...
@@ -505,7 +505,10 @@
...
@@ -505,7 +505,10 @@
"missed_blocks"
:
"Missed blocks"
,
"missed_blocks"
:
"Missed blocks"
,
"votes_received"
:
"Votes received"
,
"votes_received"
:
"Votes received"
,
"hp_required_to_rank_up"
:
"Needs %(votehp)s to level up"
,
"hp_required_to_rank_up"
:
"Needs %(votehp)s to level up"
,
"witness_age"
:
"Witness age"
"witness_age"
:
"Witness age"
,
"not_produced_over_a_week"
:
"Has not produced any blocks for over a week."
,
"last_block"
:
"Last block"
},
},
"votesandcomments_jsx"
:
{
"votesandcomments_jsx"
:
{
"no_responses_yet_click_to_respond"
:
"no_responses_yet_click_to_respond"
:
...
...
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