From ea977f961659cf1f3ba55ac3d86119752a34053c Mon Sep 17 00:00:00 2001 From: Ivan Isekeev Date: Sat, 3 Aug 2024 20:54:03 +0600 Subject: [PATCH] Decrease print width formatter --- .prettierrc | 2 +- .vscode/extensions.json | 2 +- api.ts | 15 ++++- components/ProjectsActivator.vue | 42 ++++++++----- components/Task.vue | 10 ++- entrypoints/background.ts | 12 ++-- entrypoints/sidepanel/App.vue | 17 +++++- helpers.ts | 102 +++++++++++++++---------------- tsconfig.json | 2 +- uno.config.ts | 6 +- views/Projects.vue | 4 +- views/Settings.vue | 5 +- views/Tasks.vue | 71 +++++++++++++-------- 13 files changed, 173 insertions(+), 117 deletions(-) diff --git a/.prettierrc b/.prettierrc index 703b3fc..317868b 100644 --- a/.prettierrc +++ b/.prettierrc @@ -2,7 +2,7 @@ "tabWidth": 4, "useTabs": false, "singleQuote": true, - "printWidth": 180, + "printWidth": 140, "semi": false, "bracketSpacing": false, "trailingComma": "none", diff --git a/.vscode/extensions.json b/.vscode/extensions.json index a7cea0b..10eb3fb 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["Vue.volar"] + "recommendations": ["Vue.volar"] } diff --git a/api.ts b/api.ts index 949a956..9aa7728 100644 --- a/api.ts +++ b/api.ts @@ -16,7 +16,17 @@ export const getClients = () => api.get('/clients?per_page=6&page=1?status=activ export const getProjects = () => api.get('/projects?per_page=6&page=1?&status=active&without_deleted_clients=true&sort=budgeted_hours|desc') export const getProject = (id: string) => api.get(`/projects/${id}`) -export const getTasks = ({clientId, projectId, taskStatusId, filter}: {clientId?: string; projectId: string | null; taskStatusId?: string; filter?: string}) => +export const getTasks = ({ + clientId, + projectId, + taskStatusId, + filter +}: { + clientId?: string + projectId: string | null + taskStatusId?: string + filter?: string +}) => api.get(`/tasks?without_deleted_clients=true&sort=number|desc&per_page=6&page=1&client_status=uninvoiced&status=active`, { params: { project_tasks: projectId, @@ -41,7 +51,8 @@ export const putTask = ( ...(action && {[action]: true}) } }) -export const postTask = ({description, projectId}: {description: string; projectId: string}) => api.post(`/tasks`, {description, project_id: projectId}) +export const postTask = ({description, projectId}: {description: string; projectId: string}) => + api.post(`/tasks`, {description, project_id: projectId}) export const deleteTask = (id: string) => api.delete(`/tasks/${id}`) export const getTaskStatuses = () => api.get('/task_statuses') diff --git a/components/ProjectsActivator.vue b/components/ProjectsActivator.vue index 9712eca..1119764 100644 --- a/components/ProjectsActivator.vue +++ b/components/ProjectsActivator.vue @@ -19,43 +19,53 @@