Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .env.vitest
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
VITE_CDN_URL=http://cdn.test.profcomff.local
BASE_URL=http://app.test.profcomff.local
VITE_API_URL=http://api.test.profcomff.local
VITE_FEEDBACK_URL=http://forms.yandex.ru/u/635d013b068ff0587320bfc9/
VITE_AUTH_TELEGRAM_BOT=com_profcomff_app_test_bot
VITE_AUTH_REDIRECT_URL=http://app.test.profcomff.local
14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build:development": "vite build --mode development",
"build:testing": "vite build --mode testing",
"preview": "vite preview --port 443",
"test": "vitest",
"test": "vitest --mode vitest",
"lint": "eslint --ext .ts,.vue .",
"lint:fix": "eslint --ext .ts,.vue . --fix",
"prettier": "prettier . --check",
Expand All @@ -20,10 +20,11 @@
"check": "vue-tsc && pnpm run lint && pnpm run prettier && pnpm run stylelint"
},
"dependencies": {
"@profcomff/api-uilib": "2024.7.2-5.2",
"@profcomff/api-uilib": "2024.7.28",
"axios": "^1.7.2",
"markdown-it": "^14.1.0",
"pinia": "^2.1.7",
"openapi-fetch": "^0.10.2",
"pinia": "^2.2.0",
"query-string": "^9.1.0",
"ua-parser-js": "^1.0.38",
"vue": "^3.4.34",
Expand All @@ -32,16 +33,19 @@
},
"devDependencies": {
"@types/markdown-it": "^14.1.2",
"@types/node": "^20.14.12",
"@types/node": "^20.14.13",
"@types/ua-parser-js": "^0.7.39",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"@vitejs/plugin-vue": "^5.1.0",
"@vitejs/plugin-vue": "^5.1.1",
"@vue/eslint-config-typescript": "^12.0.0",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-vue": "^9.27.0",
"jsdom": "^24.1.1",
"msw": "^2.3.4",
"postcss": "^8.4.40",
"postcss-html": "^1.7.0",
"postcss-preset-env": "^9.6.0",
Expand Down
1,244 changes: 912 additions & 332 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/api/BaseApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import axios, { AxiosResponse } from 'axios';
import queryString from 'query-string';
import { createClient } from '@profcomff/api-uilib';

const apiClient = createClient(import.meta.env.VITE_API_URL);
export const apiClient = createClient(import.meta.env.VITE_API_URL);
export default apiClient;

export interface DefaultResponse {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/api/controllers/auth/AuthApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
userSessionApi,
} from '@/api/auth';
import router from '@/router';
import { scopename } from '@/models/ScopeName';
import { scopename } from '@/api/auth/ScopeName';
import { useProfileStore } from '@/store/profile';
import { LocalStorage, LocalStorageItem } from '@/models/LocalStorage';

Expand Down
1 change: 1 addition & 0 deletions src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './controllers';
export { apiClient } from './BaseApi';
7 changes: 7 additions & 0 deletions src/models/LocalStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ export enum LocalStorageItem {
SuperappAuth = 'superapp-auth',
}

export interface ServiceAuthInfo {
service_id: number;
current_scopes?: string[];
token?: string;
expires?: string;
}

export class LocalStorage {
static set<T>(name: LocalStorageItem, body: T) {
if (typeof body === 'object') {
Expand Down
6 changes: 0 additions & 6 deletions src/models/SuperappData.ts

This file was deleted.

Loading