From c8065121fdb72095a44daf66c12c0c89fc208b4f Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Mon, 24 Oct 2022 23:44:13 +0200 Subject: [PATCH 01/32] draft: new layout endpoints --- package-lock.json | 28 ++++++++--------- package.json | 5 +-- src/lib/components/pagination.svelte | 17 +++++----- src/lib/layout/header.svelte | 6 ++-- src/lib/layout/shell.svelte | 6 ++-- src/routes/{+layout.js => +layout.ts} | 2 ++ .../+layout.svelte | 22 ++----------- .../organization-[organization]/+layout.ts | 14 +++++++++ .../organization-[organization]/header.svelte | 18 ++--------- .../members/{ => [[page]]}/+page.svelte | 20 +++++------- .../members/[[page]]/+page.ts | 11 +++++++ .../console/project-[project]/+layout.svelte | 31 ++----------------- .../console/project-[project]/+layout.ts | 31 +++++++++++++++++++ .../authentication/+layout.svelte | 22 ------------- .../authentication/+layout.ts | 12 +++++++ .../{ => [[page]]}/+page.svelte | 13 +++----- .../authentication/[[page]]/+page.ts | 16 ++++++++++ .../authentication/breadcrumbs.svelte | 10 +++--- .../authentication/user/[user]/+layout.svelte | 24 -------------- .../authentication/user/[user]/+layout.ts | 22 +++++++++++++ .../user/[user]/breadcrumbs.svelte | 14 ++++----- .../user/[user]/memberships/+page.ts | 5 +++ svelte.config.js | 3 ++ 23 files changed, 178 insertions(+), 174 deletions(-) rename src/routes/{+layout.js => +layout.ts} (72%) create mode 100644 src/routes/console/organization-[organization]/+layout.ts rename src/routes/console/organization-[organization]/members/{ => [[page]]}/+page.svelte (88%) create mode 100644 src/routes/console/organization-[organization]/members/[[page]]/+page.ts create mode 100644 src/routes/console/project-[project]/+layout.ts create mode 100644 src/routes/console/project-[project]/authentication/+layout.ts rename src/routes/console/project-[project]/authentication/{ => [[page]]}/+page.svelte (96%) create mode 100644 src/routes/console/project-[project]/authentication/[[page]]/+page.ts create mode 100644 src/routes/console/project-[project]/authentication/user/[user]/+layout.ts create mode 100644 src/routes/console/project-[project]/authentication/user/[user]/memberships/+page.ts diff --git a/package-lock.json b/package-lock.json index c80abfc0d0..a01d15417d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,8 +19,8 @@ }, "devDependencies": { "@playwright/test": "^1.27.1", - "@sveltejs/adapter-static": "1.0.0-next.44", - "@sveltejs/kit": "1.0.0-next.516", + "@sveltejs/adapter-static": "1.0.0-next.46", + "@sveltejs/kit": "1.0.0-next.524", "@sveltejs/vite-plugin-svelte": "^1.0.9", "@testing-library/dom": "^8.19.0", "@testing-library/jest-dom": "^5.16.5", @@ -1339,15 +1339,15 @@ } }, "node_modules/@sveltejs/adapter-static": { - "version": "1.0.0-next.44", - "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-1.0.0-next.44.tgz", - "integrity": "sha512-qBtkmIMYGiDv5r2F3AfSG0ABHZim2NC+1PL2YVCa+QYz8IVCm1E/wGQ0RW4KVrANZ3MZk8y52PPajx+8/fwmNw==", + "version": "1.0.0-next.46", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-1.0.0-next.46.tgz", + "integrity": "sha512-8BlgwD3fjAbtUUgvREjrq5okZSXMTU/Qla99RhTqGaFo+uOrUzguKrXvjeaD4GzxQZdQUNyTX9hKT0V7tX6TMw==", "dev": true }, "node_modules/@sveltejs/kit": { - "version": "1.0.0-next.516", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.0.0-next.516.tgz", - "integrity": "sha512-n0oGcv7xpgJ81ld1oER5HVREP4TdeDUJ8S64XNDcl3Y2xfQLKk8C4SLYQw2D6V+DxUm8V3aRrj7N7/tm4CQm6A==", + "version": "1.0.0-next.524", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.0.0-next.524.tgz", + "integrity": "sha512-o1UgsRzZzbBs5LBldlDfdHbp3QY1bh8/UkS8SjCow4fMWaJTihFdN42+C2rdZvVlqqCx3UlaN9uNLibkEE9UUg==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -8773,15 +8773,15 @@ } }, "@sveltejs/adapter-static": { - "version": "1.0.0-next.44", - "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-1.0.0-next.44.tgz", - "integrity": "sha512-qBtkmIMYGiDv5r2F3AfSG0ABHZim2NC+1PL2YVCa+QYz8IVCm1E/wGQ0RW4KVrANZ3MZk8y52PPajx+8/fwmNw==", + "version": "1.0.0-next.46", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-1.0.0-next.46.tgz", + "integrity": "sha512-8BlgwD3fjAbtUUgvREjrq5okZSXMTU/Qla99RhTqGaFo+uOrUzguKrXvjeaD4GzxQZdQUNyTX9hKT0V7tX6TMw==", "dev": true }, "@sveltejs/kit": { - "version": "1.0.0-next.516", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.0.0-next.516.tgz", - "integrity": "sha512-n0oGcv7xpgJ81ld1oER5HVREP4TdeDUJ8S64XNDcl3Y2xfQLKk8C4SLYQw2D6V+DxUm8V3aRrj7N7/tm4CQm6A==", + "version": "1.0.0-next.524", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.0.0-next.524.tgz", + "integrity": "sha512-o1UgsRzZzbBs5LBldlDfdHbp3QY1bh8/UkS8SjCow4fMWaJTihFdN42+C2rdZvVlqqCx3UlaN9uNLibkEE9UUg==", "dev": true, "requires": { "@sveltejs/vite-plugin-svelte": "^1.0.5", diff --git a/package.json b/package.json index 2ddcfe3cf2..b1b88113d3 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", + "sync": "svelte-kit sync", "check": "svelte-check --tsconfig ./tsconfig.json --fail-on-warnings --threshold warning", "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch", "lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint .", @@ -29,8 +30,8 @@ }, "devDependencies": { "@playwright/test": "^1.27.1", - "@sveltejs/adapter-static": "1.0.0-next.44", - "@sveltejs/kit": "1.0.0-next.516", + "@sveltejs/adapter-static": "1.0.0-next.46", + "@sveltejs/kit": "1.0.0-next.524", "@sveltejs/vite-plugin-svelte": "^1.0.9", "@testing-library/dom": "^8.19.0", "@testing-library/jest-dom": "^5.16.5", diff --git a/src/lib/components/pagination.svelte b/src/lib/components/pagination.svelte index 12d48afb37..61dc6cf1c5 100644 --- a/src/lib/components/pagination.svelte +++ b/src/lib/components/pagination.svelte @@ -4,6 +4,7 @@ export let sum: number; export let limit: number; export let offset: number; + export let path: string = ''; export let hidePages = false; const dispatch = createEventDispatcher(); @@ -52,15 +53,14 @@ {#if totalPages > 1} {:else}