An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
Merge branch 'restray_i18n' of https://github.com/restray/coolify into restray-restray_i18n
Andras Bacsaife3702847a53
diff --cc CONTRIBUTING.mdindex dabb5e10a6,f0bde201ef..a4df5233dc--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@@ -16,17 -28,9 +28,17 @@@ This is a little list of what you can d- Push to your fork repo- Create a pull request: https://github.com/coollabsio/compare- Write a proper description-- Click "Change to draft"+- Open the pull request to review against `next` branch++---++# How to start after you set up your local fork?++Due to the lock file, this repository is best with [pnpm](https://pnpm.io). I recommend you try and use `pnpm` because it is cool and efficient!++You need to have [Docker Engine](https://docs.docker.com/engine/install/) installed locally.- ## Setup development environment+ #### Setup a local development environment- Copy `.env.template` to `.env` and set the `COOLIFY_APP_ID` environment variable to something cool.- Install dependencies with `pnpm install`.@@@ -41,77 -59,45 +67,116 @@@ During development, if you change the dIf the schema is finalized, you need to create a migration file with `pnpm db:migrate <nameOfMigration>` where `nameOfMigration` is given by you. Make it sense. :)- ## Tricky parts+ ### Tricky parts-- BullMQ, the queue system Coolify is using, cannot be hot reloaded. So if you change anything in the files related to it, you need to restart the development process. I'm actively looking of a different queue/scheduler library. I'm open for discussion!+- BullMQ, the queue system Coolify uses, cannot be hot reloaded. So if you change anything in the files related to it, you need to restart the development process. I'm actively looking for a different queue/scheduler library. I'm open to discussion!++---++# How to add new services++You can add any open-source and self-hostable software (service/application) to Coolify if the following statements are true:++- Self-hostable (obviously)+- Open-source+- Maintained (I do not want to add software full of bugs)++## Backend++I use MinIO as an example.++You need to add a new folder to [src/routes/services/[id]](src/routes/services/[id]) with the low-capital name of the service. It should have three files with the following properties:++1. `index.json.ts`: A POST endpoint that updates Coolify's database about the service.++ Basic services only require updating the URL(fqdn) and the name of the service.++2. `start.json.ts`: A start endpoint that setups the docker-compose file (for Local Docker Engines) and starts the service.++ - To start a service, you need to know Coolify supported images and tags of the service. For that you need to update `supportedServiceTypesAndVersions` function at [src/lib/components/common.ts](src/lib/components/common.ts).++ Example JSON:++ ```js+ {+ // Name used to identify the service in Coolify+ name: 'minio',+ // Fancier name to show to the user+ fancyName: 'MinIO',+ // Docker base image for the service+ baseImage: 'minio/minio',+ // Usable tags+ versions: ['latest'],+ // Which tag is the recommended+ recommendedVersion: 'latest',+ // Application's default port, MinIO listens on 9001 (and 9000, more details later on)+ ports: {+ main: 9001+ }+ },+ ```++ - You need to define a compose file as `const composeFile: ComposeFile` found in [src/routes/services/[id]/minio/start.json.ts](src/routes/services/[id]/minio/start.json.ts)++ **IMPORTANT:** It should contain `all the default environment variables` that are required for the service to function correctly and `all the volumes to persist data` in restarts.++ - You could also define an `HTTP` or `TCP` proxy for every other port that should be proxied to your server. (See `startHttpProxy` and `startTcpProxy` functions in [src/lib/haproxy/index.ts](src/lib/haproxy/index.ts))++3. `stop.json.ts` A stop endpoint that stops the service.++ It needs to stop all the services by their container name and proxies (if applicable).++4. You need to add the automatically generated variables (passwords, users, etc.) for the new service at [src/lib/database/services.ts](src/lib/database/services.ts), `configureServiceType` function.++## Frontend++1. You need to add a custom logo at [src/lib/components/svg/services/](src/lib/components/svg/services/) as a svelte component.++ SVG is recommended, but you can use PNG as well. It should have the `isAbsolute` variable with the suitable CSS classes, primarily for sizing and positioning.++2. You need to include it the logo at [src/routes/services/index.svelte](src/routes/services/index.svelte) with `isAbsolute` and [src/lib/components/ServiceLinks.svelte](src/lib/components/ServiceLinks.svelte) with a link to the docs/main site of the service.++3. By default the URL and the name frontend forms are included in [src/routes/services/[id]/\_Services/\_Services.svelte](src/routes/services/[id]/_Services/_Services.svelte).++ If you need to show more details on the frontend, such as users/passwords, you need to add Svelte component to [src/routes/services/[id]/\_Services](src/routes/services/[id]/_Services) with an underscore. For example, see other files in that folder.++ You also need to add the new inputs to the `index.json.ts` file of the specific service, like for MinIO here: [src/routes/services/[id]/minio/index.json.ts](src/routes/services/[id]/minio/index.json.ts)++ ## 🌐 Translate the project++ The project use [sveltekit-i18n](https://github.com/sveltekit-i18n/lib) to translate the project.+ It follows the [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) to name languages.++ ### Installation++ You must have gone throw all the [intro](#introduction) steps before you can start translating.++ It's only an advice, but I recommend you to use:++ - Visual Studio Code+ - [i18n Ally for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=Lokalise.i18n-ally): ideal to see the progress of the translation.+ - [Svelte for VS Code](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode): to get the syntax color for the project++ ### Adding a language++ If your language doesn't appear in the [locales folder list](src/lib/locales/), follow the step below:++ 1. In `src/lib/locales/`, Copy paste `en.json` and rename it with your language (eg: `cz.json`).+ 2. In the [lang.json](src/lib/lang.json) file, add a line after the first bracket (`{`) with `"ISO of your language": "Language",` (eg: `"cz": "Czech",`).+ 3. Have fun translating!++ ### Additionnal pull requests steps++ Please add the emoji 🌐 to your pull request title to indicate that it is a translation.++ ## 📄 Help sorting out the issues++ ToDo++ ## 🎯 Test Pull Requests++ ToDo++ ## ✒️ Help with the documentation++ ToDodiff --cc package.jsonindex 592bef339e,10159ee1ba..5aa393bdf1--- a/package.json+++ b/package.json@@@ -45,17 -43,18 +45,18 @@@"eslint-config-prettier": "8.5.0","eslint-plugin-svelte3": "3.4.1","husky": "7.0.4",- "lint-staged": "12.3.7",+ "lint-staged": "12.4.0","postcss": "8.4.12",- "prettier": "2.6.1",- "prettier-plugin-svelte": "2.6.0",- "prettier-plugin-tailwindcss": "0.1.8",+ "prettier": "2.6.2",+ "prettier-plugin-svelte": "2.7.0",+ "prettier-plugin-tailwindcss": "0.1.10","prisma": "3.11.1",- "svelte": "3.46.4",- "svelte-check": "2.4.6",- "svelte-preprocess": "4.10.4",+ "svelte": "3.47.0",+ "svelte-check": "2.7.0",+ "svelte-preprocess": "4.10.6","svelte-select": "4.4.7",+ "tailwindcss": "3.0.24",+ "sveltekit-i18n": "2.1.2",- "tailwindcss": "3.0.23","ts-node": "10.7.0","tslib": "2.3.1","typescript": "4.6.3"diff --cc pnpm-lock.yamlindex 5ac48a0a04,581de6bd73..9c608add78--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@@ -34,21 -36,22 +34,22 @@@ specifiersjs-cookie: 3.0.1js-yaml: 4.1.0jsonwebtoken: 8.5.1- lint-staged: 12.3.7+ lint-staged: 12.4.0mustache: 4.2.0- node-forge: 1.3.0+ node-forge: 1.3.1p-limit: 4.0.0postcss: 8.4.12- prettier: 2.6.1- prettier-plugin-svelte: 2.6.0- prettier-plugin-tailwindcss: 0.1.8+ prettier: 2.6.2+ prettier-plugin-svelte: 2.7.0+ prettier-plugin-tailwindcss: 0.1.10prisma: 3.11.1- svelte: 3.46.4- svelte-check: 2.4.6- svelte-kit-cookie-session: 2.1.2- svelte-preprocess: 4.10.4+ svelte: 3.47.0+ svelte-check: 2.7.0+ svelte-kit-cookie-session: 2.1.3+ svelte-preprocess: 4.10.6svelte-select: 4.4.7+ tailwindcss: 3.0.24+ sveltekit-i18n: 2.1.2- tailwindcss: 3.0.23tailwindcss-scrollbar: 0.1.0ts-node: 10.7.0tslib: 2.3.1@@@ -95,20 -100,21 +96,21 @@@ devDependenciescross-var: 1.1.0eslint: 7.32.0eslint-config-prettier: [email protected]- eslint-plugin-svelte3: [email protected][email protected]+ eslint-plugin-svelte3: [email protected][email protected]husky: 7.0.4- lint-staged: 12.3.7+ lint-staged: 12.4.0postcss: 8.4.12- prettier: 2.6.1- prettier-plugin-svelte: [email protected][email protected]- prettier-plugin-tailwindcss: [email protected]+ prettier: 2.6.2+ prettier-plugin-svelte: [email protected][email protected]+ prettier-plugin-tailwindcss: [email protected]prisma: 3.11.1- svelte: 3.46.4- svelte-check: [email protected][email protected]- svelte-preprocess: 4.10.4_296873641a0ad9f42fe92172d27bcedd+ svelte: 3.47.0+ svelte-check: [email protected][email protected]+ svelte-preprocess: 4.10.6_41810887ae6c6d59323116f47e33fa38svelte-select: 4.4.7+ tailwindcss: [email protected]+ ts-node: 10.7.0_de7c86b0cde507c63a0402da5b982bd3+ sveltekit-i18n: [email protected]- tailwindcss: 3.0.23_b89136460714832cdda11d1e9d57d1ff- ts-node: 10.7.0_ee885bc7281b682b6adbed6ae09ee090tslib: 2.3.1typescript: 4.6.3diff --cc src/app.d.tsindex 37f419edfc,6dacd83950..ccdea3ceed--- a/src/app.d.ts+++ b/src/app.d.ts@@@ -31,8 -23,11 +31,9 @@@ interface SessionDatauserId?: string | null;teamId?: string | null;permission?: string;+ lang?: string;isAdmin?: boolean;expires?: string | null;- gitlabToken?: string | null;- ghToken?: string | null;}type DateTimeFormatOptions = {diff --cc src/hooks.tsindex fef98375f4,ac60a2a25b..33774922a6--- a/src/hooks.ts+++ b/src/hooks.ts@@@ -6,12 -6,8 +6,13 @@@ import { getUserDetails, sentry } fromimport { version } from '$lib/common';import cookie from 'cookie';import { dev } from '$app/env';+ import { locales } from '$lib/translations';+const whiteLabeled = process.env['COOLIFY_WHITE_LABELED'] === 'true';+const whiteLabelDetails = {+ icon: (whiteLabeled && process.env['COOLIFY_WHITE_LABELED_ICON']) || null+};+export const handle = handleSession({secret: process.env['COOLIFY_SECRET_KEY'],@@@ -74,10 -100,19 +105,21 @@@);export const getSession: GetSession = function ({ locals }) {+ // Get defined locales+ const supportedLocales = locales.get();+ let locale;++ if (locals.cookies) {+ locale = supportedLocales.find(+ (l) => `${l}`.toLowerCase() === `${locals.cookies['lang']}`.toLowerCase()+ );+ }+return {+ lang: locale,version,+ whiteLabeled,+ whiteLabelDetails,...locals.session.data};};diff --cc src/routes/applications/[id]/__layout.svelteindex b0384cf004,f428d8d512..2a09bfd1df--- a/src/routes/applications/[id]/__layout.svelte+++ b/src/routes/applications/[id]/__layout.svelte@@@ -79,8 -77,7 +79,9 @@@import { goto } from '$app/navigation';import { gitTokens } from '$lib/store';import { toast } from '@zerodevx/svelte-toast';+ import { disabledButton } from '$lib/store';+ import { onDestroy, onMount } from 'svelte';+ import { t } from '$lib/translations';if (githubToken) $gitTokens.githubToken = githubToken;if (gitlabToken) $gitTokens.gitlabToken = gitlabToken;@@@ -152,67 -128,136 +153,67 @@@{#if loading}<Loading fullscreen cover />{:else}- {#if application.fqdn && application.gitSource && application.repository && application.destinationDocker && application.buildPack}- {#if isRunning}- <button- on:click={stopApplication}- title={$t('application.stop_application')}- type="submit"- disabled={!$session.isAdmin}- class="icons bg-transparent tooltip-bottom text-sm flex items-center space-x-2 text-red-500"- data-tooltip={$session.isAdmin- ? $t('application.stop_application')- : $t('application.permission_denied_stop_application')}- >- <svg- xmlns="http://www.w3.org/2000/svg"- class="w-6 h-6"- viewBox="0 0 24 24"- stroke-width="1.5"- stroke="currentColor"- fill="none"- stroke-linecap="round"- stroke-linejoin="round"- >- <path stroke="none" d="M0 0h24v24H0z" fill="none" />- <rect x="6" y="5" width="4" height="14" rx="1" />- <rect x="14" y="5" width="4" height="14" rx="1" />- </svg>- </button>- <form on:submit|preventDefault={handleDeploySubmit}>- <button- title={$t('application.rebuild_application')}- type="submit"- disabled={!$session.isAdmin}- class="icons bg-transparent tooltip-bottom text-sm flex items-center space-x-2 hover:text-green-500"- data-tooltip={$session.isAdmin- ? $t('application.rebuild_application')- : $t('application.permission_denied_rebuild_application')}- >- <svg- xmlns="http://www.w3.org/2000/svg"- class="w-6 h-6"- viewBox="0 0 24 24"- stroke-width="1.5"- stroke="currentColor"- fill="none"- stroke-linecap="round"- stroke-linejoin="round"- >- <path stroke="none" d="M0 0h24v24H0z" fill="none" />- <path- d="M16.3 5h.7a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h5l-2.82 -2.82m0 5.64l2.82 -2.82"- transform="rotate(-45 12 12)"- />- </svg>- </button>- </form>- {:else}- <form on:submit|preventDefault={handleDeploySubmit}>- <button- title={$t('application.build_and_start_application')}- type="submit"- disabled={!$session.isAdmin}- class="icons bg-transparent tooltip-bottom text-sm flex items-center space-x-2 text-green-500"- data-tooltip={$session.isAdmin- ? $t('application.build_and_start_application')- : $t('application.permission_denied_build_and_start_application')}- >- <svg- xmlns="http://www.w3.org/2000/svg"- class="w-6 h-6"- viewBox="0 0 24 24"- stroke-width="1.5"- stroke="currentColor"- fill="none"- stroke-linecap="round"- stroke-linejoin="round"- >- <path stroke="none" d="M0 0h24v24H0z" fill="none" />- <path d="M7 4v16l13 -8z" />- </svg>- </button>- </form>- {/if}-- <div class="border border-stone-700 h-8" />+ {#if isExited}<a- href="/applications/{id}"+ href={!$disabledButton ? `/applications/${id}/logs` : null}+ class=" icons bg-transparent tooltip-bottom text-sm flex items-center text-red-500 tooltip-red-500"+ data-tooltip="Application exited with an error!"sveltekit:prefetch- class="hover:text-yellow-500 rounded"- class:text-yellow-500={$page.url.pathname === `/applications/${id}`}- class:bg-coolgray-500={$page.url.pathname === `/applications/${id}`}>- <button- title={$t('application.configurations')}- class="icons bg-transparent tooltip-bottom text-sm disabled:text-red-500"- data-tooltip={$t('application.configurations')}+ <svg+ xmlns="http://www.w3.org/2000/svg"+ class="w-6 h-6"+ viewBox="0 0 24 24"+ stroke-width="1.5"+ stroke="currentcolor"+ fill="none"+ stroke-linecap="round"+ stroke-linejoin="round">- <svg- xmlns="http://www.w3.org/2000/svg"- class="h-6 w-6"- viewBox="0 0 24 24"- stroke-width="1.5"- stroke="currentColor"- fill="none"- stroke-linecap="round"- stroke-linejoin="round"- >- <path stroke="none" d="M0 0h24v24H0z" fill="none" />- <rect x="4" y="8" width="4" height="4" />- <line x1="6" y1="4" x2="6" y2="8" />- <line x1="6" y1="12" x2="6" y2="20" />- <rect x="10" y="14" width="4" height="4" />- <line x1="12" y1="4" x2="12" y2="14" />- <line x1="12" y1="18" x2="12" y2="20" />- <rect x="16" y="5" width="4" height="4" />- <line x1="18" y1="4" x2="18" y2="5" />- <line x1="18" y1="9" x2="18" y2="20" />- </svg></button- ></a- >- <a- href="/applications/{id}/secrets"- sveltekit:prefetch- class="hover:text-pink-500 rounded"- class:text-pink-500={$page.url.pathname === `/applications/${id}/secrets`}- class:bg-coolgray-500={$page.url.pathname === `/applications/${id}/secrets`}+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />+ <path+ d="M8.7 3h6.6c.3 0 .5 .1 .7 .3l4.7 4.7c.2 .2 .3 .4 .3 .7v6.6c0 .3 -.1 .5 -.3 .7l-4.7 4.7c-.2 .2 -.4 .3 -.7 .3h-6.6c-.3 0 -.5 -.1 -.7 -.3l-4.7 -4.7c-.2 -.2 -.3 -.4 -.3 -.7v-6.6c0 -.3 .1 -.5 .3 -.7l4.7 -4.7c.2 -.2 .4 -.3 .7 -.3z"+ />+ <line x1="12" y1="8" x2="12" y2="12" />+ <line x1="12" y1="16" x2="12.01" y2="16" />+ </svg>+ </a>+ {/if}+ {#if isRunning}+ <button+ on:click={stopApplication}+ title="Stop application"+ type="submit"+ disabled={$disabledButton}+ class="icons bg-transparent tooltip-bottom text-sm flex items-center space-x-2 text-red-500"+ data-tooltip={$session.isAdmin- ? 'Stop application'- : 'You do not have permission to stop the application.'}++ ? $t('application.stop_application')++ : $t('application.permission_denied_stop_application')}>+ <svg+ xmlns="http://www.w3.org/2000/svg"+ class="w-6 h-6"+ viewBox="0 0 24 24"+ stroke-width="1.5"+ stroke="currentColor"+ fill="none"+ stroke-linecap="round"+ stroke-linejoin="round"+ >+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />+ <rect x="6" y="5" width="4" height="14" rx="1" />+ <rect x="14" y="5" width="4" height="14" rx="1" />+ </svg>+ </button>+ <form on:submit|preventDefault={handleDeploySubmit}><button- title={$t('application.secret')}- class="icons bg-transparent tooltip-bottom text-sm disabled:text-red-500"- data-tooltip={$t('application.secret')}+ title="Rebuild application"+ type="submit"+ disabled={$disabledButton}+ class="icons bg-transparent tooltip-bottom text-sm flex items-center space-x-2 hover:text-green-500"+ data-tooltip={$session.isAdmin+ ? 'Rebuild application'+ : 'You do not have permission to rebuild application.'}><svgxmlns="http://www.w3.org/2000/svg"@@@ -254,212 -301,111 +255,212 @@@stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" />- <ellipse cx="12" cy="6" rx="8" ry="3" />- <path d="M4 6v6a8 3 0 0 0 16 0v-6" />- <path d="M4 12v6a8 3 0 0 0 16 0v-6" />+ <path d="M7 4v16l13 -8z" /></svg>- </button></a- >- <a- href="/applications/{id}/previews"- sveltekit:prefetch- class="hover:text-orange-500 rounded"- class:text-orange-500={$page.url.pathname === `/applications/${id}/previews`}- class:bg-coolgray-500={$page.url.pathname === `/applications/${id}/previews`}+ </button>+ </form>+ {/if}++ <div class="border border-coolgray-500 h-8" />+ <a+ href={!$disabledButton ? `/applications/${id}` : null}+ sveltekit:prefetch+ class="hover:text-yellow-500 rounded"+ class:text-yellow-500={$page.url.pathname === `/applications/${id}`}+ class:bg-coolgray-500={$page.url.pathname === `/applications/${id}`}+ >+ <button+ title="Configurations"+ disabled={$disabledButton}+ class="icons bg-transparent tooltip-bottom text-sm"+ data-tooltip="Configurations">- <button- title={$t('application.previews')}- class="icons bg-transparent tooltip-bottom text-sm disabled:text-red-500"- data-tooltip={$t('application.previews')}+ <svg+ xmlns="http://www.w3.org/2000/svg"+ class="h-6 w-6"+ viewBox="0 0 24 24"+ stroke-width="1.5"+ stroke="currentColor"+ fill="none"+ stroke-linecap="round"+ stroke-linejoin="round">- <svg- xmlns="http://www.w3.org/2000/svg"- class="w-6 h-6"- viewBox="0 0 24 24"- stroke-width="1.5"- stroke="currentColor"- fill="none"- stroke-linecap="round"- stroke-linejoin="round"- >- <path stroke="none" d="M0 0h24v24H0z" fill="none" />- <circle cx="7" cy="18" r="2" />- <circle cx="7" cy="6" r="2" />- <circle cx="17" cy="12" r="2" />- <line x1="7" y1="8" x2="7" y2="16" />- <path d="M7 8a4 4 0 0 0 4 4h4" />- </svg></button- ></a+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />+ <rect x="4" y="8" width="4" height="4" />+ <line x1="6" y1="4" x2="6" y2="8" />+ <line x1="6" y1="12" x2="6" y2="20" />+ <rect x="10" y="14" width="4" height="4" />+ <line x1="12" y1="4" x2="12" y2="14" />+ <line x1="12" y1="18" x2="12" y2="20" />+ <rect x="16" y="5" width="4" height="4" />+ <line x1="18" y1="4" x2="18" y2="5" />+ <line x1="18" y1="9" x2="18" y2="20" />+ </svg></button+ ></a+ >+ <a+ href={!$disabledButton ? `/applications/${id}/secrets` : null}+ sveltekit:prefetch+ class="hover:text-pink-500 rounded"+ class:text-pink-500={$page.url.pathname === `/applications/${id}/secrets`}+ class:bg-coolgray-500={$page.url.pathname === `/applications/${id}/secrets`}+ >+ <button+ title="Secret"+ disabled={$disabledButton}+ class="icons bg-transparent tooltip-bottom text-sm"+ data-tooltip="Secret">- <div class="border border-stone-700 h-8" />- <a- href="/applications/{id}/logs"- sveltekit:prefetch- class="hover:text-sky-500 rounded"- class:text-sky-500={$page.url.pathname === `/applications/${id}/logs`}- class:bg-coolgray-500={$page.url.pathname === `/applications/${id}/logs`}+ <svg+ xmlns="http://www.w3.org/2000/svg"+ class="w-6 h-6"+ viewBox="0 0 24 24"+ stroke-width="1.5"+ stroke="currentColor"+ fill="none"+ stroke-linecap="round"+ stroke-linejoin="round"+ >+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />+ <path+ d="M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3"+ />+ <circle cx="12" cy="11" r="1" />+ <line x1="12" y1="12" x2="12" y2="14.5" />+ </svg></button+ ></a+ >+ <a+ href={!$disabledButton ? `/applications/${id}/storage` : null}+ sveltekit:prefetch+ class="hover:text-pink-500 rounded"+ class:text-pink-500={$page.url.pathname === `/applications/${id}/storage`}+ class:bg-coolgray-500={$page.url.pathname === `/applications/${id}/storage`}+ >+ <button+ title="Persistent Storage"+ disabled={$disabledButton}+ class="icons bg-transparent tooltip-bottom text-sm"+ data-tooltip="Persistent Storage">- <button- title={$t('application.logs')}- class="icons bg-transparent tooltip-bottom text-sm disabled:text-red-500 "- data-tooltip={$t('application.logs')}+ <svg+ xmlns="http://www.w3.org/2000/svg"+ class="w-6 h-6"+ viewBox="0 0 24 24"+ stroke-width="1.5"+ stroke="currentColor"+ fill="none"+ stroke-linecap="round"+ stroke-linejoin="round">- <svg- xmlns="http://www.w3.org/2000/svg"- class="h-6 w-6"- viewBox="0 0 24 24"- stroke-width="1.5"- stroke="currentColor"- fill="none"- stroke-linecap="round"- stroke-linejoin="round"- >- <path stroke="none" d="M0 0h24v24H0z" fill="none" />- <path d="M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0" />- <path d="M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0" />- <line x1="3" y1="6" x2="3" y2="19" />- <line x1="12" y1="6" x2="12" y2="19" />- <line x1="21" y1="6" x2="21" y2="19" />- </svg>- </button></a+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />+ <ellipse cx="12" cy="6" rx="8" ry="3" />+ <path d="M4 6v6a8 3 0 0 0 16 0v-6" />+ <path d="M4 12v6a8 3 0 0 0 16 0v-6" />+ </svg>+ </button></a+ >+ <a+ href={!$disabledButton ? `/applications/${id}/previews` : null}+ sveltekit:prefetch+ class="hover:text-orange-500 rounded"+ class:text-orange-500={$page.url.pathname === `/applications/${id}/previews`}+ class:bg-coolgray-500={$page.url.pathname === `/applications/${id}/previews`}+ >+ <button+ title="Previews"+ disabled={$disabledButton}+ class="icons bg-transparent tooltip-bottom text-sm"+ data-tooltip="Previews">- <a- href="/applications/{id}/logs/build"- sveltekit:prefetch- class="hover:text-red-500 rounded"- class:text-red-500={$page.url.pathname === `/applications/${id}/logs/build`}- class:bg-coolgray-500={$page.url.pathname === `/applications/${id}/logs/build`}+ <svg+ xmlns="http://www.w3.org/2000/svg"+ class="w-6 h-6"+ viewBox="0 0 24 24"+ stroke-width="1.5"+ stroke="currentColor"+ fill="none"+ stroke-linecap="round"+ stroke-linejoin="round"+ >+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />+ <circle cx="7" cy="18" r="2" />+ <circle cx="7" cy="6" r="2" />+ <circle cx="17" cy="12" r="2" />+ <line x1="7" y1="8" x2="7" y2="16" />+ <path d="M7 8a4 4 0 0 0 4 4h4" />+ </svg></button+ ></a+ >+ <div class="border border-coolgray-500 h-8" />+ <a+ href={!$disabledButton ? `/applications/${id}/logs` : null}+ sveltekit:prefetch+ class="hover:text-sky-500 rounded"+ class:text-sky-500={$page.url.pathname === `/applications/${id}/logs`}+ class:bg-coolgray-500={$page.url.pathname === `/applications/${id}/logs`}+ >+ <button- title="Application Logs"++ title={$t('application.build_logs')}+ disabled={$disabledButton}+ class="icons bg-transparent tooltip-bottom text-sm"- data-tooltip="Application Logs"++ data-tooltip={$t('application.build_logs')}>- <button- title={$t('application.build_logs')}- class="icons bg-transparent tooltip-bottom text-sm disabled:text-red-500 "- data-tooltip={$t('application.build_logs')}+ <svg+ xmlns="http://www.w3.org/2000/svg"+ class="h-6 w-6"+ viewBox="0 0 24 24"+ stroke-width="1.5"+ stroke="currentColor"+ fill="none"+ stroke-linecap="round"+ stroke-linejoin="round">- <svg- xmlns="http://www.w3.org/2000/svg"- class="h-6 w-6"- viewBox="0 0 24 24"- stroke-width="1.5"- stroke="currentColor"- fill="none"- stroke-linecap="round"- stroke-linejoin="round"- >- <path stroke="none" d="M0 0h24v24H0z" fill="none" />- <circle cx="19" cy="13" r="2" />- <circle cx="4" cy="17" r="2" />- <circle cx="13" cy="17" r="2" />- <line x1="13" y1="19" x2="4" y2="19" />- <line x1="4" y1="15" x2="13" y2="15" />- <path d="M8 12v-5h2a3 3 0 0 1 3 3v5" />- <path d="M5 15v-2a1 1 0 0 1 1 -1h7" />- <path d="M19 11v-7l-6 7" />- </svg>- </button></a+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />+ <path d="M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0" />+ <path d="M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0" />+ <line x1="3" y1="6" x2="3" y2="19" />+ <line x1="12" y1="6" x2="12" y2="19" />+ <line x1="21" y1="6" x2="21" y2="19" />+ </svg>+ </button></a+ >+ <a+ href={!$disabledButton ? `/applications/${id}/logs/build` : null}+ sveltekit:prefetch+ class="hover:text-red-500 rounded"+ class:text-red-500={$page.url.pathname === `/applications/${id}/logs/build`}+ class:bg-coolgray-500={$page.url.pathname === `/applications/${id}/logs/build`}+ >+ <button+ title="Build Logs"+ disabled={$disabledButton}+ class="icons bg-transparent tooltip-bottom text-sm"+ data-tooltip="Build Logs">- <div class="border border-stone-700 h-8" />- {/if}+ <svg+ xmlns="http://www.w3.org/2000/svg"+ class="h-6 w-6"+ viewBox="0 0 24 24"+ stroke-width="1.5"+ stroke="currentColor"+ fill="none"+ stroke-linecap="round"+ stroke-linejoin="round"+ >+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />+ <circle cx="19" cy="13" r="2" />+ <circle cx="4" cy="17" r="2" />+ <circle cx="13" cy="17" r="2" />+ <line x1="13" y1="19" x2="4" y2="19" />+ <line x1="4" y1="15" x2="13" y2="15" />+ <path d="M8 12v-5h2a3 3 0 0 1 3 3v5" />+ <path d="M5 15v-2a1 1 0 0 1 1 -1h7" />+ <path d="M19 11v-7l-6 7" />+ </svg>+ </button></a+ >+ <div class="border border-coolgray-500 h-8" /><buttonon:click={() => deleteApplication(application.name)}diff --cc src/routes/applications/[id]/configuration/_GithubRepositories.svelteindex 08ee1298fa,4523da47fb..80a4d246ed--- a/src/routes/applications/[id]/configuration/_GithubRepositories.svelte+++ b/src/routes/applications/[id]/configuration/_GithubRepositories.svelte@@@ -181,11 -171,9 +182,11 @@@<div class="custom-select-wrapper"><Selectplaceholder={loading.repositories- ? 'Loading repositories...'- : 'Please select a repository'}+ ? $t('application.configuration.loading_repositories')+ : $t('application.configuration.select_a_repository')}id="repository"+ showIndicator={true}+ isWaiting={loading.repositories}on:select={loadBranches}items={reposSelectOptions}isDisabled={loading.repositories}@@@ -196,13 -183,11 +197,13 @@@<div class="custom-select-wrapper"><Selectplaceholder={loading.branches- ? 'Loading branches...'+ ? $t('application.configuration.loading_branches'): !selected.repository- ? 'Please select a repository first'- : 'Please select a branch'}+ ? $t('application.configuration.select_a_repository_first')+ : $t('application.configuration.select_a_branch')}- id="repository"+ isWaiting={loading.branches}+ showIndicator={selected.repository}+ id="branches"on:select={isBranchAlreadyUsed}items={branchSelectOptions}isDisabled={loading.branches || !selected.repository}@@@ -217,8 -201,15 +218,8 @@@type="submit"disabled={!showSave}class:bg-orange-600={showSave}- class:hover:bg-orange-500={showSave}>Save</button+ class:hover:bg-orange-500={showSave}>{$t('forms.save')}</button>- <!-- <button class="w-40"- ><a- class="no-underline"- href="{apiUrl}/apps/{application.gitSource.githubApp.name}/installations/new"- >Modify Repositories</a- ></button- > --></div></form>{/if}diff --cc src/routes/applications/[id]/configuration/destination.svelteindex 1b0c6df5ce,f462459510..2e68d658c4--- a/src/routes/applications/[id]/configuration/destination.svelte+++ b/src/routes/applications/[id]/configuration/destination.svelte@@@ -60,12 -51,14 +61,14 @@@</script><div class="flex space-x-1 p-6 font-bold">- <div class="mr-4 text-2xl tracking-tight">Configure Destination</div>+ <div class="mr-4 text-2xl tracking-tight">+ {$t('application.configuration.configure_destination')}+ </div></div>-<div class="flex justify-center">- {#if !destinations || destinations.length === 0}+<div class="flex flex-col justify-center">+ {#if !destinations || ownDestinations.length === 0}<div class="flex-col">- <div class="pb-2">No configurable Destination found</div>+ <div class="pb-2">{$t('application.configuration.no_configurable_destination')}</div><div class="flex justify-center"><a href="/new/destination" sveltekit:prefetch class="add-icon bg-sky-600 hover:bg-sky-500"><svgdiff --cc src/routes/applications/[id]/configuration/source.svelteindex e5c05ebdd5,33736e3ac4..7ddc382cc7--- a/src/routes/applications/[id]/configuration/source.svelte+++ b/src/routes/applications/[id]/configuration/source.svelte@@@ -72,14 -58,16 +73,16 @@@</script><div class="flex space-x-1 p-6 font-bold">- <div class="mr-4 text-2xl tracking-tight">Select a Git Source</div>+ <div class="mr-4 text-2xl tracking-tight">+ {$t('application.configuration.select_a_git_source')}+ </div></div><div class="flex flex-col justify-center">- {#if !filteredSources || filteredSources.length === 0}+ {#if !filteredSources || ownSources.length === 0}<div class="flex-col">- <div class="pb-2 text-center">No configurable Git Source found</div>+ <div class="pb-2">{$t('application.configuration.no_configurable_git')}</div><div class="flex justify-center">- <a href="/new/source" sveltekit:prefetch class="add-icon bg-orange-600 hover:bg-orange-500">+ <button on:click={newSource} class="add-icon bg-orange-600 hover:bg-orange-500"><svgclass="w-6"xmlns="http://www.w3.org/2000/svg"diff --cc src/routes/applications/[id]/index.svelteindex 4a14c719dd,04c163a437..359cdc5a36--- a/src/routes/applications/[id]/index.svelte+++ b/src/routes/applications/[id]/index.svelte@@@ -48,7 -48,7 +48,8 @@@import { post } from '$lib/api';import cuid from 'cuid';import { browser } from '$app/env';+ import { disabledButton } from '$lib/store';+ import { t } from '$lib/translations';const { id } = $page.params;let domainEl: HTMLInputElement;@@@ -123,10 -128,9 +124,10 @@@try {await post(`/applications/${id}/check.json`, { fqdn: application.fqdn, forceSave });await post(`/applications/${id}.json`, { ...application });- return window.location.reload();+ $disabledButton = false;+ return toast.push('Configurations saved.');} catch ({ error }) {- if (error?.startsWith('DNS not set')) {+ if (error?.startsWith($t('application.dns_not_set_partial_error'))) {forceSave = true;}return errorNotification(error);diff --cc src/routes/applications/[id]/logs/build/index.svelteindex 0a3499a7bb,a9fc68099d..c9a2ce0bd7--- a/src/routes/applications/[id]/logs/build/index.svelte+++ b/src/routes/applications/[id]/logs/build/index.svelte@@@ -26,6 -26,8 +26,7 @@@import BuildLog from './_BuildLog.svelte';import { get } from '$lib/api';import { errorNotification } from '$lib/form';- import { goto } from '$app/navigation';+ import { t } from '$lib/translations';export let builds;export let application;@@@ -86,7 -88,7 +87,9 @@@<div class="flex items-center space-x-2 p-5 px-6 font-bold"><div class="-mb-5 flex-col">- <div class="md:max-w-64 truncate text-base tracking-tight md:text-2xl lg:block">Build Logs</div>- <div class="md:max-w-64 truncate text-base tracking-tight md:text-2xl lg:block">$t('application.build_logs')}</div>++ <div class="md:max-w-64 truncate text-base tracking-tight md:text-2xl lg:block">++ $t('application.build_logs')}++ </div><span class="text-xs">{application.name} </span></div>@@@ -197,7 -201,7 +202,8 @@@{#if !noMoreBuilds}{#if buildCount > 5}<div class="flex space-x-2">- <button disabled={noMoreBuilds} class="w-full" on:click={loadMoreBuilds}>Load More</button- <button disabled={noMoreBuilds} class="w-full" on:click={loadMoreBuilds}>{$t('application.build.load_more')}</button++ <button disabled={noMoreBuilds} class="w-full" on:click={loadMoreBuilds}++ >{$t('application.build.load_more')}</button></div>{/if}diff --cc src/routes/applications/[id]/logs/index.svelteindex 08d69a1ff3,874e772423..e770f7e1dc--- a/src/routes/applications/[id]/logs/index.svelte+++ b/src/routes/applications/[id]/logs/index.svelte@@@ -24,17 -24,14 +24,18 @@@export let application;import { page } from '$app/stores';import LoadingLogs from './_Loading.svelte';- import { getDomain } from '$lib/components/common';import { get } from '$lib/api';import { errorNotification } from '$lib/form';+ import { t } from '$lib/translations';let loadLogsInterval = null;+ let allLogs = {+ logs: []+ };let logs = [];- let followingBuild;+ let currentPage = 1;+ let endOfLogs = false;+ let startOfLogs = true;let followingInterval;let logsEl;@@@ -176,45 -143,16 +177,45 @@@</div><div class="flex flex-row justify-center space-x-2 px-10 pt-6">{#if logs.length === 0}- <div class="text-xl font-bold tracking-tighter">Waiting for the logs...</div>+ <div class="text-xl font-bold tracking-tighter">{$t('application.build.waiting_logs')}</div>{:else}<div class="relative w-full">- <LoadingLogs />- <div class="flex justify-end sticky top-0 p-2">+ <div class="text-right " />+ {#if loadLogsInterval}+ <LoadingLogs />+ {/if}+ <div class="flex justify-end sticky top-0 p-2 mx-1">+ <button+ on:click={loadOlderLogs}+ class:text-coolgray-100={endOfLogs}+ class:hover:bg-coolgray-400={!endOfLogs}+ class="bg-transparent tooltip-bottom"+ data-tooltip="Older logs"+ disabled={endOfLogs}+ >+ <svg+ xmlns="http://www.w3.org/2000/svg"+ class="w-6 h-6"+ viewBox="0 0 24 24"+ stroke-width="1.5"+ stroke="currentColor"+ fill="none"+ stroke-linecap="round"+ stroke-linejoin="round"+ >+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />+ <path+ d="M20 15h-8v3.586a1 1 0 0 1 -1.707 .707l-6.586 -6.586a1 1 0 0 1 0 -1.414l6.586 -6.586a1 1 0 0 1 1.707 .707v3.586h8a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1z"+ />+ </svg>+ </button><button- on:click={followBuild}- class="bg-transparent"- data-tooltip="Follow logs"- class:text-green-500={followingBuild}+ on:click={loadNewerLogs}+ class:text-coolgray-100={startOfLogs}+ class:hover:bg-coolgray-400={!startOfLogs}+ class="bg-transparent tooltip-bottom"+ data-tooltip="Newer logs"+ disabled={startOfLogs}><svgxmlns="http://www.w3.org/2000/svg"diff --cc src/routes/applications/[id]/secrets/index.svelteindex 980e881772,d939ed41eb..b7105fe48d--- a/src/routes/applications/[id]/secrets/index.svelte+++ b/src/routes/applications/[id]/secrets/index.svelte@@@ -65,7 -69,7 +66,9 @@@<div class="flex items-center space-x-2 p-5 px-6 font-bold"><div class="-mb-5 flex-col">- <div class="md:max-w-64 truncate text-base tracking-tight md:text-2xl lg:block">Secrets</div>- <div class="md:max-w-64 truncate text-base tracking-tight md:text-2xl lg:block">{$t('application.secret')}</div>++ <div class="md:max-w-64 truncate text-base tracking-tight md:text-2xl lg:block">++ {$t('application.secret')}++ </div><span class="text-xs">{application.name} </span></div>diff --cc src/routes/applications/index.svelteindex 4da277abdc,d559fd7b99..3295b8eebc--- a/src/routes/applications/index.svelte+++ b/src/routes/applications/index.svelte@@@ -1,27 -1,10 +1,28 @@@<script lang="ts">export let applications: Array<Application>;import { session } from '$app/stores';- import Application from './_Application.svelte';import { post } from '$lib/api';import { goto } from '$app/navigation';+ import { t } from '$lib/translations';++ import { getDomain } from '$lib/components/common';++ import Rust from '$lib/components/svg/applications/Rust.svelte';+ import Nodejs from '$lib/components/svg/applications/Nodejs.svelte';+ import React from '$lib/components/svg/applications/React.svelte';+ import Svelte from '$lib/components/svg/applications/Svelte.svelte';+ import Vuejs from '$lib/components/svg/applications/Vuejs.svelte';+ import PHP from '$lib/components/svg/applications/PHP.svelte';+ import Python from '$lib/components/svg/applications/Python.svelte';+ import Static from '$lib/components/svg/applications/Static.svelte';+ import Nestjs from '$lib/components/svg/applications/Nestjs.svelte';+ import Nuxtjs from '$lib/components/svg/applications/Nuxtjs.svelte';+ import Nextjs from '$lib/components/svg/applications/Nextjs.svelte';+ import Gatsby from '$lib/components/svg/applications/Gatsby.svelte';+ import Docker from '$lib/components/svg/applications/Docker.svelte';+ import Astro from '$lib/components/svg/applications/Astro.svelte';+ import Eleventy from '$lib/components/svg/applications/Eleventy.svelte';+ import Deno from '$lib/components/svg/applications/Deno.svelte';- import { getDomain } from '$lib/components/common';+async function newApplication() {const { id } = await post('/applications/new', {});return await goto(`/applications/${id}`, { replaceState: true });@@@ -58,129 -31,14 +59,129 @@@</div>{/if}</div>-<div class="flex flex-wrap justify-center">- {#if !applications || applications.length === 0}+<div class="flex flex-col flex-wrap justify-center">+ {#if !applications || ownApplications.length === 0}<div class="flex-col">- <div class="text-center text-xl font-bold">No applications found</div>+ <div class="text-center text-xl font-bold">{$t('application.no_applications_found')}</div></div>- {:else}- {#each applications as application}- <Application {application} />- {/each}+ {/if}+ {#if ownApplications.length > 0 || otherApplications.length > 0}+ <div class="flex flex-col">+ <div class="flex flex-col flex-wrap justify-center px-2 md:flex-row">+ {#each ownApplications as application}+ <a href="/applications/{application.id}" class="w-96 p-2 no-underline">+ <div class="box-selection group relative hover:bg-green-600">+ {#if application.buildPack}+ {#if application.buildPack.toLowerCase() === 'rust'}+ <Rust />+ {:else if application.buildPack.toLowerCase() === 'node'}+ <Nodejs />+ {:else if application.buildPack.toLowerCase() === 'react'}+ <React />+ {:else if application.buildPack.toLowerCase() === 'svelte'}+ <Svelte />+ {:else if application.buildPack.toLowerCase() === 'vuejs'}+ <Vuejs />+ {:else if application.buildPack.toLowerCase() === 'php'}+ <PHP />+ {:else if application.buildPack.toLowerCase() === 'python'}+ <Python />+ {:else if application.buildPack.toLowerCase() === 'static'}+ <Static />+ {:else if application.buildPack.toLowerCase() === 'nestjs'}+ <Nestjs />+ {:else if application.buildPack.toLowerCase() === 'nuxtjs'}+ <Nuxtjs />+ {:else if application.buildPack.toLowerCase() === 'nextjs'}+ <Nextjs />+ {:else if application.buildPack.toLowerCase() === 'gatsby'}+ <Gatsby />+ {:else if application.buildPack.toLowerCase() === 'docker'}+ <Docker />+ {:else if application.buildPack.toLowerCase() === 'astro'}+ <Astro />+ {:else if application.buildPack.toLowerCase() === 'eleventy'}+ <Eleventy />+ {:else if application.buildPack.toLowerCase() === 'deno'}+ <Deno />+ {/if}+ {/if}++ <div class="truncate text-center text-xl font-bold">{application.name}</div>+ {#if $session.teamId === '0' && otherApplications.length > 0}+ <div class="truncate text-center">Team {application.teams[0].name}</div>+ {/if}+ {#if application.fqdn}+ <div class="truncate text-center">{getDomain(application.fqdn) || ''}</div>+ {/if}+ {#if !application.gitSourceId || !application.destinationDockerId || !application.fqdn}+ <div class="truncate text-center font-bold text-red-500 group-hover:text-white">+ Configuration missing+ </div>+ {/if}+ </div>+ </a>+ {/each}+ </div>+ {#if otherApplications.length > 0 && $session.teamId === '0'}+ <div class="px-6 pb-5 pt-10 text-xl font-bold">Other Applications</div>+ <div class="flex flex-col flex-wrap justify-center px-2 md:flex-row">+ {#each otherApplications as application}+ <a href="/applications/{application.id}" class="w-96 p-2 no-underline">+ <div class="box-selection group relative hover:bg-green-600">+ {#if application.buildPack}+ {#if application.buildPack.toLowerCase() === 'rust'}+ <Rust />+ {:else if application.buildPack.toLowerCase() === 'node'}+ <Nodejs />+ {:else if application.buildPack.toLowerCase() === 'react'}+ <React />+ {:else if application.buildPack.toLowerCase() === 'svelte'}+ <Svelte />+ {:else if application.buildPack.toLowerCase() === 'vuejs'}+ <Vuejs />+ {:else if application.buildPack.toLowerCase() === 'php'}+ <PHP />+ {:else if application.buildPack.toLowerCase() === 'python'}+ <Python />+ {:else if application.buildPack.toLowerCase() === 'static'}+ <Static />+ {:else if application.buildPack.toLowerCase() === 'nestjs'}+ <Nestjs />+ {:else if application.buildPack.toLowerCase() === 'nuxtjs'}+ <Nuxtjs />+ {:else if application.buildPack.toLowerCase() === 'nextjs'}+ <Nextjs />+ {:else if application.buildPack.toLowerCase() === 'gatsby'}+ <Gatsby />+ {:else if application.buildPack.toLowerCase() === 'docker'}+ <Docker />+ {:else if application.buildPack.toLowerCase() === 'astro'}+ <Astro />+ {:else if application.buildPack.toLowerCase() === 'eleventy'}+ <Eleventy />+ {:else if application.buildPack.toLowerCase() === 'deno'}+ <Deno />+ {/if}+ {/if}++ <div class="truncate text-center text-xl font-bold">{application.name}</div>+ {#if $session.teamId === '0'}+ <div class="truncate text-center">Team {application.teams[0].name}</div>+ {/if}+ {#if application.fqdn}+ <div class="truncate text-center">{getDomain(application.fqdn) || ''}</div>+ {/if}+ {#if !application.gitSourceId || !application.destinationDockerId || !application.fqdn}+ <div class="truncate text-center font-bold text-red-500 group-hover:text-white">+ Configuration missing+ </div>+ {/if}+ </div>+ </a>+ {/each}+ </div>+ {/if}+ </div>{/if}</div>diff --cc src/routes/databases/[id]/_Databases/_Databases.svelteindex c441534e41,38a3e2c3e6..175d31c849--- a/src/routes/databases/[id]/_Databases/_Databases.svelte+++ b/src/routes/databases/[id]/_Databases/_Databases.svelte@@@ -17,13 -15,10 +17,14 @@@import { browser } from '$app/env';import { post } from '$lib/api';import { getDomain } from '$lib/components/common';+ import { toast } from '@zerodevx/svelte-toast';+ import { t } from '$lib/translations';const { id } = $page.params;+let loading = false;+ let publicLoading = false;+let isPublic = database.settings.isPublic || false;let appendOnly = database.settings.appendOnly;@@@ -180,21 -153,23 +185,23 @@@</div><div class="grid grid-flow-row gap-2">{#if database.type === 'mysql'}- <MySql bind:database />+ <MySql bind:database {isRunning} />{:else if database.type === 'postgresql'}- <PostgreSql bind:database />+ <PostgreSql bind:database {isRunning} />{:else if database.type === 'mongodb'}- <MongoDb {database} />+ <MongoDb bind:database {isRunning} />{:else if database.type === 'redis'}- <Redis {database} />+ <Redis bind:database {isRunning} />{:else if database.type === 'couchdb'}- <CouchDb bind:database />+ <CouchDb {database} />{/if}<div class="grid grid-cols-2 items-center px-10 pb-8">- <label for="url" class="text-base font-bold text-stone-100">Connection String</label>+ <label for="url" class="text-base font-bold text-stone-100"+ >{$t('database.connection_string')}</label+ ><CopyPasswordFieldtextarea={true}- placeholder="Generated automatically after start"+ placeholder={$t('forms.generated_automatically_after_start')}isPasswordField={false}id="url"name="url"@@@ -211,12 -186,10 +218,12 @@@<div class="px-10 pb-10"><div class="grid grid-cols-2 items-center"><Setting+ loading={publicLoading}bind:setting={isPublic}on:click={() => changeSettings('isPublic')}- title="Set it public"- description="Your database will be reachable over the internet. <br>Take security seriously in this case!"+ title={$t('database.set_public')}+ description={$t('database.warning_database_public')}+ disabled={!isRunning}/></div>{#if database.type === 'redis'}diff --cc src/routes/databases/[id]/_Databases/_MongoDB.svelteindex fa73b870e3,1a6a526ce1..a732556d29--- a/src/routes/databases/[id]/_Databases/_MongoDB.svelte+++ b/src/routes/databases/[id]/_Databases/_MongoDB.svelte@@@ -1,8 -1,7 +1,9 @@@<script>export let database;+ export let isRunning;import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';+ import Explainer from '$lib/components/Explainer.svelte';+ import { t } from '$lib/translations';</script><div class="flex space-x-1 py-5 font-bold">@@@ -21,16 -20,17 +22,18 @@@/></div><div class="grid grid-cols-2 items-center">- <label for="rootUserPassword" class="text-base font-bold text-stone-100">Root's Password</label>+ <label for="rootUserPassword" class="text-base font-bold text-stone-100"+ >{$t('forms.roots_password')}</label+ ><CopyPasswordField+ disabled={!isRunning}+ readonly={!isRunning}- placeholder="Generated automatically after start"+ placeholder={$t('forms.generated_automatically_after_start')}isPasswordField={true}- readonly- disabledid="rootUserPassword"name="rootUserPassword"- value={database.rootUserPassword}+ bind:value={database.rootUserPassword}/>+ <Explainer text="Could be changed while the database is running." /></div></div>diff --cc src/routes/databases/[id]/_Databases/_MySQL.svelteindex 27057049b8,0015878454..3e96e276d7--- a/src/routes/databases/[id]/_Databases/_MySQL.svelte+++ b/src/routes/databases/[id]/_Databases/_MySQL.svelte@@@ -1,8 -1,7 +1,9 @@@<script>export let database;+ export let isRunning;import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';+ import Explainer from '$lib/components/Explainer.svelte';+ import { t } from '$lib/translations';</script><div class="flex space-x-1 py-5 font-bold">@@@ -33,20 -34,21 +36,22 @@@/></div><div class="grid grid-cols-2 items-center">- <label for="dbUserPassword" class="text-base font-bold text-stone-100">Password</label>+ <label for="dbUserPassword" class="text-base font-bold text-stone-100"+ >{$t('forms.password')}</label+ ><CopyPasswordField- readonly- disabled+ disabled={!isRunning}+ readonly={!isRunning}- placeholder="Generated automatically after start"+ placeholder={$t('forms.generated_automatically_after_start')}isPasswordFieldid="dbUserPassword"name="dbUserPassword"- value={database.dbUserPassword}+ bind:value={database.dbUserPassword}/>+ <Explainer text="Could be changed while the database is running." /></div><div class="grid grid-cols-2 items-center">- <label for="rootUser" class="text-base font-bold text-stone-100">Root User</label>+ <label for="rootUser" class="text-base font-bold text-stone-100">{$t('forms.root_user')}</label><CopyPasswordFieldreadonlydisabled@@@ -57,11 -59,13 +62,13 @@@/></div><div class="grid grid-cols-2 items-center">- <label for="rootUserPassword" class="text-base font-bold text-stone-100">Root's Password</label>+ <label for="rootUserPassword" class="text-base font-bold text-stone-100"+ >{$t('forms.roots_password')}</label+ ><CopyPasswordField- readonly- disabled+ disabled={!isRunning}+ readonly={!isRunning}- placeholder="Generated automatically after start"+ placeholder={$t('forms.generated_automatically_after_start')}isPasswordFieldid="rootUserPassword"name="rootUserPassword"diff --cc src/routes/databases/[id]/_Databases/_PostgreSQL.svelteindex b5e4ba1dd1,7b207b8519..c6bacd4ec1--- a/src/routes/databases/[id]/_Databases/_PostgreSQL.svelte+++ b/src/routes/databases/[id]/_Databases/_PostgreSQL.svelte@@@ -1,8 -1,7 +1,9 @@@<script>export let database;+ export let isRunning;import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';+ import Explainer from '$lib/components/Explainer.svelte';+ import { t } from '$lib/translations';</script><div class="flex space-x-1 py-5 font-bold">@@@ -21,23 -22,8 +24,23 @@@bind:value={database.defaultDatabase}/></div>+ <div class="grid grid-cols-2 items-center">+ <label for="rootUser" class="text-base font-bold text-stone-100"+ >Root (postgres) User Password</label+ >+ <CopyPasswordField+ disabled={!isRunning}+ readonly={!isRunning}+ placeholder="Generated automatically after start"+ isPasswordField+ id="rootUserPassword"+ name="rootUserPassword"+ bind:value={database.rootUserPassword}+ />+ <Explainer text="Could be changed while the database is running." />+ </div><div class="grid grid-cols-2 items-center">- <label for="dbUser" class="text-base font-bold text-stone-100">User</label>+ <label for="dbUser" class="text-base font-bold text-stone-100">{$t('forms.user')}</label><CopyPasswordFieldreadonlydisabled@@@ -48,11 -34,13 +51,13 @@@/></div><div class="grid grid-cols-2 items-center">- <label for="dbUserPassword" class="text-base font-bold text-stone-100">Password</label>+ <label for="dbUserPassword" class="text-base font-bold text-stone-100"+ >{$t('forms.password')}</label+ ><CopyPasswordField- readonly- disabled+ disabled={!isRunning}+ readonly={!isRunning}- placeholder="Generated automatically after start"+ placeholder={$t('forms.generated_automatically_after_start')}isPasswordFieldid="dbUserPassword"name="dbUserPassword"diff --cc src/routes/databases/[id]/_Databases/_Redis.svelteindex fdd2ce5f1b,4a783a99b6..1005943433--- a/src/routes/databases/[id]/_Databases/_Redis.svelte+++ b/src/routes/databases/[id]/_Databases/_Redis.svelte@@@ -1,8 -1,7 +1,9 @@@<script>export let database;+ export let isRunning;import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';+ import Explainer from '$lib/components/Explainer.svelte';+ import { t } from '$lib/translations';</script><div class="flex space-x-1 py-5 font-bold">@@@ -10,11 -9,13 +11,13 @@@</div><div class="space-y-2 px-10"><div class="grid grid-cols-2 items-center">- <label for="dbUserPassword" class="text-base font-bold text-stone-100">Password</label>+ <label for="dbUserPassword" class="text-base font-bold text-stone-100"+ >{$t('forms.password')}</label+ ><CopyPasswordField- disabled- readonly+ disabled={!isRunning}+ readonly={!isRunning}- placeholder="Generated automatically after start"+ placeholder={$t('forms.generated_automatically_after_start')}isPasswordFieldid="dbUserPassword"name="dbUserPassword"diff --cc src/routes/databases/[id]/__layout.svelteindex 45016da69b,db0d45ee23..6b62c2cd1e--- a/src/routes/databases/[id]/__layout.svelte+++ b/src/routes/databases/[id]/__layout.svelte@@@ -63,9 -63,10 +63,10 @@@import Loading from '$lib/components/Loading.svelte';import { del, post } from '$lib/api';import { goto } from '$app/navigation';+ import { t } from '$lib/translations';export let database;- export let state;+ export let isRunning;let loading = false;async function deleteDatabase() {@@@ -110,10 -115,10 +111,10 @@@<Loading fullscreen cover />{:else}{#if database.type && database.destinationDockerId && database.version && database.defaultDatabase}- {#if state === 'running'}+ {#if isRunning}<buttonon:click={stopDatabase}- title="Stop database"+ title={$t('database.stop_database')}type="submit"disabled={!$session.isAdmin}class="icons bg-transparent tooltip-bottom text-sm flex items-center space-x-2 text-red-500"@@@ -136,10 -141,10 +137,10 @@@<rect x="14" y="5" width="4" height="14" rx="1" /></svg></button>- {:else if state === 'not started'}+ {:else}<buttonon:click={startDatabase}- title="Start database"+ title={$t('database.start_database')}type="submit"disabled={!$session.isAdmin}class="icons bg-transparent tooltip-bottom text-sm flex items-center space-x-2 text-green-500"diff --cc src/routes/databases/index.svelteindex a47dbc66fe,af8defa325..6717ac88af--- a/src/routes/databases/index.svelte+++ b/src/routes/databases/index.svelte@@@ -8,7 -8,7 +8,8 @@@import Redis from '$lib/components/svg/databases/Redis.svelte';import { post } from '$lib/api';import { goto } from '$app/navigation';+ import { session } from '$app/stores';+ import { t } from '$lib/translations';async function newDatabase() {const { id } = await post('/databases/new', {});@@@ -45,83 -35,40 +46,83 @@@</div></div>-<div class="flex flex-wrap justify-center">- {#if !databases || databases.length === 0}+<div class="flex flex-col flex-wrap justify-center">+ {#if !databases || ownDatabases.length === 0}<div class="flex-col">- <div class="text-center text-xl font-bold">No databases found</div>+ <div class="text-center text-xl font-bold">{$t('database.no_databases_found')}</div></div>- {:else}- {#each databases as database}- <a href="/databases/{database.id}" class="no-underline p-2 w-96">- <div class="box-selection relative hover:bg-purple-600 group">- {#if database.type === 'clickhouse'}- <Clickhouse isAbsolute />- {:else if database.type === 'couchdb'}- <CouchDB isAbsolute />- {:else if database.type === 'mongodb'}- <MongoDB isAbsolute />- {:else if database.type === 'mysql'}- <MySQL isAbsolute />- {:else if database.type === 'postgresql'}- <PostgreSQL isAbsolute />- {:else if database.type === 'redis'}- <Redis isAbsolute />- {/if}- <div class="font-bold text-xl text-center truncate">- {database.name}- </div>- {#if !database.type}- <div class="font-bold text-center truncate text-red-500 group-hover:text-white">- {$t('application.configuration.configuration_missing')}+ {/if}+ {#if ownDatabases.length > 0 || otherDatabases.length > 0}+ <div class="flex flex-col">+ <div class="flex flex-col flex-wrap justify-center px-2 md:flex-row">+ {#each ownDatabases as database}+ <a href="/databases/{database.id}" class="w-96 p-2 no-underline">+ <div class="box-selection group relative hover:bg-purple-600">+ {#if database.type === 'clickhouse'}+ <Clickhouse isAbsolute />+ {:else if database.type === 'couchdb'}+ <CouchDB isAbsolute />+ {:else if database.type === 'mongodb'}+ <MongoDB isAbsolute />+ {:else if database.type === 'mysql'}+ <MySQL isAbsolute />+ {:else if database.type === 'postgresql'}+ <PostgreSQL isAbsolute />+ {:else if database.type === 'redis'}+ <Redis isAbsolute />+ {/if}+ <div class="truncate text-center text-xl font-bold">+ {database.name}+ </div>+ {#if $session.teamId === '0' && otherDatabases.length > 0}+ <div class="truncate text-center">{database.teams[0].name}</div>+ {/if}+ {#if !database.type}+ <div class="truncate text-center font-bold text-red-500 group-hover:text-white">- Configuration missing++ {$t('application.configuration.configuration_missing')}+ </div>+ {/if}</div>- {:else}- <div class="text-center truncate">{database.type}</div>- {/if}+ </a>+ {/each}+ </div>+ {#if otherDatabases.length > 0 && $session.teamId === '0'}+ <div class="px-6 pb-5 pt-10 text-xl font-bold">Other Databases</div>+ <div class="flex flex-col flex-wrap justify-center px-2 md:flex-row">+ {#each otherDatabases as database}+ <a href="/databases/{database.id}" class="w-96 p-2 no-underline">+ <div class="box-selection group relative hover:bg-purple-600">+ {#if database.type === 'clickhouse'}+ <Clickhouse isAbsolute />+ {:else if database.type === 'couchdb'}+ <CouchDB isAbsolute />+ {:else if database.type === 'mongodb'}+ <MongoDB isAbsolute />+ {:else if database.type === 'mysql'}+ <MySQL isAbsolute />+ {:else if database.type === 'postgresql'}+ <PostgreSQL isAbsolute />+ {:else if database.type === 'redis'}+ <Redis isAbsolute />+ {/if}+ <div class="truncate text-center text-xl font-bold">+ {database.name}+ </div>+ {#if $session.teamId === '0'}+ <div class="truncate text-center">{database.teams[0].name}</div>+ {/if}+ {#if !database.type}+ <div class="truncate text-center font-bold text-red-500 group-hover:text-white">+ Configuration missing+ </div>+ {:else}+ <div class="text-center truncate">{database.type}</div>+ {/if}+ </div>+ </a>+ {/each}</div>- </a>- {/each}+ {/if}+ </div>{/if}</div>diff --cc src/routes/destinations/[id]/_LocalDocker.svelteindex ecbd0313bd,4ee6195e09..30112eec84--- a/src/routes/destinations/[id]/_LocalDocker.svelte+++ b/src/routes/destinations/[id]/_LocalDocker.svelte@@@ -10,10 -10,11 +10,11 @@@import { post } from '$lib/api';import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';import { onMount } from 'svelte';+ import { t } from '$lib/translations';const { id } = $page.params;let cannotDisable = settings.fqdn && destination.engine === '/var/run/docker.sock';- // let scannedApps = [];let loading = false;+ let loadingProxy = false;let restarting = false;async function handleSubmit() {loading = true;@@@ -181,20 -185,41 +182,20 @@@value={destination.network}/></div>- <div class="grid grid-cols-2 items-center">- <Setting- disabled={cannotDisable}- bind:setting={destination.isCoolifyProxyUsed}- on:click={changeProxySetting}- title={$t('destination.use_coolify_proxy')}- description={`This will install a proxy on the destination to allow you to access your applications and services without any manual configuration. Databases will have their own proxy. <br><br>${- cannotDisable- ? '<span class="font-bold text-white">You cannot disable this proxy as FQDN is configured for Coolify.</span>'- : ''- }`}- />- </div>-</form>-<!-- <div class="flex justify-center">- {#if payload.isCoolifyProxyUsed}- {#if state}- <button on:click={stopProxy}>Stop proxy</button>- {:else}- <button on:click={startProxy}>Start proxy</button>- {/if}- {/if}-</div> -->--<!-- {#if scannedApps.length > 0}- <div class="flex justify-center px-6 pb-10">- <div class="flex space-x-2 h-8 items-center">- <div class="font-bold text-xl text-white">Found applications</div>- </div>- </div>- <div class="max-w-4xl mx-auto px-6">- <div class="flex space-x-2 justify-center">- {#each scannedApps as app}- <FoundApp {app} />- {/each}+ {#if $session.teamId === '0'}+ <div class="grid grid-cols-2 items-center">+ <Setting+ loading={loadingProxy}+ disabled={cannotDisable}+ bind:setting={destination.isCoolifyProxyUsed}+ on:click={changeProxySetting}- title="Use Coolify Proxy?"++ title={$t('destination.use_coolify_proxy')}+ description={`This will install a proxy on the destination to allow you to access your applications and services without any manual configuration. Databases will have their own proxy. <br><br>${+ cannotDisable+ ? '<span class="font-bold text-white">You cannot disable this proxy as FQDN is configured for Coolify.</span>'+ : ''+ }`}+ /></div>- </div>-{/if} -->+ {/if}+</form>diff --cc src/routes/destinations/index.svelteindex 6921e4db40,e610777c07..2254cfe5ee--- a/src/routes/destinations/index.svelte+++ b/src/routes/destinations/index.svelte@@@ -23,17 -23,9 +23,19 @@@import type Prisma from '@prisma/client';import { session } from '$app/stores';+ import { t } from '$lib/translations';+export let destinations: Prisma.DestinationDocker[];+ const ownDestinations = destinations.filter((destination) => {+ if (destination.teams[0].id === $session.teamId) {+ return destination;+ }+ });+ const otherDestinations = destinations.filter((destination) => {+ if (destination.teams[0].id !== $session.teamId) {+ return destination;+ }+ });</script><div class="flex space-x-1 p-6 font-bold">@@@ -57,43 -49,20 +59,43 @@@{/if}</div><div class="flex justify-center">- {#if !destinations || destinations.length === 0}+ {#if !destinations || ownDestinations.length === 0}<div class="flex-col">- <div class="text-center text-xl font-bold">No destination found</div>+ <div class="text-center text-xl font-bold">{$t('destination.no_destination_found')}</div></div>- {:else}- <div class="flex flex-wrap justify-center">- {#each destinations as destination}- <a href="/destinations/{destination.id}" class="no-underline p-2 w-96">- <div class="box-selection hover:bg-sky-600">- <div class="font-bold text-xl text-center truncate">{destination.name}</div>- <div class="text-center truncate">{destination.network}</div>- </div>- </a>- {/each}+ {/if}+ {#if ownDestinations.length > 0 || otherDestinations.length > 0}+ <div class="flex flex-col">+ <div class="flex flex-col flex-wrap justify-center px-2 md:flex-row">+ {#each ownDestinations as destination}+ <a href="/destinations/{destination.id}" class="w-96 p-2 no-underline">+ <div class="box-selection hover:bg-sky-600">+ <div class="truncate text-center text-xl font-bold">{destination.name}</div>+ {#if $session.teamId === '0' && otherDestinations.length > 0}+ <div class="truncate text-center">{destination.teams[0].name}</div>+ {/if}+ <div class="truncate text-center">{destination.network}</div>+ </div>+ </a>+ {/each}+ </div>++ {#if otherDestinations.length > 0 && $session.teamId === '0'}+ <div class="px-6 pb-5 pt-10 text-xl font-bold">Other Destinations</div>+ <div class="flex flex-col flex-wrap justify-center px-2 md:flex-row">+ {#each otherDestinations as destination}+ <a href="/destinations/{destination.id}" class="w-96 p-2 no-underline">+ <div class="box-selection hover:bg-sky-600">+ <div class="truncate text-center text-xl font-bold">{destination.name}</div>+ {#if $session.teamId === '0'}+ <div class="truncate text-center">{destination.teams[0].name}</div>+ {/if}+ <div class="truncate text-center">{destination.network}</div>+ </div>+ </a>+ {/each}+ </div>+ {/if}</div>{/if}</div>diff --cc src/routes/login/index.svelteindex aa716b0a33,654df56883..7ebefd55e8--- a/src/routes/login/index.svelte+++ b/src/routes/login/index.svelte@@@ -81,8 -80,13 +87,9 @@@<buttonon:click|preventDefault={() => goto('/register')}- class="bg-transparent hover:bg-coolgray-300 text-white ">Register</button+ class="bg-transparent hover:bg-coolgray-300 text-white "+ >{$t('register.register')}</button>- <button- class="bg-transparent hover:bg-coolgray-300"- on:click|preventDefault={() => goto('/reset')}>{$t('reset.reset_password')}</button- ></div></form></div>diff --cc src/routes/new/destination/_LocalDocker.svelteindex e02a8163aa,2cc8e65ffa..dc08ea0531--- a/src/routes/new/destination/_LocalDocker.svelte+++ b/src/routes/new/destination/_LocalDocker.svelte@@@ -56,18 -54,21 +57,23 @@@/></div><div class="grid grid-cols-2 items-center px-10">- <label for="network" class="text-base font-bold text-stone-100">Network</label>- <input required name="network" placeholder="default: coolify" bind:value={payload.network} />+ <label for="network" class="text-base font-bold text-stone-100">{$t('forms.network')}</label>+ <input+ required+ name="network"+ placeholder="{$t('forms.default')}: coolify"+ bind:value={payload.network}+ /></div>- <div class="grid grid-cols-2 items-center">- <Setting- bind:setting={payload.isCoolifyProxyUsed}- on:click={() => (payload.isCoolifyProxyUsed = !payload.isCoolifyProxyUsed)}- title={$t('destination.use_coolify_proxy')}- description={$t('destination.new.install_proxy')}- />- </div>+ {#if $session.teamId === '0'}+ <div class="grid grid-cols-2 items-center">+ <Setting+ bind:setting={payload.isCoolifyProxyUsed}+ on:click={() => (payload.isCoolifyProxyUsed = !payload.isCoolifyProxyUsed)}- title="Use Coolify Proxy?"- description="This will install a proxy on the destination to allow you to access your applications and services without any manual configuration (recommended for Docker).<br><br>Databases will have their own proxy."++ title={$t('destination.use_coolify_proxy')}++ description={$t('destination.new.install_proxy')}+ />+ </div>+ {/if}</form></div>diff --cc src/routes/register/index.svelteindex d9ce51bf80,cbc185d7b9..52ff77180f--- a/src/routes/register/index.svelte+++ b/src/routes/register/index.svelte@@@ -104,7 -98,7 +105,8 @@@disabled={loading}class:bg-transparent={loading}class:text-stone-600={loading}- class:bg-coollabs={!loading}>{loading ? 'Registering...' : 'Register'}</button- class:bg-coollabs={!loading}>{loading ? $t('register.registering') : $t('register.register')}</button++ class:bg-coollabs={!loading}++ >{loading ? $t('register.registering') : $t('register.register')}</button></div></form>diff --cc src/routes/services/[id]/_Services/_Services.svelteindex 41dd86ff66,ed139ab764..20a5a2ecb0--- a/src/routes/services/[id]/_Services/_Services.svelte+++ b/src/routes/services/[id]/_Services/_Services.svelte@@@ -92,24 -94,11 +95,26 @@@/></div></div>-+ <div class="grid grid-cols-2 items-center px-10">+ <label for="version" class="text-base font-bold text-stone-100">Version / Tag</label>+ <a+ href={$session.isAdmin+ ? `/services/${id}/configuration/version?from=/services/${id}`+ : ''}+ class="no-underline"+ >+ <input+ value={service.version}+ id="service"+ disabled+ class="cursor-pointer hover:bg-coolgray-500"+ /></a+ >+ </div><div class="grid grid-cols-2 items-center px-10">- <label for="destination" class="text-base font-bold text-stone-100">Destination</label>+ <label for="destination" class="text-base font-bold text-stone-100"+ >{$t('application.destination')}</label+ ><div>{#if service.destinationDockerId}<div class="no-underline">@@@ -125,10 -114,8 +130,10 @@@</div><div class="grid grid-cols-2 px-10"><div class="flex-col ">- <label for="fqdn" class="pt-2 text-base font-bold text-stone-100">URL (FQDN)</label>- <Explainer- text="If you specify <span class='text-pink-600 font-bold'>https</span>, the application will be accessible only over https. SSL certificate will be generated for you.<br>If you specify <span class='text-pink-600 font-bold'>www</span>, the application will be redirected (302) from non-www and vice versa.<br><br>To modify the url, you must first stop the application."- />- <label for="fqdn" class="pt-2 text-base font-bold text-stone-100">{$t('application.url_fqdn')}</label>++ <label for="fqdn" class="pt-2 text-base font-bold text-stone-100"++ >{$t('application.url_fqdn')}</label++ >+ <Explainer text={$t('application.https_explainer')} /></div><CopyPasswordFielddiff --cc src/routes/services/[id]/_Services/_Wordpress.svelteindex ea754cb857,0f5c4bb20c..601843534b--- a/src/routes/services/[id]/_Services/_Wordpress.svelte+++ b/src/routes/services/[id]/_Services/_Wordpress.svelte@@@ -1,11 -1,6 +1,12 @@@<script lang="ts">+ import { post } from '$lib/api';+ import { page } from '$app/stores';import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';+ import Setting from '$lib/components/Setting.svelte';+ import { errorNotification } from '$lib/form';+ import { browser } from '$app/env';+ import { getDomain } from '$lib/components/common';+ import { t } from '$lib/translations';export let service;export let isRunning;@@@ -60,9 -12,8 +61,9 @@@</div><div class="grid grid-cols-2 items-center px-10">- <label for="extraConfig">Extra Config</label>+ <label for="extraConfig">{$t('forms.extra_config')}</label><textarea+ bind:value={service.wordpress.extraConfig}disabled={isRunning}readonly={isRunning}class:resize-none={isRunning}diff --cc src/routes/services/[id]/configuration/version.svelteindex bda5bb46c1,d565c5dfaf..fd5ddbc0bd--- a/src/routes/services/[id]/configuration/version.svelte+++ b/src/routes/services/[id]/configuration/version.svelte@@@ -31,7 -31,7 +31,8 @@@import { errorNotification } from '$lib/form';import { goto } from '$app/navigation';import { post } from '$lib/api';+ import { supportedServiceTypesAndVersions } from '$lib/components/common';+ import { t } from '$lib/translations';const { id } = $page.params;const from = $page.url.searchParams.get('from');@@@ -52,16 -48,9 +53,16 @@@</script><div class="flex space-x-1 p-6 font-bold">- <div class="mr-4 text-2xl tracking-tight">Select a Service version</div>+ <div class="mr-4 text-2xl tracking-tight">{$t('forms.select_a_service_version')}</div></div>-+{#if from}+ <div class="pb-10 text-center">+ Warning: you are about to change the version of this service.<br />This could cause problem+ after you restart the service,+ <span class="font-bold text-pink-600">like losing your data, incompatibility issues, etc</span+ >.<br />Only do if you know what you are doing.+ </div>+{/if}<div class="flex flex-wrap justify-center">{#each versions as version}<div class="p-2">diff --cc src/routes/services/[id]/secrets/index.svelteindex c71e6d720f,6013bc73d6..8bad53bbb6--- a/src/routes/services/[id]/secrets/index.svelte+++ b/src/routes/services/[id]/secrets/index.svelte@@@ -42,7 -43,7 +43,9 @@@class:p-6={!service.fqdn}><div class="-mb-5 flex-col">- <div class="md:max-w-64 truncate text-base tracking-tight md:text-2xl lg:block">Secrets</div>- <div class="md:max-w-64 truncate text-base tracking-tight md:text-2xl lg:block">{$t('application.secret')}</div>++ <div class="md:max-w-64 truncate text-base tracking-tight md:text-2xl lg:block">++ {$t('application.secret')}++ </div><span class="text-xs">{service.name}</span></div>{#if service.fqdn}diff --cc src/routes/services/index.svelteindex 998779a1f2,1ce0b6ca4d..c5f6dea5f8--- a/src/routes/services/index.svelte+++ b/src/routes/services/index.svelte@@@ -11,9 -11,8 +11,10 @@@import N8n from '$lib/components/svg/services/N8n.svelte';import UptimeKuma from '$lib/components/svg/services/UptimeKuma.svelte';import Ghost from '$lib/components/svg/services/Ghost.svelte';+ import { t } from '$lib/translations';import MeiliSearch from '$lib/components/svg/services/MeiliSearch.svelte';+ import { session } from '$app/stores';+ import { getDomain } from '$lib/components/common';export let services;async function newService() {@@@ -51,109 -40,50 +52,109 @@@</div></div>-<div class="flex flex-wrap justify-center">- {#if !services || services.length === 0}+<div class="flex flex-col flex-wrap justify-center">+ {#if !services || ownServices.length === 0}<div class="flex-col">- <div class="text-center text-xl font-bold">No services found</div>+ <div class="text-center text-xl font-bold">{$t('service.no_service')}</div></div>- {:else}- {#each services as service}- <a href="/services/{service.id}" class="no-underline p-2 w-96">- <div class="box-selection relative hover:bg-pink-600 group">- {#if service.type === 'plausibleanalytics'}- <PlausibleAnalytics isAbsolute />- {:else if service.type === 'nocodb'}- <NocoDb isAbsolute />- {:else if service.type === 'minio'}- <MinIo isAbsolute />- {:else if service.type === 'vscodeserver'}- <VsCodeServer isAbsolute />- {:else if service.type === 'wordpress'}- <Wordpress isAbsolute />- {:else if service.type === 'vaultwarden'}- <VaultWarden isAbsolute />- {:else if service.type === 'languagetool'}- <LanguageTool isAbsolute />- {:else if service.type === 'n8n'}- <N8n isAbsolute />- {:else if service.type === 'uptimekuma'}- <UptimeKuma isAbsolute />- {:else if service.type === 'ghost'}- <Ghost isAbsolute />- {:else if service.type === 'meilisearch'}- <MeiliSearch isAbsolute />- {/if}- <div class="font-bold text-xl text-center truncate">- {service.name}- </div>- {#if !service.type || !service.fqdn}- <div class="font-bold text-center truncate text-red-500 group-hover:text-white">- {$t('application.configuration.configuration_missing')}+ {/if}+ {#if ownServices.length > 0 || otherServices.length > 0}+ <div class="flex flex-col">+ <div class="flex flex-col flex-wrap justify-center px-2 md:flex-row">+ {#each ownServices as service}+ <a href="/services/{service.id}" class="w-96 p-2 no-underline">+ <div class="box-selection group relative hover:bg-pink-600">+ {#if service.type === 'plausibleanalytics'}+ <PlausibleAnalytics isAbsolute />+ {:else if service.type === 'nocodb'}+ <NocoDb isAbsolute />+ {:else if service.type === 'minio'}+ <MinIo isAbsolute />+ {:else if service.type === 'vscodeserver'}+ <VsCodeServer isAbsolute />+ {:else if service.type === 'wordpress'}+ <Wordpress isAbsolute />+ {:else if service.type === 'vaultwarden'}+ <VaultWarden isAbsolute />+ {:else if service.type === 'languagetool'}+ <LanguageTool isAbsolute />+ {:else if service.type === 'n8n'}+ <N8n isAbsolute />+ {:else if service.type === 'uptimekuma'}+ <UptimeKuma isAbsolute />+ {:else if service.type === 'ghost'}+ <Ghost isAbsolute />+ {:else if service.type === 'meilisearch'}+ <MeiliSearch isAbsolute />+ {/if}+ <div class="truncate text-center text-xl font-bold">+ {service.name}+ </div>+ {#if $session.teamId === '0' && otherServices.length > 0}+ <div class="truncate text-center">{service.teams[0].name}</div>+ {/if}+ {#if service.fqdn}+ <div class="truncate text-center">{getDomain(service.fqdn) || ''}</div>+ {/if}+ {#if !service.type || !service.fqdn}+ <div class="truncate text-center font-bold text-red-500 group-hover:text-white">- Configuration missing++ {$t('application.configuration.configuration_missing')}+ </div>+ {/if}</div>- {:else}- <div class="text-center truncate">{service.type}</div>- {/if}+ </a>+ {/each}+ </div>+ {#if otherServices.length > 0 && $session.teamId === '0'}+ <div class="px-6 pb-5 pt-10 text-xl font-bold">Other Services</div>+ <div class="flex flex-col flex-wrap justify-center px-2 md:flex-row">+ {#each otherServices as service}+ <a href="/services/{service.id}" class="w-96 p-2 no-underline">+ <div class="box-selection group relative hover:bg-pink-600">+ {#if service.type === 'plausibleanalytics'}+ <PlausibleAnalytics isAbsolute />+ {:else if service.type === 'nocodb'}+ <NocoDb isAbsolute />+ {:else if service.type === 'minio'}+ <MinIo isAbsolute />+ {:else if service.type === 'vscodeserver'}+ <VsCodeServer isAbsolute />+ {:else if service.type === 'wordpress'}+ <Wordpress isAbsolute />+ {:else if service.type === 'vaultwarden'}+ <VaultWarden isAbsolute />+ {:else if service.type === 'languagetool'}+ <LanguageTool isAbsolute />+ {:else if service.type === 'n8n'}+ <N8n isAbsolute />+ {:else if service.type === 'uptimekuma'}+ <UptimeKuma isAbsolute />+ {:else if service.type === 'ghost'}+ <Ghost isAbsolute />+ {:else if service.type === 'meilisearch'}+ <MeiliSearch isAbsolute />+ {/if}+ <div class="truncate text-center text-xl font-bold">+ {service.name}+ </div>+ {#if $session.teamId === '0'}+ <div class="truncate text-center">{service.teams[0].name}</div>+ {/if}+ {#if service.fqdn}+ <div class="truncate text-center">{getDomain(service.fqdn) || ''}</div>+ {/if}+ {#if !service.type || !service.fqdn}+ <div class="truncate text-center font-bold text-red-500 group-hover:text-white">+ Configuration missing+ </div>+ {:else}+ <div class="text-center truncate">{service.type}</div>+ {/if}+ </div>+ </a>+ {/each}</div>- </a>- {/each}+ {/if}+ </div>{/if}</div>diff --cc src/routes/sources/[id]/_Github.svelteindex 3390cb7121,964d6d4ba5..b03fe8abd3--- a/src/routes/sources/[id]/_Github.svelte+++ b/src/routes/sources/[id]/_Github.svelte@@@ -2,9 -2,8 +2,10 @@@export let source;import { page, session } from '$app/stores';import { post } from '$lib/api';+ import Explainer from '$lib/components/Explainer.svelte';import { errorNotification } from '$lib/form';+ import { toast } from '@zerodevx/svelte-toast';+ import { t } from '$lib/translations';const { id } = $page.params;let loading = false;@@@ -78,103 -60,31 +79,103 @@@}</script>-{#if !source.githubAppId}- <button on:click={newGithubApp}>{$t('source.create_new_app', { name: 'GitHub' })}</button>-{:else if source.githubApp?.installationId}- <form on:submit|preventDefault={handleSubmit} class="py-4">- <div class="flex space-x-1 pb-5 font-bold">- <div class="title">{$t('general')}</div>- {#if $session.isAdmin}- <button- type="submit"- class:bg-orange-600={!loading}- class:hover:bg-orange-500={!loading}- disabled={loading}>{loading ? $t('forms.saving') : $t('forms.save')}</button- >- <button on:click|preventDefault={() => installRepositories(source)}- >{$t('source.change_app_settings', { name: 'GitHub' })}</button- >+<div class="mx-auto max-w-4xl px-6">+ {#if !source.githubAppId}+ <form on:submit|preventDefault={newGithubApp} class="py-4">+ <div class="flex space-x-1 pb-5 font-bold">+ <div class="title">General</div>+ </div>+ <div class="grid grid-flow-row gap-2 px-10">+ <div class="grid grid-flow-row gap-2">+ <div class="mt-2 grid grid-cols-2 items-center">+ <label for="name" class="text-base font-bold text-stone-100">Name</label>+ <input name="name" id="name" required bind:value={source.name} />+ </div>+ </div>+ <div class="grid grid-cols-2 items-center">+ <label for="htmlUrl" class="text-base font-bold text-stone-100">HTML URL</label>+ <input name="htmlUrl" id="htmlUrl" required bind:value={source.htmlUrl} />+ </div>+ <div class="grid grid-cols-2 items-center">+ <label for="apiUrl" class="text-base font-bold text-stone-100">API URL</label>+ <input name="apiUrl" id="apiUrl" required bind:value={source.apiUrl} />+ </div>+ <div class="grid grid-cols-2">+ <div class="flex flex-col">+ <label for="organization" class="pt-2 text-base font-bold text-stone-100"+ >Organization</label+ >+ <Explainer+ text="Fill it if you would like to use an organization's as your Git Source. Otherwise your user will be used."+ />+ </div>+ <input+ name="organization"+ id="organization"+ placeholder="eg: coollabsio"+ bind:value={source.organization}+ />+ </div>+ </div>+ {#if source.apiUrl && source.htmlUrl && source.name}+ <div class="text-center">+ <button class=" mt-8 bg-orange-600" type="submit">Create new GitHub App</button>+ </div>{/if}- </div>- <div class="grid grid-flow-row gap-2 px-10">- <div class="grid grid-cols-2 items-center mt-2">- <label for="name" class="text-base font-bold text-stone-100">{$t('forms.name')}</label>- <input name="name" id="name" required bind:value={source.name} />+ </form>+ {:else if source.githubApp?.installationId}+ <form on:submit|preventDefault={handleSubmit} class="py-4">+ <div class="flex space-x-1 pb-5 font-bold">- <div class="title">General</div>++ <div class="title">{$t('general')}</div>+ {#if $session.isAdmin}+ <button+ type="submit"+ class:bg-orange-600={!loading}+ class:hover:bg-orange-500={!loading}+ disabled={loading}>{loading ? 'Saving...' : 'Save'}</button+ >+ <button on:click|preventDefault={() => installRepositories(source)}- >Change GitHub App Settings</button++ >{$t('source.change_app_settings', { name: 'GitHub' })}</button+ >+ {/if}+ </div>+ <div class="grid grid-flow-row gap-2 px-10">+ <div class="grid grid-flow-row gap-2">+ <div class="mt-2 grid grid-cols-2 items-center">- <label for="name" class="text-base font-bold text-stone-100">Name</label>++ <label for="name" class="text-base font-bold text-stone-100">{$t('forms.name')}</label>+ <input name="name" id="name" required bind:value={source.name} />+ </div>+ </div>+ <div class="grid grid-cols-2 items-center">+ <label for="htmlUrl" class="text-base font-bold text-stone-100">HTML URL</label>+ <input name="htmlUrl" id="htmlUrl" required bind:value={source.htmlUrl} />+ </div>+ <div class="grid grid-cols-2 items-center">+ <label for="apiUrl" class="text-base font-bold text-stone-100">API URL</label>+ <input name="apiUrl" id="apiUrl" required bind:value={source.apiUrl} />+ </div>+ <div class="grid grid-cols-2">+ <div class="flex flex-col">+ <label for="organization" class="pt-2 text-base font-bold text-stone-100"+ >Organization</label+ >+ </div>+ <input+ readonly+ disabled+ name="organization"+ id="organization"+ placeholder="eg: coollabsio"+ bind:value={source.organization}+ />+ </div></div>+ </form>+ {:else}+ <div class="text-center">+ <button class=" bg-orange-600 mt-8" on:click={() => installRepositories(source)}+ >Install Repositories</button+ ></div>- </form>-{:else}- <button on:click={() => installRepositories(source)}>{$t('source.install_repositories')}</button>-{/if}+ {/if}+</div>diff --cc src/routes/sources/[id]/_Gitlab.svelteindex b528b18509,51616f8e9c..be1df4909b--- a/src/routes/sources/[id]/_Gitlab.svelte+++ b/src/routes/sources/[id]/_Gitlab.svelte@@@ -7,24 -6,18 +7,25 @@@import { onMount } from 'svelte';import { post } from '$lib/api';import { browser } from '$app/env';+ import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';+ import { toast } from '@zerodevx/svelte-toast';++ import { t } from '$lib/translations';const { id } = $page.params;+ let url = browser ? (settings.fqdn ? settings.fqdn : window.location.origin) : '';let loading = false;+let oauthIdEl;- let payload = {- oauthId: undefined,- groupName: undefined,- appId: undefined,- appSecret: undefined,- applicationType: 'user'- };+ let applicationType;+ if (!source.gitlabAppId) {+ source.gitlabApp = {+ oauthId: null,+ groupName: null,+ appId: null,+ appSecret: null+ };+ }onMount(() => {oauthIdEl && oauthIdEl.focus();});@@@ -119,136 -78,128 +120,144 @@@break;}}- async function handleSubmit() {- loading = true;- try {- await post(`/sources/${id}/gitlab.json`, { ...payload });- return window.location.reload();- } catch ({ error }) {- return errorNotification(error);- } finally {- loading = false;- }- }</script>-{#if !source.gitlabApp?.appId}- <form class="grid grid-flow-row gap-2 py-4" on:submit|preventDefault={newApp}>- <div class="grid grid-cols-2 items-center">- <label for="type">{$t('source.gitlab.gitlab_application_type')}</label>- <select name="type" id="type" class="w-96" bind:value={payload.applicationType}>- <option value="user">{$t('source.gitlab.user_owned')}</option>- <option value="group">{$t('source.gitlab.group_owned')}</option>- {#if source.htmlUrl !== 'https://gitlab.com'}- <option value="instance">{$t('source.gitlab.self_hosted')}</option>+<div class="mx-auto max-w-4xl px-6">+ <form on:submit|preventDefault={handleSubmit} class="py-4">+ <div class="flex space-x-1 pb-5 font-bold">+ <div class="title">General</div>+ {#if $session.isAdmin}+ <button+ type="submit"+ class:bg-orange-600={!loading}+ class:hover:bg-orange-500={!loading}- disabled={loading}>{loading ? 'Saving...' : 'Save'}</button++ disabled={loading}>{loading ? $t('forms.saving') : $t('forms.save')}</button+ >+ {#if source.gitlabAppId}- <button on:click|preventDefault={changeSettings}>Change GitLab App Settings</button>++ <button on:click|preventDefault={changeSettings}++ >{$t('source.change_app_settings', { name: 'GitLab' })}</button++ >{/if}- </select>- </div>- {#if payload.applicationType === 'group'}- <div class="grid grid-cols-2 items-center">- <label for="groupName">{$t('source.group_name')}</label>- <input name="groupName" id="groupName" required bind:value={payload.groupName} />- </div>- {/if}-- <div class="w-full pt-10 text-center">- <button class="w-96 bg-orange-600 hover:bg-orange-500" type="submit"- >{$t('source.register_oauth_gitlab')}</button- >+ {/if}</div>+ <div class="grid grid-flow-row gap-2 px-10">+ {#if !source.gitlabAppId}+ <div class="grid grid-cols-2 items-center">+ <label for="type" class="text-base font-bold text-stone-100"+ >GitLab Application Type</label+ >+ <select name="type" id="type" class="w-96" bind:value={applicationType}>- <option value="user">User owned application</option>- <option value="group">Group owned application</option>++ <option value="user">{$t('source.gitlab.user_owned')}</option>++ <option value="group">{$t('source.gitlab.group_owned')}</option>+ {#if source.htmlUrl !== 'https://gitlab.com'}- <option value="instance">Instance-wide application (self-hosted)</option>++ <option value="instance">{$t('source.gitlab.self_hosted')}</option>+ {/if}+ </select>+ </div>- <Explainer- customClass="w-full"- text="<span class='font-bold text-base text-white'>Scopes required:</span>- <br>- <span class='text-orange-500 font-bold'>api</span> (Access the authenticated user's API)- <br>- <span class='text-orange-500 font-bold'>read_repository</span> (Allows read-only access to the repository)- <br>- <span class='text-orange-500 font-bold'>email</span> (Allows read-only access to the user's primary email address using OpenID Connect)- <br>- <br>For extra security, you can set Expire access tokens!- <br><br>Webhook URL: <span class='text-orange-500 font-bold'>{browser- ? window.location.origin- : ''}/webhooks/gitlab</span>- <br>But if you will set a custom domain name for Coolify, use that instead."- />- </form>- <form on:submit|preventDefault={handleSubmit} class="grid grid-flow-row gap-2 py-4 pt-10">- <div class="flex h-8 items-center space-x-2">- <div class="text-xl font-bold text-white">{$t('forms.configuration')}</div>- <button- type="submit"- class:bg-orange-600={!loading}- class:hover:bg-orange-500={!loading}- disabled={loading}>{loading ? $t('forms.saving') : $t('forms.save')}</button- >- </div>+ {#if applicationType === 'group'}+ <div class="grid grid-cols-2 items-center">+ <label for="groupName" class="text-base font-bold text-stone-100">Group Name</label>+ <input+ name="groupName"+ id="groupName"+ required+ bind:value={source.gitlabApp.groupName}+ />+ </div>+ {/if}+ {/if}- <div class="grid grid-cols-2 items-start">- <div class="flex-col">- <label for="oauthId" class="pt-2">{$t('source.oauth_id')}</label>- <Explainer text={$t('source.oauth_id_explainer')} />+ <div class="grid grid-flow-row gap-2">+ <div class="mt-2 grid grid-cols-2 items-center">- <label for="name" class="text-base font-bold text-stone-100">Name</label>++ <label for="name" class="text-base font-bold text-stone-100">{$t('forms.name')}</label>+ <input name="name" id="name" required bind:value={source.name} />+ </div></div>- <input- on:change={checkOauthId}- bind:this={oauthIdEl}- name="oauthId"- id="oauthId"- type="number"- required- bind:value={payload.oauthId}- />- </div>- {#if payload.applicationType === 'group'}+ {#if source.gitlabApp.groupName}+ <div class="grid grid-cols-2 items-center">- <label for="groupName" class="text-base font-bold text-stone-100">Group Name</label>++ <label for="groupName" class="text-base font-bold text-stone-100"++ >{$t('source.group_name')}</label++ >+ <input+ name="groupName"+ id="groupName"+ disabled={source.gitlabAppId}+ readonly={source.gitlabAppId}+ required+ bind:value={source.gitlabApp.groupName}+ />+ </div>+ {/if}<div class="grid grid-cols-2 items-center">- <label for="groupName">{$t('source.group_name')}</label>- <input name="groupName" id="groupName" required bind:value={payload.groupName} />+ <label for="htmlUrl" class="text-base font-bold text-stone-100">HTML URL</label>+ <input name="htmlUrl" id="htmlUrl" required bind:value={source.htmlUrl} /></div>- {/if}- <div class="grid grid-cols-2 items-center">- <label for="appId">{$t('source.application_id')}</label>- <input name="appId" id="appId" required bind:value={payload.appId} />- </div>- <div class="grid grid-cols-2 items-center">- <label for="appSecret">{$t('index.secret')}</label>- <input- name="appSecret"- id="appSecret"- type="password"- required- bind:value={payload.appSecret}- />- </div>- </form>-{:else}- <div class="mx-auto max-w-4xl px-6">- <form on:submit|preventDefault={handleSubmitSave} class="py-4">- <div class="flex space-x-1 pb-5 font-bold">- <div class="title">General</div>- {#if $session.isAdmin}- <button- type="submit"- class:bg-orange-600={!loading}- class:hover:bg-orange-500={!loading}- disabled={loading}>{loading ? $t('forms.saving') : $t('forms.save')}</button- >- <button on:click|preventDefault={changeSettings}- >{$t('source.change_app_settings', { name: 'GitLab' })}</button- >- {/if}+ <div class="grid grid-cols-2 items-center">+ <label for="apiUrl" class="text-base font-bold text-stone-100">API URL</label>+ <input name="apiUrl" id="apiUrl" required bind:value={source.apiUrl} /></div>- <div class="grid grid-flow-row gap-2 px-10">- <div class="mt-2 grid grid-cols-2 items-center">- <label for="name" class="text-base font-bold text-stone-100">{$t('forms.name')}</label>- <input name="name" id="name" required bind:value={source.name} />+ <div class="grid grid-cols-2 items-start">+ <div class="flex-col">- <label for="oauthId" class="pt-2 text-base font-bold text-stone-100">OAuth ID</label>++ <label for="oauthId" class="pt-2 text-base font-bold text-stone-100"++ >{$t('source.oauth_id')}</label++ >+ {#if !source.gitlabAppId}- <Explainer- text="The OAuth ID is the unique identifier of the GitLab application. <br>You can find it <span class='font-bold text-orange-600' >in the URL</span> of your GitLab OAuth Application."- />++ <Explainer text={$t('source.oauth_id_explainer')} />+ {/if}</div>+ <input+ disabled={source.gitlabAppId}+ readonly={source.gitlabAppId}+ on:change={checkOauthId}+ bind:this={oauthIdEl}+ name="oauthId"+ id="oauthId"+ type="number"+ required+ bind:value={source.gitlabApp.oauthId}+ />+ </div>++ <div class="grid grid-cols-2 items-center">- <label for="appId" class="text-base font-bold text-stone-100">Application ID</label>++ <label for="appId" class="text-base font-bold text-stone-100"++ >{$t('source.application_id')}</label++ >+ <input+ name="appId"+ id="appId"+ disabled={source.gitlabAppId}+ readonly={source.gitlabAppId}+ required+ bind:value={source.gitlabApp.appId}+ /></div>- </form>- </div>-{/if}+ <div class="grid grid-cols-2 items-center">- <label for="appSecret" class="text-base font-bold text-stone-100">Secret</label>++ <label for="appSecret" class="text-base font-bold text-stone-100"++ >{$t('index.secret')}</label++ >+ <CopyPasswordField+ disabled={source.gitlabAppId}+ readonly={source.gitlabAppId}+ isPasswordField={true}+ name="appSecret"+ id="appSecret"+ required+ bind:value={source.gitlabApp.appSecret}+ />+ </div>+ </div>+ </form>+ {#if !source.gitlabAppId}+ <Explainer+ customClass="w-full"+ text="<span class='font-bold text-base text-white'>Scopes required:</span>+<br>- <span class='text-orange-500 font-bold'>api</span> (Access the authenticated user's API)+<br>- <span class='text-orange-500 font-bold'>read_repository</span> (Allows read-only access to the repository)+<br>- <span class='text-orange-500 font-bold'>email</span> (Allows read-only access to the user's primary email address using OpenID Connect)+<br>+<br>For extra security, you can set <span class='text-orange-500 font-bold'>Expire Access Tokens</span>+<br><br>Webhook URL: <span class='text-orange-500 font-bold'>{url}/webhooks/gitlab</span>"+ />+ {/if}+</div>diff --cc src/routes/sources/[id]/index.svelteindex 015c98a1ff,32db1d167b..7538dbbbdb--- a/src/routes/sources/[id]/index.svelte+++ b/src/routes/sources/[id]/index.svelte@@@ -29,7 -29,6 +29,9 @@@<script lang="ts">export let source: Prisma.GitSource;+ export let settings;++ import { t } from '$lib/translations';++import type Prisma from '@prisma/client';import Github from './_Github.svelte';import Gitlab from './_Gitlab.svelte';diff --cc src/routes/sources/index.svelteindex 191eb8857c,220df31c24..72489bdeae--- a/src/routes/sources/index.svelte+++ b/src/routes/sources/index.svelte@@@ -22,29 -22,13 +22,30 @@@<script lang="ts">export let sources;import { session } from '$app/stores';+ import { post } from '$lib/api';+ import { goto } from '$app/navigation';+ import { getDomain } from '$lib/components/common';+ const ownSources = sources.filter((source) => {+ if (source.teams[0].id === $session.teamId) {+ return source;+ }+ });+ const otherSources = sources.filter((source) => {+ if (source.teams[0].id !== $session.teamId) {+ return source;+ }+ });+ async function newSource() {+ const { id } = await post('/sources/new', {});+ return await goto(`/sources/${id}`, { replaceState: true });+ }+ import { t } from '$lib/translations';</script><div class="flex space-x-1 p-6 font-bold">- <div class="mr-4 text-2xl tracking-tight">Git Sources</div>+ <div class="mr-4 text-2xl tracking-tight">{$t('index.git_sources')}</div>{#if $session.isAdmin}- <a href="/new/source" sveltekit:prefetch class="add-icon bg-orange-600 hover:bg-orange-500">+ <button on:click={newSource} class="add-icon bg-orange-600 hover:bg-orange-500"><svgclass="w-6"xmlns="http://www.w3.org/2000/svg"@@@ -58,70 -42,35 +59,70 @@@d="M12 6v6m0 0v6m0-6h6m-6 0H6"/></svg>- </a>+ </button>{/if}</div>-<div class="flex justify-center">- {#if !sources || sources.length === 0}+<div class="flex flex-col flex-wrap justify-center">+ {#if !sources || ownSources.length === 0}<div class="flex-col">- <div class="text-center text-xl font-bold">No git sources found</div>+ <div class="text-center text-xl font-bold">{$t('source.no_git_sources_found')}</div></div>- {:else}- <div class="flex flex-wrap justify-center">- {#each sources as source}- <a href="/sources/{source.id}" class="no-underline p-2 w-96">- <div- class="box-selection hover:bg-orange-600 group"- class:border-red-500={source.gitlabApp && !source.gitlabAppId}- class:border-0={source.gitlabApp && !source.gitlabAppId}- class:border-l-4={source.gitlabApp && !source.gitlabAppId}- >- <div class="font-bold text-xl text-center truncate">{source.name}</div>- {#if (source.type === 'gitlab' && !source.gitlabAppId) || (source.type === 'github' && !source.githubAppId && !source.githubApp?.installationId)}- <div class="font-bold text-center truncate text-red-500 group-hover:text-white">- {$t('application.configuration.configuration_missing')}+ {/if}+ {#if ownSources.length > 0 || otherSources.length > 0}+ <div class="flex flex-col">+ <div class="flex flex-col flex-wrap justify-center px-2 md:flex-row">+ {#each ownSources as source}+ <a href="/sources/{source.id}" class="w-96 p-2 no-underline">+ <div+ class="box-selection group hover:bg-orange-600"+ class:border-red-500={source.gitlabApp && !source.gitlabAppId}+ class:border-0={source.gitlabApp && !source.gitlabAppId}+ class:border-l-4={source.gitlabApp && !source.gitlabAppId}+ >+ <div class="truncate text-center text-xl font-bold">{source.name}</div>+ {#if $session.teamId === '0' && otherSources.length > 0}+ <div class="truncate text-center">{source.teams[0].name}</div>+ {/if}++ {#if (source.type === 'gitlab' && !source.gitlabAppId) || (source.type === 'github' && source.githubApp?.installationId === null)}+ <div class="truncate text-center font-bold text-red-500 group-hover:text-white">- Configuration missing++ {$t('application.configuration.configuration_missing')}+ </div>+ {:else}+ <div class="truncate text-center">{getDomain(source.htmlUrl) || ''}</div>+ {/if}+ </div>+ </a>+ {/each}+ </div>++ {#if otherSources.length > 0 && $session.teamId === '0'}+ <div class="px-6 pb-5 pt-10 text-xl font-bold">Other Sources</div>+ <div class="flex flex-col flex-wrap justify-center px-2 md:flex-row">+ {#each otherSources as source}+ <a href="/sources/{source.id}" class="w-96 p-2 no-underline">+ <div+ class="box-selection group hover:bg-orange-600"+ class:border-red-500={source.gitlabApp && !source.gitlabAppId}+ class:border-0={source.gitlabApp && !source.gitlabAppId}+ class:border-l-4={source.gitlabApp && !source.gitlabAppId}+ >+ <div class="truncate text-center text-xl font-bold">{source.name}</div>+ {#if $session.teamId === '0'}+ <div class="truncate text-center">{source.teams[0].name}</div>+ {/if}+ {#if (source.type === 'gitlab' && !source.gitlabAppId) || (source.type === 'github' && source.githubApp?.installationId === null)}+ <div class="truncate text-center font-bold text-red-500 group-hover:text-white">- Configuration missing++ {$t('application.configuration.configuration_missing')}+ </div>+ {:else}+ <div class="truncate text-center">{source.htmlUrl}</div>+ {/if}</div>- {:else}- <div class="truncate text-center">{source.htmlUrl}</div>- {/if}- </div>- </a>- {/each}+ </a>+ {/each}+ </div>+ {/if}</div>{/if}</div>