Skip to content

Commit

Permalink
Fix a mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
Thunnini committed Oct 8, 2024
1 parent 1e9ca5a commit c83f667
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const CollapsibleList: FunctionComponent<CollapsibleListProps> = ({
lenAlwaysShown,
hideNumInTitle,
notRenderHiddenItems,
altViewMoreIntlTextId,
}) => {
if (!lenAlwaysShown || lenAlwaysShown < 0) {
lenAlwaysShown = items.length;
Expand Down Expand Up @@ -116,7 +117,11 @@ export const CollapsibleList: FunctionComponent<CollapsibleListProps> = ({
<Button2>
{isCollapsed
? intl.formatMessage(
{ id: "components.collapsible-list.view-more-tokens" },
{
id:
altViewMoreIntlTextId ||
"components.collapsible-list.view-more-tokens",
},
{ remain: hidden.length }
)
: intl.formatMessage({
Expand Down
2 changes: 2 additions & 0 deletions apps/extension/src/components/collapsible-list/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ export interface CollapsibleListProps {
// 이걸 키면 리스트가 길때 성능이 조금 더 좋아진다.
// 하지만 부작용으로 펼칠때는 트랜지션없이 즉각적으로 펼쳐진다.
notRenderHiddenItems?: boolean;

altViewMoreIntlTextId?: string;
}
1 change: 1 addition & 0 deletions apps/extension/src/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@

"components.collapsible-list.view-more-tokens": "View {remain} more tokens",
"components.collapsible-list.collapse": "Collapse",
"components.collapsible-list.view-more": "View {remain} more",

"button.confirm": "Confirm",
"button.ok": "OK",
Expand Down
1 change: 1 addition & 0 deletions apps/extension/src/languages/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@

"components.collapsible-list.view-more-tokens": "{remain}개의 토큰 더보기",
"components.collapsible-list.collapse": "접기",
"components.collapsible-list.view-more": "{remain}개 더보기",

"button.confirm": "확인",
"button.ok": "확인",
Expand Down
1 change: 1 addition & 0 deletions apps/extension/src/pages/setting/general/authz/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ export const SettingGeneralAuthZPage: FunctionComponent = observer(() => {
key={title}
title={<H4>{title}</H4>}
lenAlwaysShown={2}
altViewMoreIntlTextId="components.collapsible-list.view-more"
items={grants.map((grant) => (
<GrantView
key={`${grant.authorization}-${grant.grantee}-${grant.expiration}`}
Expand Down

0 comments on commit c83f667

Please sign in to comment.