From 3228a9c5203ba9be16e24b3ebf8858330ef8f5e6 Mon Sep 17 00:00:00 2001 From: web-admin Date: Wed, 8 Jul 2026 00:15:44 +0000 Subject: [PATCH] platform/lms-adm-fe release promotion snapshot --- .dockerignore | 5 +++++ .env.example | 6 +++--- src/layouts/InstructorLayout.tsx | 2 +- src/lib/auth.ts | 2 +- src/lib/chat.ts | 2 +- src/lib/courses.ts | 2 +- src/lib/curriculum.ts | 2 +- src/lib/groups.ts | 2 +- src/lib/platforms.ts | 2 +- src/lib/profileAvatar.ts | 2 +- src/lib/students.ts | 2 +- src/lib/submissions.ts | 2 +- src/pages/login/LoginPage.tsx | 2 +- 13 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..711bc33 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +node_modules +dist +.env +.env.* +*.tsbuildinfo diff --git a/.env.example b/.env.example index e1b3331..b8e67a2 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -VITE_API_BASE_URL=http://localhost:4400/api -VITE_LAUNCHER_API_BASE_URL=http://localhost:4200/api +VITE_API_BASE_URL=https://workspace.autonomystudio.net/lms-api/api +VITE_LAUNCHER_API_BASE_URL=https://portal-api.autonomystudio.net/api VITE_PUBLIC_BASE_PATH=/lms-adm/ -VITE_ADS_IDE_AUTH_URL=http://localhost:4100 +VITE_ATNMY_AUTH_URL=https://auth.autonomystudio.net diff --git a/src/layouts/InstructorLayout.tsx b/src/layouts/InstructorLayout.tsx index 23b449b..4306cba 100644 --- a/src/layouts/InstructorLayout.tsx +++ b/src/layouts/InstructorLayout.tsx @@ -66,7 +66,7 @@ type ChatNotificationPayload = { createdAt: string; }; -const NOTIFICATION_API_BASE_URL = (import.meta.env.VITE_LAUNCHER_API_BASE_URL ?? 'http://localhost:4200/api').replace(/\/+$/, ''); +const NOTIFICATION_API_BASE_URL = (import.meta.env.VITE_LAUNCHER_API_BASE_URL ?? 'https://portal-api.autonomystudio.net/api').replace(/\/+$/, ''); const NOTIFICATION_DROPDOWN_LIMIT = 10; const NOTIFICATION_DRAWER_PAGE_SIZE = 8; diff --git a/src/lib/auth.ts b/src/lib/auth.ts index fbc9319..78e95b0 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -1,6 +1,6 @@ import type { AuthAppRole, AuthSession } from '../types/auth'; -const AUTH_BASE_URL = (import.meta.env.VITE_ATNMY_AUTH_URL ?? import.meta.env.VITE_ADS_IDE_AUTH_URL ?? 'http://localhost:4100').replace(/\/+$/, ''); +const AUTH_BASE_URL = (import.meta.env.VITE_ATNMY_AUTH_URL ?? import.meta.env.VITE_ADS_IDE_AUTH_URL ?? 'https://auth.autonomystudio.net').replace(/\/+$/, ''); const ADMIN_SESSION_STORAGE_KEY = 'atnmy.lms.admin.auth.session'; const INSTRUCTOR_ROLES = new Set(['INSTRUCTOR', 'LMS_ADMIN']); diff --git a/src/lib/chat.ts b/src/lib/chat.ts index 26f0b0e..3d0a8a6 100644 --- a/src/lib/chat.ts +++ b/src/lib/chat.ts @@ -22,7 +22,7 @@ export type InstructorChatThread = { messages: InstructorChatMessage[]; }; -const CHAT_API_BASE_URL = (import.meta.env.VITE_API_BASE_URL ?? 'http://localhost:4400/api').replace(/\/+$/, ''); +const CHAT_API_BASE_URL = (import.meta.env.VITE_API_BASE_URL ?? 'https://workspace.autonomystudio.net/lms-api/api').replace(/\/+$/, ''); export const CHAT_SOCKET_BASE_URL = CHAT_API_BASE_URL.replace(/\/api$/, ''); type ChatThreadsPayload = { diff --git a/src/lib/courses.ts b/src/lib/courses.ts index dfe6a86..4642d42 100644 --- a/src/lib/courses.ts +++ b/src/lib/courses.ts @@ -12,7 +12,7 @@ export type InstructorCourse = { }; }; -const LMS_API_BASE_URL = (import.meta.env.VITE_API_BASE_URL ?? 'http://localhost:4400/api').replace(/\/+$/, ''); +const LMS_API_BASE_URL = (import.meta.env.VITE_API_BASE_URL ?? 'https://workspace.autonomystudio.net/lms-api/api').replace(/\/+$/, ''); export async function listInstructorCourses(accessToken: string): Promise<{ courses: InstructorCourse[] }> { const response = await fetch(`${LMS_API_BASE_URL}/instructor/courses`, { diff --git a/src/lib/curriculum.ts b/src/lib/curriculum.ts index 4cfe273..d2862a0 100644 --- a/src/lib/curriculum.ts +++ b/src/lib/curriculum.ts @@ -87,7 +87,7 @@ export type InstructorCurriculumResponse = { visualizationPlatforms?: CurriculumVisualizationPlatform[]; }; -const LMS_API_BASE_URL = (import.meta.env.VITE_API_BASE_URL ?? 'http://localhost:4400/api').replace(/\/+$/, ''); +const LMS_API_BASE_URL = (import.meta.env.VITE_API_BASE_URL ?? 'https://workspace.autonomystudio.net/lms-api/api').replace(/\/+$/, ''); export async function getInstructorCurriculum(accessToken: string, groupId?: string | null, courseId?: string | null): Promise { const params = new URLSearchParams(); diff --git a/src/lib/groups.ts b/src/lib/groups.ts index f9bb64f..32fa652 100644 --- a/src/lib/groups.ts +++ b/src/lib/groups.ts @@ -45,7 +45,7 @@ export type SaveInstructorGroupInput = { memberIds: string[]; }; -const LMS_API_BASE_URL = (import.meta.env.VITE_API_BASE_URL ?? 'http://localhost:4400/api').replace(/\/+$/, ''); +const LMS_API_BASE_URL = (import.meta.env.VITE_API_BASE_URL ?? 'https://workspace.autonomystudio.net/lms-api/api').replace(/\/+$/, ''); export async function listInstructorGroups(accessToken: string, courseId?: string | null): Promise { const params = new URLSearchParams(); diff --git a/src/lib/platforms.ts b/src/lib/platforms.ts index 3acd5b9..88762e6 100644 --- a/src/lib/platforms.ts +++ b/src/lib/platforms.ts @@ -99,7 +99,7 @@ export type InstructorPlatformsResponse = { agents: TeachingAgent[]; }; -const LMS_API_BASE_URL = (import.meta.env.VITE_API_BASE_URL ?? 'http://localhost:4400/api').replace(/\/+$/, ''); +const LMS_API_BASE_URL = (import.meta.env.VITE_API_BASE_URL ?? 'https://workspace.autonomystudio.net/lms-api/api').replace(/\/+$/, ''); export async function listInstructorPlatforms(accessToken: string): Promise { const response = await fetch(`${LMS_API_BASE_URL}/instructor/platforms`, { diff --git a/src/lib/profileAvatar.ts b/src/lib/profileAvatar.ts index dace347..b695bd6 100644 --- a/src/lib/profileAvatar.ts +++ b/src/lib/profileAvatar.ts @@ -1,4 +1,4 @@ -const PROFILE_API_BASE_URL = (import.meta.env.VITE_LAUNCHER_API_BASE_URL ?? 'http://localhost:4200/api').replace(/\/+$/, ''); +const PROFILE_API_BASE_URL = (import.meta.env.VITE_LAUNCHER_API_BASE_URL ?? 'https://portal-api.autonomystudio.net/api').replace(/\/+$/, ''); const AVATAR_MAX_BYTES = 80 * 1024; export async function fetchProfileAvatar(accessToken: string, version: number): Promise { diff --git a/src/lib/students.ts b/src/lib/students.ts index fcc01fe..bd6d172 100644 --- a/src/lib/students.ts +++ b/src/lib/students.ts @@ -43,7 +43,7 @@ export type CreateInstructorStudentInput = { groupId?: string | null; }; -const LMS_API_BASE_URL = (import.meta.env.VITE_API_BASE_URL ?? 'http://localhost:4400/api').replace(/\/+$/, ''); +const LMS_API_BASE_URL = (import.meta.env.VITE_API_BASE_URL ?? 'https://workspace.autonomystudio.net/lms-api/api').replace(/\/+$/, ''); export async function listInstructorStudents(accessToken: string, courseId?: string | null): Promise { const query = courseId ? `?courseId=${encodeURIComponent(courseId)}` : ''; diff --git a/src/lib/submissions.ts b/src/lib/submissions.ts index ad6bfbb..b474796 100644 --- a/src/lib/submissions.ts +++ b/src/lib/submissions.ts @@ -90,7 +90,7 @@ export type InstructorSubmissionsResponse = { items: InstructorSubmissionItem[]; }; -const LMS_API_BASE_URL = (import.meta.env.VITE_API_BASE_URL ?? 'http://localhost:4400/api').replace(/\/+$/, ''); +const LMS_API_BASE_URL = (import.meta.env.VITE_API_BASE_URL ?? 'https://workspace.autonomystudio.net/lms-api/api').replace(/\/+$/, ''); export async function listInstructorSubmissions(accessToken: string): Promise { const response = await fetch(`${LMS_API_BASE_URL}/instructor/submissions`, { diff --git a/src/pages/login/LoginPage.tsx b/src/pages/login/LoginPage.tsx index bfbb9d3..0658f0e 100644 --- a/src/pages/login/LoginPage.tsx +++ b/src/pages/login/LoginPage.tsx @@ -10,7 +10,7 @@ type LoginPageProps = { const REMEMBERED_EMAIL_STORAGE_KEY = 'atnmy.lms.admin.login.rememberedEmail'; const DEFAULT_EMAIL = ''; -const DEFAULT_PASSWORD = 'qwer1234'; +const DEFAULT_PASSWORD = ''; export function LoginPage({ onLogin }: LoginPageProps) { const rememberedEmail = window.localStorage.getItem(REMEMBERED_EMAIL_STORAGE_KEY);