Content-Length: 636602 | pFad | https://github.com/sebadob/rauthy/commit/60a499aee0ff071937a03a78759e447f0d477c90

22 Merge pull request #1 from sebadob/pagination-component · sebadob/rauthy@60a499a · GitHub
Skip to content

Commit

Permalink
Merge pull request #1 from sebadob/pagination-component
Browse files Browse the repository at this point in the history
create a pagination component
  • Loading branch information
sebadob authored Jul 24, 2023
2 parents f13c624 + 6eb345c commit 60a499a
Show file tree
Hide file tree
Showing 15 changed files with 388 additions and 190 deletions.
304 changes: 151 additions & 153 deletions frontend/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"eslint-plugin-svelte": "^2.32.2",
"jwt-decode": "^3.1.2",
"oauth-pkce": "^0.0.6",
"prettier": "^2.6.2",
"prettier-plugin-svelte": "^2.10.1",
"prettier": "^3.0.0",
"prettier-plugin-svelte": "^3.0.0",
"sjcl": "^1.0.8",
"svelte": "^4.0.0",
"svelte-check": "^3.4.3",
Expand All @@ -34,4 +34,4 @@
"yup": "^1.0.2"
},
"type": "module"
}
}
7 changes: 7 additions & 0 deletions frontend/src/components/admin/clients/Clients.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
import ClientTile from "./ClientTile.svelte";
import ClientTileAddNew from "./ClientTileAddNew.svelte";
import OrderSearchBar from "$lib/search/OrderSearchBar.svelte";
import Pagination from "$lib/Pagination.svelte";
let msg = '';
let clients = [];
let resClients = [];
let resClientsPaginated = [];
let searchOptions = [
{
Expand Down Expand Up @@ -76,6 +78,11 @@
{/each}
</div>

<Pagination
bind:items={resClients}
bind:resItems={resClientsPaginated}
/>

<div style="height: 20px"></div>
</div>

Expand Down
6 changes: 2 additions & 4 deletions frontend/src/components/admin/groups/GroupTileAddNew.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
export let onSave;
let expandContainer;
let group = {
group: '',
}
let group = { group: '' };
let err = '';
let isLoading = false;
Expand All @@ -30,7 +28,7 @@
timer = setTimeout(() => {
onSave();
success = false;
group = {};
group = { group: '' };
expandContainer = false;
}, 1500);
}
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/components/admin/groups/Groups.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
import GroupTileAddNew from "./GroupTileAddNew.svelte";
import GroupTile from "./GroupTile.svelte";
import OrderSearchBar from "$lib/search/OrderSearchBar.svelte";
import Pagination from "$lib/Pagination.svelte";
let err = '';
let groups = [];
let resGroups = [];
let resClientsPaginated = [];
let searchOptions = [
{
Expand Down Expand Up @@ -70,6 +72,11 @@
{/each}
</div>

<Pagination
bind:items={resGroups}
bind:resItems={resClientsPaginated}
/>

<div style="height: 20px"></div>
</div>

Expand Down
6 changes: 2 additions & 4 deletions frontend/src/components/admin/roles/RoleTileAddNew.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
export let onSave;
let expandContainer;
let role = {
role: '',
}
let role = { role: '' };
let err = '';
let isLoading = false;
Expand All @@ -29,7 +27,7 @@
$: if (success) {
timer = setTimeout(() => {
success = false;
role = {};
role = { role: '' };
expandContainer = false;
onSave();
}, 1500);
Expand Down
9 changes: 8 additions & 1 deletion frontend/src/components/admin/roles/Roles.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
import RoleTile from "./RoleTile.svelte";
import RoleTileAddNew from "./RoleTileAddNew.svelte";
import OrderSearchBar from "$lib/search/OrderSearchBar.svelte";
import Pagination from "$lib/Pagination.svelte";
let err = '';
let roles = [];
let resRoles = [];
let resItemsPaginated = [];
let searchOptions = [
{
Expand Down Expand Up @@ -63,13 +65,18 @@
<RoleTileAddNew onSave={onSave}/>

<div id="roles">
{#each resRoles as role (role.id)}
{#each resItemsPaginated as role (role.id)}
<div>
<RoleTile bind:role onSave={onSave}/>
</div>
{/each}
</div>

<Pagination
bind:items={resRoles}
bind:resItems={resItemsPaginated}
/>

<div style="height: 20px"></div>
</div>

Expand Down
6 changes: 2 additions & 4 deletions frontend/src/components/admin/scopes/ScopeTileAddNew.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
export let onSave;
let expandContainer;
let scope = {
scope: '',
}
let scope = { scope: '' };
let err = '';
let isLoading = false;
Expand All @@ -30,7 +28,7 @@
timer = setTimeout(() => {
onSave();
success = false;
scope = {};
scope = { scope: '' };
expandContainer = false;
}, 1500);
}
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/components/admin/scopes/Scopes.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
import ScopeTileAddNew from "./ScopeTileAddNew.svelte";
import ScopeTile from "./ScopeTile.svelte";
import OrderSearchBar from "$lib/search/OrderSearchBar.svelte";
import Pagination from "$lib/Pagination.svelte";
let attrs = [];
let err = '';
let scopes = [];
let resScopes = [];
let resScopesPaginated = [];
let refresh;
let searchOptions = [
Expand Down Expand Up @@ -83,6 +85,11 @@
{/each}
</div>

<Pagination
bind:items={resScopes}
bind:resItems={resScopesPaginated}
/>

<div style="height: 20px"></div>
</div>

Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/admin/sessions/Sessions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import Loading from "$lib/Loading.svelte";
import OrderSearchBar from "$lib/search/OrderSearchBar.svelte";
import Button from "$lib/Button.svelte";
import Pagination from "$lib/Pagination.svelte";
let err = '';
let sessions = [];
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/components/admin/userAttr/Attr.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
import OrderSearchBar from "$lib/search/OrderSearchBar.svelte";
import UserAttrTileAddNew from "./AttrTileAddNew.svelte";
import UserAttrTile from "./AttrTile.svelte";
import Pagination from "$lib/Pagination.svelte";
let msg = '';
let attr = [];
let resAttr = [];
let resAttrPaginated = [];
let searchOptions = [
{
Expand Down Expand Up @@ -62,6 +64,11 @@
{/each}
</div>

<Pagination
bind:items={resAttr}
bind:resItems={resAttrPaginated}
/>

<div style="height: 20px"></div>
</div>

Expand Down
7 changes: 7 additions & 0 deletions frontend/src/components/admin/users/Users.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
import {globalGroups, globalGroupsNames, globalRoles, globalRolesNames,} from "../../../stores/admin.js";
import UserTileAddNew from "./UserTileAddNew.svelte";
import OrderSearchBar from "$lib/search/OrderSearchBar.svelte";
import Pagination from "$lib/Pagination.svelte";
let msg = '';
let users = [];
let resUsers = [];
let resUsersPaginated = [];
let searchOptions = [
{
Expand Down Expand Up @@ -97,6 +99,11 @@
</div>
{/each}
</div>

<Pagination
bind:items={resUsers}
bind:resItems={resUsersPaginated}
/>
</div>

<style>
Expand Down
Loading

0 comments on commit 60a499a

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/sebadob/rauthy/commit/60a499aee0ff071937a03a78759e447f0d477c90

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy