Merge branch 'main' into shuuji3/a11y/show-nav-botton-label
This commit is contained in:
commit
58c8aff782
6 changed files with 36 additions and 8 deletions
|
|
@ -60,7 +60,8 @@ export function nodeToVNode(node: Node): VNode | string | null {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('children' in node) {
|
if ('children' in node) {
|
||||||
if (node.name === 'a' && (node.attributes.href?.startsWith('/') || node.attributes.href?.startsWith('.'))) {
|
if (node.name === 'a') {
|
||||||
|
if (node.attributes.href?.startsWith('/') || node.attributes.href?.startsWith('.')) {
|
||||||
node.attributes.to = node.attributes.href
|
node.attributes.to = node.attributes.href
|
||||||
|
|
||||||
const { href: _href, target: _target, ...attrs } = node.attributes
|
const { href: _href, target: _target, ...attrs } = node.attributes
|
||||||
|
|
@ -70,6 +71,29 @@ export function nodeToVNode(node: Node): VNode | string | null {
|
||||||
() => node.children.map(treeToVNode),
|
() => node.children.map(treeToVNode),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fix #3122
|
||||||
|
return h(
|
||||||
|
node.name,
|
||||||
|
node.attributes,
|
||||||
|
node.children.map((n: Node) => {
|
||||||
|
// replace span.ellipsis with bdi.ellipsis inside links
|
||||||
|
if (n && n.type === ELEMENT_NODE && n.name !== 'bdi' && n.attributes?.class?.includes('ellipsis')) {
|
||||||
|
const children = n.children.splice(0, n.children.length)
|
||||||
|
const bdi = {
|
||||||
|
...n,
|
||||||
|
name: 'bdi',
|
||||||
|
children,
|
||||||
|
} satisfies ElementNode
|
||||||
|
children.forEach((n: Node) => n.parent = bdi)
|
||||||
|
return treeToVNode(bdi)
|
||||||
|
}
|
||||||
|
|
||||||
|
return treeToVNode(n)
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
return h(
|
return h(
|
||||||
node.name,
|
node.name,
|
||||||
node.attributes,
|
node.attributes,
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,7 @@
|
||||||
"attachments_limit_video_error": "Tamaño máximo de video excedido: {0}"
|
"attachments_limit_video_error": "Tamaño máximo de video excedido: {0}"
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
|
"pinned": "Publicaciones ancladas",
|
||||||
"spoiler_show_less": "Menos"
|
"spoiler_show_less": "Menos"
|
||||||
},
|
},
|
||||||
"tab": {
|
"tab": {
|
||||||
|
|
|
||||||
|
|
@ -634,6 +634,7 @@
|
||||||
"dismiss": "Descartar",
|
"dismiss": "Descartar",
|
||||||
"read": "Leer la descripción de la imagen {0}"
|
"read": "Leer la descripción de la imagen {0}"
|
||||||
},
|
},
|
||||||
|
"pinned": "Publicaciones fijadas",
|
||||||
"poll": {
|
"poll": {
|
||||||
"count": "{0} votos|{0} voto|{0} votos",
|
"count": "{0} votos|{0} voto|{0} votos",
|
||||||
"ends": "finaliza {0}",
|
"ends": "finaliza {0}",
|
||||||
|
|
@ -714,6 +715,7 @@
|
||||||
"year_past": "hace 0 años|el año pasado|hace {n} años"
|
"year_past": "hace 0 años|el año pasado|hace {n} años"
|
||||||
},
|
},
|
||||||
"timeline": {
|
"timeline": {
|
||||||
|
"no_posts": "¡No hay publicaciones aquí!",
|
||||||
"show_new_items": "Mostrar {v} nuevas publicaciones|Mostrar {v} nueva publicación|Mostrar {v} nuevas publicaciones",
|
"show_new_items": "Mostrar {v} nuevas publicaciones|Mostrar {v} nueva publicación|Mostrar {v} nuevas publicaciones",
|
||||||
"view_older_posts": "Es posible que no se muestren las publicaciones antiguas de otras instancias."
|
"view_older_posts": "Es posible que no se muestren las publicaciones antiguas de otras instancias."
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -633,6 +633,7 @@
|
||||||
"dismiss": "Baztertu",
|
"dismiss": "Baztertu",
|
||||||
"read": "Irakurri {0} deskribapena"
|
"read": "Irakurri {0} deskribapena"
|
||||||
},
|
},
|
||||||
|
"pinned": "Finkatutako bidalketa",
|
||||||
"poll": {
|
"poll": {
|
||||||
"count": "{0} boto|boto {0}|{0} boto",
|
"count": "{0} boto|boto {0}|{0} boto",
|
||||||
"ends": "epemuga: {0}",
|
"ends": "epemuga: {0}",
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ export async function deleteApp(server: string) {
|
||||||
export async function listServers() {
|
export async function listServers() {
|
||||||
const keys = await storage.getKeys('servers:v3:')
|
const keys = await storage.getKeys('servers:v3:')
|
||||||
const servers = new Set<string>()
|
const servers = new Set<string>()
|
||||||
for await (const key of keys) {
|
for (const key of keys) {
|
||||||
const id = key.split(':')[2]
|
const id = key.split(':')[2]
|
||||||
if (id)
|
if (id)
|
||||||
servers.add(id.toLocaleLowerCase())
|
servers.add(id.toLocaleLowerCase())
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,7 @@ exports[`content-rich > link + mention 1`] = `
|
||||||
rel="nofollow noopener noreferrer"
|
rel="nofollow noopener noreferrer"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
><span class="invisible">https://</span
|
><span class="invisible">https://</span
|
||||||
><span class="ellipsis">github.com/ayoayco/astro-react</span
|
><bdi class="ellipsis">github.com/ayoayco/astro-react</bdi
|
||||||
><span class="invisible">ive-library/pull/203</span></a
|
><span class="invisible">ive-library/pull/203</span></a
|
||||||
>
|
>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue