Skip to content

Commit 528e64d

Browse files
committed
Merge branch 'develop' of ssh://github.com/element-hq/element-web into renovate/major-typescript
# Conflicts: # pnpm-lock.yaml
2 parents f9372a3 + f0eb954 commit 528e64d

File tree

8 files changed

+80
-38
lines changed

8 files changed

+80
-38
lines changed

.github/renovate.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,36 @@
44
"postUpdateOptions": ["pnpmDedupe"],
55
"packageRules": [
66
{
7+
"description": "Group all testcontainers docker digests",
78
"groupName": "testcontainers docker digests",
89
"groupSlug": "testcontainers-docker",
910
"matchDepTypes": ["testcontainers-docker"],
1011
"matchPackageNames": ["*"]
12+
},
13+
{
14+
"description": "Separate updates to overrides from other groups",
15+
"matchDepTypes": ["pnpm.overrides"],
16+
"groupSlug": null
17+
},
18+
{
19+
"description": "Disable any major updates to overrides as this almost always is wrong",
20+
"matchDepTypes": ["pnpm.overrides"],
21+
"matchUpdateTypes": ["major"],
22+
"enabled": false
1123
}
1224
],
1325
"customManagers": [
1426
{
27+
"description": "Update testcontainers docker digests",
1528
"customType": "regex",
1629
"datasourceTemplate": "docker",
1730
"versioningTemplate": "loose",
18-
"description": "Update testcontainers docker digests",
1931
"managerFilePatterns": ["**/testcontainers/*.ts"],
2032
"matchStrings": ["\\s+\"(?<depName>[^@]+):(?<currentValue>[^@]+)@(?<currentDigest>sha256:[a-f0-9]+)\""],
2133
"depTypeTemplate": "testcontainers-docker"
2234
},
2335
{
36+
"description": "Update element-desktop hakDependencies",
2437
"customType": "jsonata",
2538
"managerFilePatterns": ["/(^|/)package\\.json$/"],
2639
"fileFormat": "json",

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"glob-to-regexp": "^0.4.1",
7373
"highlight.js": "^11.3.1",
7474
"html-entities": "^2.0.0",
75-
"html-react-parser": "^5.2.2",
75+
"html-react-parser": "^6.0.0",
7676
"is-ip": "^5.0.0",
7777
"js-xxhash": "^5.0.0",
7878
"jsrsasign": "^11.0.0",

apps/web/src/components/views/messages/CodeBlock.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
77

88
import React, { type JSX, useState } from "react";
99
import classNames from "classnames";
10-
import { type DOMNode, Element as ParserElement, domToReact } from "html-react-parser";
10+
import { type DOMNode, type Element as ParserElement, domToReact } from "html-react-parser";
1111
import { textContent, getInnerHTML } from "domutils";
1212
import { CollapseIcon, CopyIcon, ExpandIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
1313

@@ -113,7 +113,7 @@ const CodeBlock: React.FC<Props> = ({ preNode }) => {
113113
let content = domToReact(preNode.children as DOMNode[]);
114114

115115
// Add code element if it's missing since we depend on it
116-
if (!preNode.children.some((child) => child instanceof ParserElement && child.tagName.toUpperCase() === "CODE")) {
116+
if (!preNode.children.some((child) => child.type === "tag" && child.tagName.toUpperCase() === "CODE")) {
117117
content = <code>{content}</code>;
118118
}
119119

apps/web/src/i18n/strings/zh_Hans.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,12 @@
680680
"unfederated_label_default_on": "如果此房间将用于与拥有自己主服务器的外部团队协作,你可以禁用此功能。此设置以后无法更改。",
681681
"unsupported_version": "服务器不支持指定的房间版本。"
682682
},
683+
"create_section_dialog": {
684+
"create_section": "创建区域",
685+
"description": "区域仅对你可见",
686+
"label": "区域名称",
687+
"title": "创建区域"
688+
},
683689
"create_space": {
684690
"add_details_prompt": "添加一些信息以便人们识别。",
685691
"add_details_prompt_2": "你可以随时更改。",
@@ -3077,7 +3083,7 @@
30773083
"category_messages": "消息",
30783084
"category_other": "其它",
30793085
"command_error": "指令出错",
3080-
"converttodm": "转换房间到私聊",
3086+
"converttodm": "转换房间为私聊",
30813087
"converttoroom": "转换私聊到房间",
30823088
"could_not_find_room": "无法找到房间",
30833089
"deop": "通过指定的 ID 降权用户",

apps/web/src/renderer/utils.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Please see LICENSE files in the repository root for full details.
66
*/
77

88
import { type JSX } from "react";
9-
import { type DOMNode, Element, type HTMLReactParserOptions, type Text } from "html-react-parser";
9+
import { type DOMNode, type Element, type HTMLReactParserOptions, type Text } from "html-react-parser";
1010
import { type MatrixEvent, type Room } from "matrix-js-sdk/src/matrix";
1111

1212
/**
@@ -89,7 +89,7 @@ export const combineRenderers =
8989
if (result) return result;
9090
}
9191
}
92-
if (node instanceof Element) {
92+
if (node.type === "tag") {
9393
const tagName = node.tagName.toLowerCase() as keyof HTMLElementTagNameMap;
9494
for (const replacer of renderers) {
9595
const result = replacer[tagName]?.(node, parametersWithReplace, index);

packages/shared-components/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"@vector-im/compound-design-tokens": "catalog:",
5757
"classnames": "^2.5.1",
5858
"counterpart": "^0.18.6",
59-
"html-react-parser": "^5.2.2",
59+
"html-react-parser": "^6.0.0",
6060
"linkify-html": "4.3.2",
6161
"linkify-react": "4.3.2",
6262
"linkify-string": "4.3.2",
@@ -109,7 +109,7 @@
109109
"eslint-plugin-unicorn": "^56.0.0",
110110
"prettier": "^3.6.2",
111111
"storybook": "^10.0.7",
112-
"storybook-addon-vis": "^3.1.2",
112+
"storybook-addon-vis": "^4.0.0",
113113
"typedoc": "^0.28.16",
114114
"typedoc-plugin-markdown": "^4.9.0",
115115
"typedoc-plugin-missing-exports": "^4.1.2",

packages/shared-components/src/i18n/strings/zh_Hans.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"action": {
66
"back": "返回",
77
"click": "点击",
8+
"close": "关闭",
89
"collapse": "折叠",
910
"delete": "删除",
1011
"dismiss": "忽略",
@@ -14,8 +15,11 @@
1415
"go": "转到",
1516
"hide": "隐藏",
1617
"invite": "邀请",
18+
"new_conversation": "新对话",
1719
"new_room": "新房间",
20+
"new_section": "新区域",
1821
"new_video_room": "新视频房间",
22+
"open_menu": "打开菜单",
1923
"pause": "暂停",
2024
"pin": "置顶",
2125
"play": "播放",
@@ -32,12 +36,14 @@
3236
"common": {
3337
"attachment": "附件",
3438
"encryption_enabled": "加密已启用",
39+
"loading": "正在载入…",
3540
"options": "选项",
3641
"preferences": "偏好",
3742
"state_encryption_enabled": "实验性的状态加密已启用"
3843
},
3944
"left_panel": {
40-
"open_dial_pad": "打开拨号键盘"
45+
"open_dial_pad": "打开拨号键盘",
46+
"separator_label": "点击或拖动以展开"
4147
},
4248
"notifications": {
4349
"all_messages": "所有消息",
@@ -110,7 +116,8 @@
110116
"leave_room": "离开房间",
111117
"low_priority": "低优先级",
112118
"mark_read": "设为已读",
113-
"mark_unread": "设为未读"
119+
"mark_unread": "设为未读",
120+
"move_to_section": "移动到"
114121
},
115122
"notification_options": "通知选项",
116123
"open_space_menu": "打开空间菜单",
@@ -119,6 +126,11 @@
119126
"more_options": "更多选项"
120127
},
121128
"room_options": "房间选项",
129+
"section_created": "区域已创建",
130+
"section_header": {
131+
"toggle": "切换区域 %(section)s",
132+
"toggle_unread": "切换到区域 %(section)s 中的未读房间"
133+
},
122134
"show_message_previews": "显示消息预览",
123135
"sort": "排序",
124136
"sort_type": {

pnpm-lock.yaml

Lines changed: 38 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)