mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
chore: enforce noUnusedParameters
This commit is contained in:
1 parent
32e706756c
commit
ca41c431de
5 files changed
+29
-29
No files matched your search
@@ -4,7 +4,7 @@ import { getLimit, getPage, getQuery, getSearch, pageToOffset } from '$lib/helpe
|
||||
import { Dependencies, PAGE_LIMIT } from '$lib/constants';
|
||||
import { queries, queryParamToMap } from '$lib/components/filters';
|
||||
|
||||
export const load = async ({ depends, url, route, params }) => {
|
||||
export const load = async ({ depends, url, route }) => {
|
||||
depends(Dependencies.DOMAINS);
|
||||
const page = getPage(url);
|
||||
const limit = getLimit(url, route, PAGE_LIMIT);
|
||||
|
||||
+25
-26
@@ -3,13 +3,12 @@
|
||||
import { Modal } from '$lib/components';
|
||||
import { onMount } from 'svelte';
|
||||
import { page } from '$app/state';
|
||||
import { func } from '../store';
|
||||
import { Alert, Code, Layout, Tabs } from '@appwrite.io/pink-svelte';
|
||||
import { Link } from '$lib/elements';
|
||||
|
||||
export let show = false;
|
||||
|
||||
let lang = 'js';
|
||||
// let lang = 'js';
|
||||
let codeSnippets = {};
|
||||
let os = 'unknown';
|
||||
let category = 'Unix';
|
||||
@@ -17,8 +16,8 @@
|
||||
const functionId = page.params.function;
|
||||
|
||||
onMount(() => {
|
||||
lang = setLanguage($func.runtime);
|
||||
codeSnippets = setCodeSnippets(lang);
|
||||
// lang = setLanguage($func.runtime);
|
||||
codeSnippets = setCodeSnippets();
|
||||
os = navigator['userAgentData']?.platform || navigator?.platform || 'unknown';
|
||||
|
||||
if (os.includes('Win')) {
|
||||
@@ -30,29 +29,29 @@
|
||||
}
|
||||
});
|
||||
|
||||
function setLanguage(runtime: string) {
|
||||
if (runtime.includes('node') || runtime.includes('deno')) {
|
||||
return 'js';
|
||||
} else if (runtime.includes('php')) {
|
||||
return 'php';
|
||||
} else if (runtime.includes('python')) {
|
||||
return 'py';
|
||||
} else if (runtime.includes('dart')) {
|
||||
return 'dart';
|
||||
} else if (runtime.includes('dotnet')) {
|
||||
return 'cs';
|
||||
} else if (runtime.includes('ruby')) {
|
||||
return 'rb';
|
||||
} else if (runtime.includes('swift')) {
|
||||
return 'swift';
|
||||
} else if (runtime.includes('kotlin')) {
|
||||
return 'kt';
|
||||
} else if (runtime.includes('java')) {
|
||||
return 'java';
|
||||
}
|
||||
}
|
||||
// function setLanguage(runtime: string) {
|
||||
// if (runtime.includes('node') || runtime.includes('deno')) {
|
||||
// return 'js';
|
||||
// } else if (runtime.includes('php')) {
|
||||
// return 'php';
|
||||
// } else if (runtime.includes('python')) {
|
||||
// return 'py';
|
||||
// } else if (runtime.includes('dart')) {
|
||||
// return 'dart';
|
||||
// } else if (runtime.includes('dotnet')) {
|
||||
// return 'cs';
|
||||
// } else if (runtime.includes('ruby')) {
|
||||
// return 'rb';
|
||||
// } else if (runtime.includes('swift')) {
|
||||
// return 'swift';
|
||||
// } else if (runtime.includes('kotlin')) {
|
||||
// return 'kt';
|
||||
// } else if (runtime.includes('java')) {
|
||||
// return 'java';
|
||||
// }
|
||||
// }
|
||||
|
||||
function setCodeSnippets(lang: string) {
|
||||
function setCodeSnippets() {
|
||||
return {
|
||||
Unix: {
|
||||
code: `appwrite client --projectId="${page.params.project}" && \\
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { Dependencies } from '$lib/constants.js';
|
||||
import { isCloud } from '$lib/system';
|
||||
import type { Domain, DomainsList } from '$lib/sdk/domains.js';
|
||||
|
||||
export const load = async ({ parent, depends, params }) => {
|
||||
export const load = async ({ depends, params }) => {
|
||||
depends(Dependencies.DOMAINS);
|
||||
|
||||
let domain: Domain;
|
||||
|
||||
+1
-1
@@ -358,7 +358,7 @@
|
||||
<ActionMenu.Item.Button
|
||||
status="danger"
|
||||
leadingIcon={IconTrash}
|
||||
on:click={async (e) => {
|
||||
on:click={async () => {
|
||||
toggle();
|
||||
tokenDeleteMode = true;
|
||||
showManageToken = true;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"sourceMap": true,
|
||||
"strict": false,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"moduleResolution": "bundler"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user