Merge branch 'develop' of https://codeberg.org/calckey/calckey into timelines

This commit is contained in:
freeplay 2023-07-17 20:39:22 -04:00
commit d52b5bf563
8 changed files with 49 additions and 11 deletions

View file

@ -808,7 +808,7 @@ autoAcceptFollowed: Aprova automàticament les peticions de seguiment d'usuaris
accountMoved: "L'usuari s'ha mogut a un compte nou:"
addAccount: Afegeix un compte
loginFailed: No s'ha pogut iniciar sessió
showOnRemote: Mostra al servidor remot
showOnRemote: Obre la pàgina original
wallpaper: Fons de pantalla
setWallpaper: Estableix fons de pantalla
removeWallpaper: Elimina el fons de pantalla

View file

@ -2104,3 +2104,8 @@ _skinTones:
medium: "Medium"
mediumDark: "Medium Dark"
dark: "Dark"
_feeds:
copyFeed: "Copy feed"
rss: "RSS"
atom: "Atom"
jsonFeed: "JSON feed"

View file

@ -46,7 +46,7 @@ function processMastoFile(fn: string, path: string, dir: string, uid: string) {
for (const note of outbox.orderedItems) {
for (const attachment of note.object.attachment) {
const url = attachment.url.replaceAll("..", "");
if (url.indexOf('\0') !== -1) {
if (url.indexOf("\0") !== -1) {
logger.error(`Found Poison Null Bytes Attack: ${url}`);
reject();
return;

View file

@ -16,7 +16,10 @@ async function getRelMeLinks(url: string): Promise<string[]> {
}
}
export async function verifyLink(link: string, username: string): Promise<boolean> {
export async function verifyLink(
link: string,
username: string,
): Promise<boolean> {
let verified = false;
if (link.startsWith("http")) {
const relMeLinks = await getRelMeLinks(link);

View file

@ -61,11 +61,13 @@
<div class="buttons">
<button
v-if="media.comment"
v-tooltip.noLabel="`${i18n.ts.alt}: ${
media.comment.length > 200 ?
media.comment.trim().slice(0, 200) + '...'
: media.comment.trim()
}`"
v-tooltip.noLabel="
`${i18n.ts.alt}: ${
media.comment.length > 200
? media.comment.trim().slice(0, 200) + '...'
: media.comment.trim()
}`
"
:aria-label="i18n.ts.alt"
class="_button"
@click.stop="captionPopup"

View file

@ -127,8 +127,8 @@
</FormFolder>
<template #caption>{{
i18n.t("_profile.metadataDescription", {
a: '<code><a></code>',
l: '<code><a></code>',
a: '\<code\>\<a\>\</code\>',
l: '\<code\>\<a\>\</code\>',
rel: `rel="me" href="https://${host}/@${$i.username}"`
})
}}</template>

View file

@ -755,7 +755,7 @@ onUnmounted(() => {
margin-bottom: 8px;
}
&.verified {
&.verified {
background-color: var(--hover);
border-radius: 10px;
color: var(--badge) !important;

View file

@ -245,6 +245,34 @@ export function getUserMenu(user, router: Router = mainRouter) {
router.push(`/user-info/${user.id}`);
},
},
{
icon: "ph-newspaper ph-bold ph-lg",
text: i18n.ts._feeds.copyFeed,
type: "parent",
children: [
{
icon: "ph-rss ph-bold ph-lg",
text: i18n.ts._feeds.rss,
action: () => {
copyToClipboard(`https://${host}/@${user.username}.rss`);
},
},
{
icon: "ph-atom ph-bold ph-lg",
text: i18n.ts._feeds.atom,
action: () => {
copyToClipboard(`https://${host}/@${user.username}.atom`);
},
},
{
icon: "ph-brackets-curly ph-bold ph-lg",
text: i18n.ts._feeds.jsonFeed,
action: () => {
copyToClipboard(`https://${host}/@${user.username}.json`);
},
},
],
},
{
icon: "ph-envelope-simple-open ph-bold ph-lg",
text: i18n.ts.sendMessage,