Compare commits

..

5 Commits

Author SHA1 Message Date
daniel31x13 5303d63e4b add option to disable preservation 2024-11-17 16:06:05 -05:00
Daniel 05a30e1ec6 Merge pull request #867 from clemenstyp/fixed-placeholder
fixed placeholder in german translation (delete collection)
2024-11-16 09:13:21 -05:00
daniel31x13 b1a55785b5 import dates as well 2024-11-16 08:58:03 -05:00
Clemens Eyhoff 24b47e9d4b fixed an other uppercase placeholder 2024-11-16 14:49:07 +01:00
Clemens Eyhoff 34d19f9dbe fixed placeholder (was upper case) 2024-11-16 12:46:44 +01:00
4 changed files with 20 additions and 4 deletions
+1
View File
@@ -36,6 +36,7 @@ PREVIEW_MAX_BUFFER=
IMPORT_LIMIT=
PLAYWRIGHT_LAUNCH_OPTIONS_EXECUTABLE_PATH=
MAX_WORKERS=
DISABLE_PRESERVATION=
# AWS S3 Settings
SPACES_KEY=
+15 -1
View File
@@ -21,6 +21,19 @@ type LinksAndCollectionAndOwner = Link & {
const BROWSER_TIMEOUT = Number(process.env.BROWSER_TIMEOUT) || 5;
export default async function archiveHandler(link: LinksAndCollectionAndOwner) {
if (process.env.DISABLE_PRESERVATION === "true")
return await prisma.link.update({
where: { id: link.id },
data: {
lastPreserved: new Date().toISOString(),
readable: "unavailable",
image: "unavailable",
monolith: "unavailable",
pdf: "unavailable",
preview: "unavailable",
},
});
const timeoutPromise = new Promise((_, reject) => {
setTimeout(
() =>
@@ -44,7 +57,8 @@ export default async function archiveHandler(link: LinksAndCollectionAndOwner) {
};
}
if (process.env.PLAYWRIGHT_LAUNCH_OPTIONS_EXECUTABLE_PATH) {
browserOptions.executablePath = process.env.PLAYWRIGHT_LAUNCH_OPTIONS_EXECUTABLE_PATH;
browserOptions.executablePath =
process.env.PLAYWRIGHT_LAUNCH_OPTIONS_EXECUTABLE_PATH;
}
const browser = await chromium.launch(browserOptions);
@@ -66,6 +66,7 @@ export default async function importFromLinkwarden(
url: link.url?.trim().slice(0, 254),
name: link.name?.trim().slice(0, 254),
description: link.description?.trim().slice(0, 254),
importDate: new Date(link.importDate || link.createdAt),
collection: {
connect: {
id: newCollection.id,
+3 -3
View File
@@ -236,7 +236,7 @@
"pwa_install_prompt": "Installiere Linkwarden auf deinem Startbildschirm für einen schnelleren Zugriff und ein besseres Erlebnis. <0>Mehr erfahren</0>",
"full_content": "Vollständiger Inhalt",
"slower": "Langsamer",
"new_version_announcement": "Schau, was neu ist in <0>Linkwarden {{Version}}!</0>",
"new_version_announcement": "Schau, was neu ist in <0>Linkwarden {{version}}!</0>",
"creating": "Erstellen...",
"upload_file": "Datei hochladen",
"file": "Datei",
@@ -343,8 +343,8 @@
"shift_key_tip": "Halte die Umschalttaste gedrückt, während du auf „Löschen“ klickst, um diese Bestätigung in Zukunft zu umgehen.",
"deleting_collection": "Lösche...",
"collection_deleted": "Sammlung gelöscht.",
"confirm_deletion_prompt": "Zur Bestätigung tippe „{{Name}}“ in das Feld unten:",
"type_name_placeholder": "Tippe „{{Name}}“ hier.",
"confirm_deletion_prompt": "Zur Bestätigung tippe „{{name}}“ in das Feld unten:",
"type_name_placeholder": "Tippe „{{name}}“ hier.",
"deletion_warning": "Wenn Du diese Sammlung löschst, wird ihr gesamter Inhalt unwiderruflich gelöscht und sie wird für jeden unzugänglich, auch für Mitglieder mit vorherigem Zugriff.",
"leave_prompt": "Klicke auf die Schaltfläche unten, um die aktuelle Sammlung zu verlassen.",
"leave": "Verlassen",