mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: typo in createPersistentPagination
This commit is contained in:
1 parent
1ec879adca
commit
24f123189e
19 files changed
+37
-37
No files matched your search
@@ -2,7 +2,7 @@ import { afterNavigate, goto } from '$app/navigation';
|
||||
import { page } from '$app/stores';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
export function createPersistenPagination(limit: number) {
|
||||
export function createPersistentPagination(limit: number) {
|
||||
const url = get(page).url;
|
||||
const current = +(url.searchParams.get('page') ?? 1);
|
||||
const offset = current * limit - limit;
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
import { onMount } from 'svelte';
|
||||
import { accountActivity } from '../store';
|
||||
import { Query } from '@aw-labs/appwrite-console';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
const offset = createPersistenPagination($pageLimit);
|
||||
const offset = createPersistentPagination($pageLimit);
|
||||
|
||||
onMount(async () => {
|
||||
await accountActivity.load([Query.offset($offset), Query.limit($pageLimit)]);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import { onMount } from 'svelte';
|
||||
import { sdkForConsole } from '$lib/stores/sdk';
|
||||
import { cardLimit } from '$lib/stores/layout';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
onMount(async () => {
|
||||
await organizationList.load();
|
||||
@@ -29,7 +29,7 @@
|
||||
};
|
||||
|
||||
let addOrganization = false;
|
||||
const offset = createPersistenPagination($cardLimit);
|
||||
const offset = createPersistentPagination($cardLimit);
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
import type { Models } from '@aw-labs/appwrite-console';
|
||||
import { accountSession } from '../store';
|
||||
import { onMount } from 'svelte';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
const offset = createPersistenPagination($pageLimit);
|
||||
const offset = createPersistentPagination($pageLimit);
|
||||
|
||||
onMount(async () => {
|
||||
await accountSession.load();
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
import CreateProject from './_createProject.svelte';
|
||||
import { cardLimit } from '$lib/stores/layout';
|
||||
import CardContainer from '$lib/components/cardContainer.svelte';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
$: organizationId = $page.params.organization;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
let showCreate = false;
|
||||
let addOrganization = false;
|
||||
const offset = createPersistenPagination($cardLimit);
|
||||
const offset = createPersistentPagination($cardLimit);
|
||||
|
||||
const projectCreated = async (event: CustomEvent<Models.Project>) => {
|
||||
await project.load(event.detail.$id);
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
import { pageLimit } from '$lib/stores/layout';
|
||||
import { page } from '$app/stores';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
let search = '';
|
||||
let selectedMember: Models.Membership;
|
||||
let showDelete = false;
|
||||
const url = `${$page.url.origin}/console/`;
|
||||
const offset = createPersistenPagination($pageLimit);
|
||||
const offset = createPersistentPagination($pageLimit);
|
||||
|
||||
const getAvatar = (name: string) =>
|
||||
sdkForConsole.avatars.getInitials(name, 120, 120).toString();
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
import { usersList } from './store';
|
||||
import { Query, type Models } from '@aw-labs/appwrite-console';
|
||||
import { pageLimit } from '$lib/stores/layout';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
let showCreate = false;
|
||||
let search = '';
|
||||
const offset = createPersistenPagination($pageLimit);
|
||||
const offset = createPersistentPagination($pageLimit);
|
||||
|
||||
const project = $page.params.project;
|
||||
const getAvatar = (name: string) => sdkForProject.avatars.getInitials(name, 32, 32).toString();
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
import { teamsList } from '../store';
|
||||
import { Query, type Models } from '@aw-labs/appwrite-console';
|
||||
import { pageLimit } from '$lib/stores/layout';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
let search = '';
|
||||
let showCreate = false;
|
||||
const offset = createPersistenPagination($pageLimit);
|
||||
const offset = createPersistentPagination($pageLimit);
|
||||
|
||||
const project = $page.params.project;
|
||||
const getAvatar = (name: string) => sdkForProject.avatars.getInitials(name, 32, 32).toString();
|
||||
|
||||
+2
-2
@@ -16,9 +16,9 @@
|
||||
import { sdkForProject } from '$lib/stores/sdk';
|
||||
import { pageLimit } from '$lib/stores/layout';
|
||||
import { Query } from '@aw-labs/appwrite-console';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
const offset = createPersistenPagination($pageLimit);
|
||||
const offset = createPersistentPagination($pageLimit);
|
||||
|
||||
$: request = sdkForProject.teams.listLogs($page.params.team, [
|
||||
Query.limit($pageLimit),
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@
|
||||
import CreateMember from '../_createMembership.svelte';
|
||||
import DeleteMembership from '../_deleteMembership.svelte';
|
||||
import { pageLimit } from '$lib/stores/layout';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
let showCreate = false;
|
||||
let showDelete = false;
|
||||
@@ -28,7 +28,7 @@
|
||||
let selectedMembership: Models.Membership;
|
||||
|
||||
const project = $page.params.project;
|
||||
const offset = createPersistenPagination($pageLimit);
|
||||
const offset = createPersistentPagination($pageLimit);
|
||||
const getAvatar = (name: string) => sdkForProject.avatars.getInitials(name, 32, 32).toString();
|
||||
|
||||
$: if (search) $offset = 0;
|
||||
|
||||
+2
-2
@@ -16,9 +16,9 @@
|
||||
import { sdkForProject } from '$lib/stores/sdk';
|
||||
import { pageLimit } from '$lib/stores/layout';
|
||||
import { Query } from '@aw-labs/appwrite-console';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
const offset = createPersistenPagination($pageLimit);
|
||||
const offset = createPersistentPagination($pageLimit);
|
||||
|
||||
$: request = sdkForProject.users.listLogs($page.params.user, [
|
||||
Query.limit($pageLimit),
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@
|
||||
import { Container } from '$lib/layout';
|
||||
import { sdkForProject } from '$lib/stores/sdk';
|
||||
import { pageLimit } from '$lib/stores/layout';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
import DeleteMembership from '../_deleteMembership.svelte';
|
||||
import DeleteAllMemberships from '../_deleteAllMemberships.svelte';
|
||||
import type { Models } from '@aw-labs/appwrite-console';
|
||||
@@ -25,7 +25,7 @@
|
||||
let showDeleteAll = false;
|
||||
|
||||
const project = $page.params.project;
|
||||
const offset = createPersistenPagination($pageLimit);
|
||||
const offset = createPersistentPagination($pageLimit);
|
||||
const getAvatar = (name: string) => sdkForProject.avatars.getInitials(name, 32, 32).toString();
|
||||
|
||||
$: request = sdkForProject.users.listMemberships($page.params.user);
|
||||
|
||||
+2
-2
@@ -19,14 +19,14 @@
|
||||
import { pageLimit } from '$lib/stores/layout';
|
||||
import { onMount } from 'svelte';
|
||||
import type { Models } from '@aw-labs/appwrite-console';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
let showDelete = false;
|
||||
let showDeleteAll = false;
|
||||
let selectedSessionId: string = null;
|
||||
let sessionList: Models.SessionList = null;
|
||||
|
||||
const offset = createPersistenPagination($pageLimit);
|
||||
const offset = createPersistentPagination($pageLimit);
|
||||
|
||||
onMount(async () => {
|
||||
sessionList = await sdkForProject.users.listSessions($page.params.user);
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
import { base } from '$app/paths';
|
||||
import { databaseList } from './store';
|
||||
import { cardLimit } from '$lib/stores/layout';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
let showCreate = false;
|
||||
let search = '';
|
||||
|
||||
const project = $page.params.project;
|
||||
const offset = createPersistenPagination($cardLimit);
|
||||
const offset = createPersistentPagination($cardLimit);
|
||||
|
||||
async function handleCreate(event: CustomEvent<Models.Database>) {
|
||||
showCreate = false;
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
import { base } from '$app/paths';
|
||||
import { collections } from './store';
|
||||
import { cardLimit } from '$lib/stores/layout';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
let showCreate = false;
|
||||
|
||||
const project = $page.params.project;
|
||||
const databaseId = $page.params.database;
|
||||
const offset = createPersistenPagination($cardLimit);
|
||||
const offset = createPersistentPagination($cardLimit);
|
||||
|
||||
async function handleCreate(event: CustomEvent<Models.Collection>) {
|
||||
showCreate = false;
|
||||
|
||||
+2
-2
@@ -18,11 +18,11 @@
|
||||
import Create from './createDocument.svelte';
|
||||
import { Query } from '@aw-labs/appwrite-console';
|
||||
import { pageLimit } from '$lib/stores/layout';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
const databaseId = $page.params.database;
|
||||
const offset = createPersistenPagination($pageLimit);
|
||||
const offset = createPersistentPagination($pageLimit);
|
||||
|
||||
function openWizard() {
|
||||
wizard.start(Create);
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@
|
||||
import Delete from './deleteAttribute.svelte';
|
||||
import Overview from './overview.svelte';
|
||||
import { pageLimit } from '$lib/stores/layout';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
let showDropdown = [];
|
||||
let selectedAttribute: Attributes = null;
|
||||
@@ -28,7 +28,7 @@
|
||||
let showOverview = false;
|
||||
let showCreateIndex = false;
|
||||
|
||||
const offset = createPersistenPagination($pageLimit);
|
||||
const offset = createPersistentPagination($pageLimit);
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
import { bucketList } from './store';
|
||||
import { tooltip } from '$lib/actions/tooltip';
|
||||
import { cardLimit } from '$lib/stores/layout';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
let showCreate = false;
|
||||
|
||||
const project = $page.params.project;
|
||||
const offset = createPersistenPagination($cardLimit);
|
||||
const offset = createPersistentPagination($cardLimit);
|
||||
|
||||
async function bucketCreated(event: CustomEvent<Models.Bucket>) {
|
||||
showCreate = false;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
import { uploader } from '$lib/stores/uploader';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { pageLimit } from '$lib/stores/layout';
|
||||
import { createPersistenPagination } from '$lib/stores/pagination';
|
||||
import { createPersistentPagination } from '$lib/stores/pagination';
|
||||
|
||||
let search = '';
|
||||
let showCreate = false;
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
const project = $page.params.project;
|
||||
const bucket = $page.params.bucket;
|
||||
const offset = createPersistenPagination($pageLimit);
|
||||
const offset = createPersistentPagination($pageLimit);
|
||||
const getPreview = (fileId: string) =>
|
||||
sdkForProject.storage.getFilePreview(bucket, fileId, 32, 32).toString() + '&mode=admin';
|
||||
|
||||
|
||||
Reference in new issue
Block a user