platform/lms-adm-fe release promotion snapshot

This commit is contained in:
2026-07-08 00:15:44 +00:00
parent 7370790aa0
commit 3228a9c520
13 changed files with 19 additions and 14 deletions
+5
View File
@@ -0,0 +1,5 @@
node_modules
dist
.env
.env.*
*.tsbuildinfo
+3 -3
View File
@@ -1,4 +1,4 @@
VITE_API_BASE_URL=http://localhost:4400/api VITE_API_BASE_URL=https://workspace.autonomystudio.net/lms-api/api
VITE_LAUNCHER_API_BASE_URL=http://localhost:4200/api VITE_LAUNCHER_API_BASE_URL=https://portal-api.autonomystudio.net/api
VITE_PUBLIC_BASE_PATH=/lms-adm/ VITE_PUBLIC_BASE_PATH=/lms-adm/
VITE_ADS_IDE_AUTH_URL=http://localhost:4100 VITE_ATNMY_AUTH_URL=https://auth.autonomystudio.net
+1 -1
View File
@@ -66,7 +66,7 @@ type ChatNotificationPayload = {
createdAt: string; 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_DROPDOWN_LIMIT = 10;
const NOTIFICATION_DRAWER_PAGE_SIZE = 8; const NOTIFICATION_DRAWER_PAGE_SIZE = 8;
+1 -1
View File
@@ -1,6 +1,6 @@
import type { AuthAppRole, AuthSession } from '../types/auth'; 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 ADMIN_SESSION_STORAGE_KEY = 'atnmy.lms.admin.auth.session';
const INSTRUCTOR_ROLES = new Set(['INSTRUCTOR', 'LMS_ADMIN']); const INSTRUCTOR_ROLES = new Set(['INSTRUCTOR', 'LMS_ADMIN']);
+1 -1
View File
@@ -22,7 +22,7 @@ export type InstructorChatThread = {
messages: InstructorChatMessage[]; 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$/, ''); export const CHAT_SOCKET_BASE_URL = CHAT_API_BASE_URL.replace(/\/api$/, '');
type ChatThreadsPayload = { type ChatThreadsPayload = {
+1 -1
View File
@@ -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[] }> { export async function listInstructorCourses(accessToken: string): Promise<{ courses: InstructorCourse[] }> {
const response = await fetch(`${LMS_API_BASE_URL}/instructor/courses`, { const response = await fetch(`${LMS_API_BASE_URL}/instructor/courses`, {
+1 -1
View File
@@ -87,7 +87,7 @@ export type InstructorCurriculumResponse = {
visualizationPlatforms?: CurriculumVisualizationPlatform[]; 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<InstructorCurriculumResponse> { export async function getInstructorCurriculum(accessToken: string, groupId?: string | null, courseId?: string | null): Promise<InstructorCurriculumResponse> {
const params = new URLSearchParams(); const params = new URLSearchParams();
+1 -1
View File
@@ -45,7 +45,7 @@ export type SaveInstructorGroupInput = {
memberIds: string[]; 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<InstructorGroupsResponse> { export async function listInstructorGroups(accessToken: string, courseId?: string | null): Promise<InstructorGroupsResponse> {
const params = new URLSearchParams(); const params = new URLSearchParams();
+1 -1
View File
@@ -99,7 +99,7 @@ export type InstructorPlatformsResponse = {
agents: TeachingAgent[]; 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<InstructorPlatformsResponse> { export async function listInstructorPlatforms(accessToken: string): Promise<InstructorPlatformsResponse> {
const response = await fetch(`${LMS_API_BASE_URL}/instructor/platforms`, { const response = await fetch(`${LMS_API_BASE_URL}/instructor/platforms`, {
+1 -1
View File
@@ -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; const AVATAR_MAX_BYTES = 80 * 1024;
export async function fetchProfileAvatar(accessToken: string, version: number): Promise<Blob | null> { export async function fetchProfileAvatar(accessToken: string, version: number): Promise<Blob | null> {
+1 -1
View File
@@ -43,7 +43,7 @@ export type CreateInstructorStudentInput = {
groupId?: string | null; 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<InstructorStudentsResponse> { export async function listInstructorStudents(accessToken: string, courseId?: string | null): Promise<InstructorStudentsResponse> {
const query = courseId ? `?courseId=${encodeURIComponent(courseId)}` : ''; const query = courseId ? `?courseId=${encodeURIComponent(courseId)}` : '';
+1 -1
View File
@@ -90,7 +90,7 @@ export type InstructorSubmissionsResponse = {
items: InstructorSubmissionItem[]; 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<InstructorSubmissionsResponse> { export async function listInstructorSubmissions(accessToken: string): Promise<InstructorSubmissionsResponse> {
const response = await fetch(`${LMS_API_BASE_URL}/instructor/submissions`, { const response = await fetch(`${LMS_API_BASE_URL}/instructor/submissions`, {
+1 -1
View File
@@ -10,7 +10,7 @@ type LoginPageProps = {
const REMEMBERED_EMAIL_STORAGE_KEY = 'atnmy.lms.admin.login.rememberedEmail'; const REMEMBERED_EMAIL_STORAGE_KEY = 'atnmy.lms.admin.login.rememberedEmail';
const DEFAULT_EMAIL = ''; const DEFAULT_EMAIL = '';
const DEFAULT_PASSWORD = 'qwer1234'; const DEFAULT_PASSWORD = '';
export function LoginPage({ onLogin }: LoginPageProps) { export function LoginPage({ onLogin }: LoginPageProps) {
const rememberedEmail = window.localStorage.getItem(REMEMBERED_EMAIL_STORAGE_KEY); const rememberedEmail = window.localStorage.getItem(REMEMBERED_EMAIL_STORAGE_KEY);