mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-20 11:41:14 +10:00
Compare commits
1 Commits
7z-fixes
...
0ce1f3124f
| Author | SHA1 | Date | |
|---|---|---|---|
| 0ce1f3124f |
@ -45,12 +45,12 @@ ENV NODE_ENV=production
|
||||
ENV NUXT_TELEMETRY_DISABLED=1
|
||||
|
||||
# RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn add --network-timeout 1000000 --no-lockfile --ignore-scripts prisma@6.11.1
|
||||
RUN apk add --no-cache pnpm 7zip
|
||||
RUN apk add --no-cache pnpm
|
||||
RUN pnpm install prisma@6.11.1
|
||||
# init prisma to download all required files
|
||||
RUN pnpm prisma init
|
||||
|
||||
COPY --from=build-system /app/prisma.config.ts ./
|
||||
COPY --from=build-system /app/package.json ./
|
||||
COPY --from=build-system /app/.output ./app
|
||||
COPY --from=build-system /app/prisma ./prisma
|
||||
COPY --from=build-system /app/build ./startup
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import type { RouteLocationNormalized } from "vue-router";
|
||||
import type { NavigationItem } from "./types";
|
||||
|
||||
export const useCurrentNavigationIndex = (
|
||||
@ -8,7 +9,7 @@ export const useCurrentNavigationIndex = (
|
||||
|
||||
const currentNavigation = ref(-1);
|
||||
|
||||
function calculateCurrentNavIndex(to: typeof route) {
|
||||
function calculateCurrentNavIndex(to: RouteLocationNormalized) {
|
||||
const validOptions = navigation
|
||||
.map((e, i) => ({ ...e, index: i }))
|
||||
.filter((e) => to.fullPath.startsWith(e.prefix));
|
||||
|
||||
@ -3,16 +3,16 @@
|
||||
"devices": {
|
||||
"capabilities": "Capacités",
|
||||
"lastConnected": "Dernière Connexion",
|
||||
"noDevices": "Aucun appareil n'est connecté à vôtre compte.",
|
||||
"noDevices": "Aucun appareil connecté à vôtre compte.",
|
||||
"platform": "Plateforme",
|
||||
"revoke": "Révoquer",
|
||||
"subheader": "Gérer les appareils authorisés à accéder à votre compte Drop.",
|
||||
"title": "Appareils"
|
||||
},
|
||||
"notifications": {
|
||||
"all": "Tout voir {arrow}",
|
||||
"all": "Voir tout {arrow}",
|
||||
"desc": "Voir et gérer vos notifications.",
|
||||
"markAllAsRead": "Tout marqué comme lu",
|
||||
"markAllAsRead": "Marquer tout comme lu",
|
||||
"markAsRead": "Marquer comme lu",
|
||||
"none": "Pas de notification",
|
||||
"notifications": "Notifications",
|
||||
@ -62,6 +62,7 @@
|
||||
"description": "Utiliser un code pour vous connecter à votre client Drop si vous ne pouvez pas ouvrir un navigateur web sur votre appareil.",
|
||||
"title": "Connecter votre client Drop"
|
||||
},
|
||||
"confirmPassword": "Confirmez @:auth.password",
|
||||
"displayName": "Nom d'Affichage",
|
||||
"email": "Email",
|
||||
"password": "Mot de passe",
|
||||
@ -147,6 +148,7 @@
|
||||
"auth": {
|
||||
"disabled": "Compte invalide or désactivé. Merci de contacter l'administrateur du serveur.",
|
||||
"invalidInvite": "Invitation invalide ou expirée",
|
||||
"invalidPassState": "Le mot de passe enregistré est invalide. Merci de contacter l'administrateur du serveur.",
|
||||
"invalidUserOrPass": "Nom d'utilisateur ou password invalide.",
|
||||
"inviteIdRequired": "id est requis pour récupérer l'invitation",
|
||||
"method": {
|
||||
@ -155,6 +157,10 @@
|
||||
"usernameTaken": "Nom d'utilisateur déjà pris."
|
||||
},
|
||||
"backHome": "{arrow} Retour a l'accueil",
|
||||
"externalUrl": {
|
||||
"subtitle": "Ce message n'est visible qu'aux administrateurs.",
|
||||
"title": "Accès via une EXTERNAL_URL différente. Veuillez consulter la documentation."
|
||||
},
|
||||
"game": {
|
||||
"banner": {
|
||||
"description": "Drop a échoué a mettre à jour l'image de la bannière : {0}",
|
||||
@ -215,6 +221,7 @@
|
||||
"revokeClient": "Échec de la révocation du client",
|
||||
"revokeClientFull": "Échec de la revocation du client {0}",
|
||||
"signIn": "Se connecter {arrow}",
|
||||
"support": "Assistance Discord",
|
||||
"unknown": "Une erreur inconnue est survenue",
|
||||
"upload": {
|
||||
"description": "Drop n'a pas pu uploader le fichier : {0}",
|
||||
@ -254,7 +261,11 @@
|
||||
"admin": {
|
||||
"admin": "Administration",
|
||||
"metadata": "Méta",
|
||||
"settings": "Paramètres",
|
||||
"settings": {
|
||||
"store": "Store",
|
||||
"title": "Paramètres",
|
||||
"tokens": "API tokens"
|
||||
},
|
||||
"tasks": "Tâches",
|
||||
"users": "Utilisateurs"
|
||||
},
|
||||
@ -327,6 +338,8 @@
|
||||
},
|
||||
"withoutMetadata": "Importer sans les données méta"
|
||||
},
|
||||
"libraryHint": "Pas de bibliothèque configurée.",
|
||||
"libraryHintDocsLink": "Qu'est-ce que cela veut dire ? {arrow}",
|
||||
"metadata": {
|
||||
"companies": {
|
||||
"action": "Gérer {arrow}",
|
||||
@ -340,15 +353,25 @@
|
||||
"description": "Les sociétés organisent les jeux par qui les a développer ou éditer.",
|
||||
"editor": {
|
||||
"action": "Ajouter un jeu {plus}",
|
||||
"descriptionPlaceholder": "{'<'}description{'>'}",
|
||||
"developed": "Développé",
|
||||
"libraryDescription": "Ajouter, supprimer ou personnaliser ce que cette société a développé et/ou publié.",
|
||||
"libraryTitle": "Bibliothèque de jeux",
|
||||
"noDescription": "(pas de description)",
|
||||
"published": "Publié",
|
||||
"uploadBanner": "Uploader bannière",
|
||||
"uploadIcon": "Uplader icône"
|
||||
"uploadIcon": "Uplader icône",
|
||||
"websitePlaceholder": "{'<'}site web{'>'}"
|
||||
},
|
||||
"modals": {
|
||||
"createDescription": "Créez une société pour mieux organizer vos jeux.",
|
||||
"createFieldDescription": "Description de la Société",
|
||||
"createFieldDescriptionPlaceholder": "Un petit studio indépendant qui...",
|
||||
"createFieldName": "Nom de la société",
|
||||
"createFieldNamePlaceholder": "Ma nouvelle société...",
|
||||
"createFieldWebsite": "Site web de la société",
|
||||
"createFieldWebsitePlaceholder": "https://exemple com/",
|
||||
"createTitle": "Créer une société",
|
||||
"nameDescription": "Éditer le nom de la société. Ce nom est utilisé pour trouver les jeux nouvellement importés.",
|
||||
"nameTitle": "Éditer le nom de la société",
|
||||
"shortDeckDescription": "Éditer la description de la company. Cela n'affecte pas la description longue (markdown).",
|
||||
@ -384,12 +407,15 @@
|
||||
"create": "Créer une source",
|
||||
"createDesc": "Drop va utiliser cette source pour accéder à votre bibliothèque de jeux, et les rendre disponible.",
|
||||
"desc": "Configurer vos sources de bibliothèques où Drop va regarder pour les nouveaux jeux et versions à importer.",
|
||||
"documentationLink": "Documentation {arrow}",
|
||||
"edit": "Éditer la source",
|
||||
"fsDesc": "Importe les jeux à partir d'un chemin d'accès sur le disque. Cela requière une structure des dossiers basées sur la version, et qui supporte les jeux archivés.",
|
||||
"fsFlatDesc": "Importe les jeux à partir d'un chemin d’accès sur le disque, mais sans le sous-dossier version séparé. Utile pour migrer une bibliothèque vers Drop.",
|
||||
"fsFlatTitle": "Compatibilité",
|
||||
"fsPath": "Chemin d’accès",
|
||||
"fsPathDesc": "Un chemin d’accès absolu à votre bibliothèque de jeux.",
|
||||
"fsPathPlaceholder": "/mnt/jeux",
|
||||
"fsTitle": "Drop-style",
|
||||
"link": "Sources {arrow}",
|
||||
"nameDesc": "Le nom de votre source, pour référence.",
|
||||
"namePlaceholder": "Mes Nouvelle Source",
|
||||
@ -447,6 +473,7 @@
|
||||
"checkLater": "Vérifier plus tard pour les mises à jour.",
|
||||
"delete": "Supprimer l'Article",
|
||||
"filter": {
|
||||
"all": "Tous les temps",
|
||||
"month": "Ce mois",
|
||||
"week": "Cette semaine",
|
||||
"year": "Cette année"
|
||||
@ -509,15 +536,19 @@
|
||||
"store": {
|
||||
"about": "À propos",
|
||||
"commingSoon": "prochainement",
|
||||
"developers": "Développeurs | Développeur | Développeurs",
|
||||
"exploreMore": "Explorer plus {arrow}",
|
||||
"featured": "Mis en avant",
|
||||
"images": "Images de Jeux",
|
||||
"lookAt": "Découvrez le maintenant",
|
||||
"noDevelopers": "Pas de développeur",
|
||||
"noGame": "pas de jeu",
|
||||
"noFeatured": "PAS DE JEU MIS EN AVANT",
|
||||
"noGame": "PAS DE JEU",
|
||||
"noImages": "Pas d'image",
|
||||
"noPublishers": "Pas d'éditeur.",
|
||||
"noTags": "Pas de tag",
|
||||
"openAdminDashboard": "Ouvrir dans le Tableau de Bord d'Administration",
|
||||
"openFeatured": "Mettez des étoiles aux jeux dans l'administration de la bibliothèque {arrow}",
|
||||
"platform": "Plateforme | Plateforme | Plateformes",
|
||||
"publishers": "Éditeurs | Éditeur | Éditeurs",
|
||||
"rating": "Note",
|
||||
@ -544,7 +575,9 @@
|
||||
"back": "{arrow} Retour aux Tâches",
|
||||
"completedTasksTitle": "Tâches complétées",
|
||||
"dailyScheduledTitle": "Tâches quotidiennes planifiées",
|
||||
"execute": "{arrow} Exécuter",
|
||||
"noTasksRunning": "Pas de tâche en cours",
|
||||
"progress": "{0]%",
|
||||
"runningTasksTitle": "Tâches en cours d'exécution",
|
||||
"scheduled": {
|
||||
"checkUpdateDescription": "Vérifier si Drop a une mise à jour.",
|
||||
@ -588,6 +621,7 @@
|
||||
"description": "Drop supporte une variété de \"mécanismes d'authentification\". Lorsque vous les activez ou les désactivez, ils sont affichés sur la page de connection pour que les utilisateurs puissent les sélectionner. Cliquer sur le menu à points pour configurer le mécanisme d'authentification.",
|
||||
"disabled": "Désactivé",
|
||||
"enabled": "Activé",
|
||||
"enabledKey": "Activée ?",
|
||||
"oidc": "OpenID Connect",
|
||||
"simple": "Simple (nom d'utilisateur/mot de passe)",
|
||||
"srOpenOptions": "Ouvrir les options",
|
||||
@ -605,7 +639,7 @@
|
||||
"createInvitation": "Créer invitation",
|
||||
"description": "L'authentification simple utilise un système d'invitations pour créer les utilisateurs. Tu peux créer une invitation et optionnellement spécifier le nom d'utilisateur ou email de cet utilisateur, et un lien magique sera généré un lien magique qui peut être utilisé pour créer le compte.",
|
||||
"expires": "Expire : {expiry}",
|
||||
"invitationTitle": "invitations",
|
||||
"invitationTitle": "Invitations",
|
||||
"invite3Days": "3 jours",
|
||||
"invite6Months": "6 mois",
|
||||
"inviteAdminSwitchDescription": "Créer cet utilisateur en tant qu'adminstrateur",
|
||||
|
||||
@ -175,9 +175,6 @@ export default defineNuxtConfig({
|
||||
},
|
||||
|
||||
i18n: {
|
||||
bundle: {
|
||||
optimizeTranslationDirective: false,
|
||||
},
|
||||
defaultLocale: "en-us",
|
||||
strategy: "no_prefix",
|
||||
experimental: {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "drop",
|
||||
"version": "0.3.4",
|
||||
"version": "0.3.3",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
@ -37,7 +37,6 @@
|
||||
"bcryptjs": "^3.0.2",
|
||||
"cheerio": "^1.0.0",
|
||||
"cookie-es": "^2.0.0",
|
||||
"dotenv": "^17.2.3",
|
||||
"fast-fuzzy": "^1.12.0",
|
||||
"file-type-mime": "^0.4.3",
|
||||
"jdenticon": "^3.3.0",
|
||||
@ -48,7 +47,7 @@
|
||||
"nuxt-security": "2.2.0",
|
||||
"pino": "^9.7.0",
|
||||
"pino-pretty": "^13.0.0",
|
||||
"prisma": "6.11.1",
|
||||
"prisma": "^6.11.1",
|
||||
"sanitize-filename": "^1.6.3",
|
||||
"semver": "^7.7.1",
|
||||
"stream-mime-type": "^2.0.0",
|
||||
@ -66,6 +65,7 @@
|
||||
"@nuxt/eslint": "^1.3.0",
|
||||
"@tailwindcss/forms": "^0.5.9",
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"@types/bcryptjs": "^3.0.0",
|
||||
"@types/luxon": "^3.6.2",
|
||||
"@types/node": "^22.13.16",
|
||||
"@types/semver": "^7.7.0",
|
||||
@ -87,5 +87,8 @@
|
||||
"vue3-carousel": "^0.16.0"
|
||||
}
|
||||
},
|
||||
"prisma": {
|
||||
"schema": "./prisma"
|
||||
},
|
||||
"packageManager": "pnpm@10.15.0+sha512.486ebc259d3e999a4e8691ce03b5cac4a71cbeca39372a9b762cb500cfdf0873e2cb16abe3d951b1ee2cf012503f027b98b6584e4df22524e0c7450d9ec7aa7b"
|
||||
}
|
||||
|
||||
3595
pnpm-lock.yaml
generated
3595
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,3 @@
|
||||
onlyBuiltDependencies:
|
||||
- "@prisma/client"
|
||||
- "@prisma/engines"
|
||||
- "@tailwindcss/oxide"
|
||||
- esbuild
|
||||
- prisma
|
||||
|
||||
overrides:
|
||||
droplet: link:../../.local/share/pnpm/global/5/node_modules/@drop-oss/droplet
|
||||
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
import { config } from "dotenv";
|
||||
import type { PrismaConfig } from "prisma";
|
||||
import path from "node:path";
|
||||
|
||||
config();
|
||||
|
||||
export default {
|
||||
schema: path.join("prisma"),
|
||||
earlyAccess: true,
|
||||
} satisfies PrismaConfig;
|
||||
@ -42,7 +42,7 @@ export default defineEventHandler(async (h3) => {
|
||||
)
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
message: "Invalid capabilities.",
|
||||
statusMessage: "Invalid capabilities.",
|
||||
});
|
||||
|
||||
if (
|
||||
|
||||
@ -17,10 +17,21 @@ export default defineClientEventHandler(async (h3) => {
|
||||
orderBy: {
|
||||
versionIndex: "desc", // Latest one first
|
||||
},
|
||||
omit: {
|
||||
dropletManifest: true,
|
||||
},
|
||||
});
|
||||
|
||||
return versions;
|
||||
const mappedVersions = versions
|
||||
.map((version) => {
|
||||
if (!version.dropletManifest) return undefined;
|
||||
|
||||
const newVersion = { ...version, dropletManifest: undefined };
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore idk why we delete an undefined object
|
||||
delete newVersion.dropletManifest;
|
||||
return {
|
||||
...newVersion,
|
||||
};
|
||||
})
|
||||
.filter((e) => e);
|
||||
|
||||
return mappedVersions;
|
||||
});
|
||||
|
||||
@ -4,8 +4,6 @@ class SystemConfig {
|
||||
private libraryFolder = process.env.LIBRARY ?? "./.data/library";
|
||||
private dataFolder = process.env.DATA ?? "./.data/data";
|
||||
|
||||
private metadataTimeout = parseInt(process.env.METADATA_TIMEOUT ?? "5000");
|
||||
|
||||
private externalUrl = normalizeUrl(
|
||||
process.env.EXTERNAL_URL ?? "http://localhost:3000",
|
||||
{ stripWWW: false },
|
||||
@ -30,10 +28,6 @@ class SystemConfig {
|
||||
return this.dataFolder;
|
||||
}
|
||||
|
||||
getMetadataTimeout() {
|
||||
return this.metadataTimeout;
|
||||
}
|
||||
|
||||
getDropVersion() {
|
||||
return this.dropVersion;
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ class LibraryManager {
|
||||
if (!game) return undefined;
|
||||
|
||||
try {
|
||||
const versions = await provider.listVersions(libraryPath, game.versions.map((v) => v.versionName));
|
||||
const versions = await provider.listVersions(libraryPath);
|
||||
const unimportedVersions = versions.filter(
|
||||
(e) =>
|
||||
game.versions.findIndex((v) => v.versionName == e) == -1 &&
|
||||
|
||||
@ -24,7 +24,7 @@ export abstract class LibraryProvider<CFG> {
|
||||
* @param game folder name of the game to list versions for
|
||||
* @returns list of version folder names
|
||||
*/
|
||||
abstract listVersions(game: string, existingPaths?: string[]): Promise<string[]>;
|
||||
abstract listVersions(game: string): Promise<string[]>;
|
||||
|
||||
/**
|
||||
* @param game folder name of the game
|
||||
|
||||
@ -54,12 +54,11 @@ export class FilesystemProvider
|
||||
return folderDirs;
|
||||
}
|
||||
|
||||
async listVersions(game: string, ignoredVersions?: string[]): Promise<string[]> {
|
||||
async listVersions(game: string): Promise<string[]> {
|
||||
const gameDir = path.join(this.config.baseDir, game);
|
||||
if (!fs.existsSync(gameDir)) throw new GameNotFoundError();
|
||||
const versionDirs = fs.readdirSync(gameDir);
|
||||
const validVersionDirs = versionDirs.filter((e) => {
|
||||
if(ignoredVersions && ignoredVersions.includes(e)) return false
|
||||
const fullDir = path.join(this.config.baseDir, game, e);
|
||||
return DROPLET_HANDLER.hasBackendForPath(fullDir);
|
||||
});
|
||||
|
||||
@ -82,10 +82,6 @@ export class MetadataHandler {
|
||||
// TODO: fix eslint error
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
>(async (resolve, reject) => {
|
||||
setTimeout(
|
||||
() => reject(new Error("Timeout while fetching results")),
|
||||
systemConfig.getMetadataTimeout(),
|
||||
);
|
||||
try {
|
||||
const results = await provider.search(query);
|
||||
const mappedResults: InternalGameMetadataResult[] = results.map(
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import fs from "node:fs";
|
||||
import nodePath from "node:path";
|
||||
import fs from "fs";
|
||||
import nodePath from "path";
|
||||
|
||||
export function fsStats(folderPath: string) {
|
||||
const stats = fs.statfsSync(folderPath);
|
||||
|
||||
Reference in New Issue
Block a user