Skip to content
Open
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: 3 additions & 3 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
REACT_APP_PYLON_URL=http://localhost:3000
REACT_APP_INVITATION_REDEEM_URL=http://localhost:3000/redeem?callback=http://localhost:3001/callback
REACT_APP_LOGIN_URL=//localhost:3000/login?callback=http://localhost:3001/callback
VITE_PYLON_URL=http://localhost:3000
VITE_INVITATION_REDEEM_URL=http://localhost:3000/redeem?callback=http://localhost:3001/callback
VITE_LOGIN_URL=//localhost:3000/login?callback=http://localhost:3001/callback
6 changes: 3 additions & 3 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
REACT_APP_PYLON_URL=https://pylon.suncoast.io
REACT_APP_INVITATION_REDEEM_URL=https://pylon.suncoast.io/redeem?callback=https://nexus.suncoast.io/callback
REACT_APP_LOGIN_URL=https://pylon.suncoast.io/login?callback=https://nexus.suncoast.io/callback
VITE_PYLON_URL=https://pylon.suncoast.io
VITE_INVITATION_REDEEM_URL=https://pylon.suncoast.io/redeem?callback=https://nexus.suncoast.io/callback
VITE_LOGIN_URL=https://pylon.suncoast.io/login?callback=https://nexus.suncoast.io/callback
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/node_modules
/build
/dist
yarn-error.log
.eslintcache
.eslintcache
21 changes: 21 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Nexus</title>
<link
rel="stylesheet"
href="https://pro.fontawesome.com/releases/v5.5.0/css/all.css"
integrity="sha384-j8y0ITrvFafF4EkV1mPW0BKm6dp3c+J9Fky22Man50Ofxo2wNe5pT1oZejDH9/Dt"
crossorigin="anonymous"
/>
</head>
<body>
<div id="root"></div>
<script>
window.global = window
</script>
<script type="module" src="/src/index.jsx"></script>
</body>
</html>
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"private": true,
"dependencies": {
"@craco/craco": "^5.1.0",
"@github-docs/render-content": "^2.3.0",
"@sentry/browser": "^5.2.1",
"@vitejs/plugin-react-refresh": "^1.3.5",
"auth0-js": "^9.8.0",
"bulma": "^0.9.0",
"bulma-extensions": "^6.2.5",
"classnames": "^2.2.6",
"github-markdown-render": "^2.1.0",
"html2canvas": "^1.0.0-rc.1",
"isomorphic-fetch": "^2.2.1",
"moment": "^2.24.0",
Expand All @@ -17,22 +17,20 @@
"react-copy-to-clipboard": "^5.0.1",
"react-dom": "^17.0.1",
"react-router-dom": "^4.3.1",
"react-scripts": "^4.0.1",
"react-select": "^2.4.3",
"sass": "^1.32.0",
"spraypaint": "^0.10.0",
"video-react": "^0.14.1"
"video-react": "^0.14.1",
"vite": "^2.4.3"
},
"devDependencies": {
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-prettier": "^3.3.1",
"prettier": "^2.2.1"
},
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
"eject": "craco eject"
"start": "vite",
"build": "vite build --outDir build"
},
"eslintConfig": {
"extends": [
Expand Down
12 changes: 0 additions & 12 deletions public/index.html

This file was deleted.

2 changes: 1 addition & 1 deletion src/Auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Auth {
userProfile

login = () => {
window.location = process.env.REACT_APP_LOGIN_URL
window.location = import.meta.env.VITE_LOGIN_URL
}

get token() {
Expand Down
10 changes: 5 additions & 5 deletions src/components/App.js → src/components/App.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { useState, useEffect } from 'react'
import { Router } from 'react-router-dom'

import auth from '@/Auth'
import history from '@/history'
import { Layout } from '@/components/Layout'
import useProfile from '@/hooks/useProfile'
import { ErrorsContext } from '@/components/Errors'
import auth from '/src/Auth'
import history from '/src/history'
import { Layout } from '/src/components/Layout'
import useProfile from '/src//hooks/useProfile'
import { ErrorsContext } from '/src/components/Errors'

export function App() {
const { profile, forceUpdateProfile } = useProfile()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react'
import { Link, NavLink } from 'react-router-dom'
import icon from '@/images/icon.svg'
import icon from '/src//images/icon.svg'
import cx from 'classnames'
import { PersonImage } from './person/PersonImage'

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Sentry from '@sentry/browser'
import * as Sentry from '/src/sentry/browser'

export class ErrorBoundary extends Component {
constructor(props) {
Expand Down
File renamed without changes.
16 changes: 9 additions & 7 deletions src/components/Routes.js → src/components/Routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ import { CohortsPage } from '../pages/cohorts/CohortsPage'
import { EditCohortPage } from '../pages/cohorts/EditCohortPage'
import { EditHomeworksPage } from '../pages/homeworks/EditHomeworksPage'
import { EditProfilePage } from '../pages/profile/EditProfile'
import { GradebookPage } from '@/pages/gradebook/GradebookPage'
import { GradebookPage } from '/src//pages/gradebook/GradebookPage'
import { HomePage } from '../pages/home/HomePage'
import { NewCohortPage } from '../pages/cohorts/NewCohortPage'
import { PeoplePage } from '../pages/people/PeoplePage'
import { ProfileLoader } from './utils/ProfileLoader'
import { StudentGradebookPage } from '@/pages/gradebook/StudentGradebookPage'
import { StudentGradebookPage } from '/src//pages/gradebook/StudentGradebookPage'
import { StudentAssignmentPage } from '../pages/assignments/StudentAssignmentPage'
import { AdminShowGradeQueuesPage } from '@/pages/gradebook/AdminShowGradeQueuesPage'
import { LectureVideosPage } from '@/pages/lecturevideos/LectureVideosPage'
import { LectureVideoPage } from '@/pages/lecturevideos/LectureVideoPage'
import { ShowHomeworkPage } from '@/pages/homeworks/ShowHomeworkPage'
import { AdminShowGradeQueuesPage } from '/src//pages/gradebook/AdminShowGradeQueuesPage'
import { LectureVideosPage } from '/src//pages/lecturevideos/LectureVideosPage'
import { LectureVideoPage } from '/src//pages/lecturevideos/LectureVideoPage'
import { ShowHomeworkPage } from '/src//pages/homeworks/ShowHomeworkPage'
import { StudentAttendancePage } from '../pages/attendance/StudentAttendancePage'
import { EditAttendancePage } from '../pages/attendance/EditAttendancePage'
import { AdminShowAttendancesPage } from '../pages/attendance/AdminShowAttendancesPage'
Expand Down Expand Up @@ -296,7 +296,9 @@ export function PublicRoutes({ profile, auth }) {
// This might be a user re-attempting to use the same invite code.
window.location = `/`
} else {
window.location = `${process.env.REACT_APP_INVITATION_REDEEM_URL}&invitation_code=${props.match.params.invitation_code}`
window.location = `${import.meta.env.VITE_INVITATION_REDEEM_URL}&invitation_code=${
props.match.params.invitation_code
}`
}

return <Callback {...props} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { Component } from 'react'
import { Link } from 'react-router-dom'
import icon from '@/images/icon.svg'
import icon from '/src//images/icon.svg'
import cx from 'classnames'
import history from '@/history'
import history from '/src//history'

export class UnauthenticatedNavBar extends Component {
state = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react'
import { PersonImage } from '@/components/person/PersonImage'
import { PersonImage } from '/src//components/person/PersonImage'
import { GithubTurnIn } from './GithubTurnIn'
import { GistTurnIn } from './GistTurnIn'
import { URLTurnIn } from './URLTurnIn'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React, { useState, useEffect } from 'react'
import { LoadingIndicator } from '@/components/utils/LoadingIndicator'
import auth from '@/Auth'
import { LoadingIndicator } from '/src//components/utils/LoadingIndicator'
import auth from '/src//Auth'

export function GistTurnIn({ assignmentEventDetails, setAssignmentEventDetails }) {
const [gists, setGists] = useState([])

useEffect(() => {
async function fetchGists() {
const response = await fetch(`${process.env.REACT_APP_PYLON_URL}/api/v1/gists`, {
const response = await fetch(`${import.meta.env.VITE_PYLON_URL}/api/v1/gists`, {
headers: { Authorization: `Token token="${auth.token}"` },
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react'
import { LoadingIndicator } from '@/components/utils/LoadingIndicator'
import auth from '@/Auth'
import { LoadingIndicator } from '/src//components/utils/LoadingIndicator'
import auth from '/src//Auth'
import moment from 'moment'

export function GithubTurnIn({ assignmentEventDetails, setAssignmentEventDetails, setTurnInValid }) {
Expand Down Expand Up @@ -52,7 +52,7 @@ export function GithubTurnIn({ assignmentEventDetails, setAssignmentEventDetails

useEffect(() => {
async function fetchRepos() {
const response = await fetch(`${process.env.REACT_APP_PYLON_URL}/api/v1/repositories`, {
const response = await fetch(`${import.meta.env.VITE_PYLON_URL}/api/v1/repositories`, {
headers: { Authorization: `Token token="${auth.token}"` },
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react'
import { Assignment } from '@/components/models'
import { LoadingButton } from '@/components/utils/LoadingButton'
import { Assignment } from '/src//components/models'
import { LoadingButton } from '/src//components/utils/LoadingButton'

export function GradeAssignment({ assignment, createAssignmentEvent }) {
const placeholder = 'https://bulma.io/images/placeholders/128x128.png'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react'
import { Assignment } from '@/components/models'
import { Assignment } from '/src//components/models'
import { MarkDownDiv } from '../utils/MarkDownDiv'

export function GradedAssignment({ assignmentEvent }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react'
import statuses from './statuses'
import { ModalForm } from '@/components/utils/ModalForm'
import { ModalForm } from '/src//components/utils/ModalForm'
import { StatusButtons } from './StatusButtons'

export function AttendanceModal({ selectedAttendanceRecord, onClose }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react'
import BigCalendar from 'react-big-calendar'
import moment from 'moment'

import { Cohort, CohortDate } from '@/components/models'
import useModelData from '@/hooks/useModelData'
import { Cohort, CohortDate } from '/src//components/models'
import useModelData from '/src//hooks/useModelData'

export function EditCohortCalendar({ cohort_id }) {
const { loading, data: cohort, reload: reloadCohort } = useModelData(() =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react'
import Select from 'react-select'

import { Program } from '@/components/models'
import useModelData from '@/hooks/useModelData'
import { InputField } from '@/components/utils/Fields'
import { Program } from '/src//components/models'
import useModelData from '/src//hooks/useModelData'
import { InputField } from '/src//components/utils/Fields'

function ProgramDropDown({ cohort }) {
const { data: programs } = useModelData(() => Program.all(), [])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react'
import cx from 'classnames'

import { StudentEnrollment } from '@/components/models'
import useModelData from '@/hooks/useModelData'
import { DeleteButton } from '@/components//utils/Buttons'
import { PersonDropDown } from '@/components/person/PersonDropDown'
import { PersonComponent } from '@/components/person/PersonComponent'
import { LoadingIndicator } from '@/components/utils/LoadingIndicator'
import { StudentEnrollment } from '/src//components/models'
import useModelData from '/src//hooks/useModelData'
import { DeleteButton } from '/src//components//utils/Buttons'
import { PersonDropDown } from '/src//components/person/PersonDropDown'
import { PersonComponent } from '/src//components/person/PersonComponent'
import { LoadingIndicator } from '/src//components/utils/LoadingIndicator'
import { InvitationCode } from './InvitationCode'

export function EditEnrollment({ cohort }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react'
import { Link } from 'react-router-dom'
import cx from 'classnames'
import { PersonComponent } from '@/components/person/PersonComponent'
import { InactivePerson } from '@/components/person/InactivePerson'
import { PersonComponent } from '/src//components/person/PersonComponent'
import { InactivePerson } from '/src//components/person/InactivePerson'
import { HomeworkTableData } from './HomeworkTableData'

function EnrollmentRow({ enrollment, assignmentLookup, homeworks, countOfHomeworksNeededForCompletion }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useState } from 'react'
import { Link } from 'react-router-dom'

import useModelData from '@/hooks/useModelData'
import { PersonComponent } from '@/components/person/PersonComponent'
import { LoadingIndicator } from '@/components/utils/LoadingIndicator'
import { Cohort, Assignment } from '@/components/models'
import useModelData from '/src//hooks/useModelData'
import { PersonComponent } from '/src//components/person/PersonComponent'
import { LoadingIndicator } from '/src//components/utils/LoadingIndicator'
import { Cohort, Assignment } from '/src//components/models'

export function GradeQueue({ cohort_id }) {
const { loading, data: cohort, reload } = useModelData(() =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useState, useEffect } from 'react'
import moment from 'moment'

import { formToObject } from '@/utils/formToObject'
import useModelData from '@/hooks/useModelData'
import { formToObject } from '/src//utils/formToObject'
import useModelData from '/src//hooks/useModelData'
import HandbookAssignment from '../models/HandbookAssignment'

export function EditHomework({ cohort, reloadCohort, homework, setHomework }) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/lecturevideos/recordLectureVideoPlayback.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import LectureVideoPlayback from '@/components/models/LectureVideoPlayback'
import LectureVideoPlayback from '/src//components/models/LectureVideoPlayback'

export function recordLectureVideoPlayback(lectureVideoId) {
const lectureVideoPlayback = new LectureVideoPlayback({ lectureVideoId })
Expand Down
3 changes: 2 additions & 1 deletion src/components/models/ApplicationRecord.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { SpraypaintBase } from 'spraypaint'

console.log(import.meta.env.VITE_PYLON_URL)
const ApplicationRecord = SpraypaintBase.extend({
static: {
baseUrl: process.env.REACT_APP_PYLON_URL,
baseUrl: import.meta.env.VITE_PYLON_URL,
apiNamespace: '/api/v1',
},
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react'
import cx from 'classnames'

import { Person } from '@/components/models'
import { InputField } from '@/components//utils/Fields'
import { formToObject } from '@/utils/formToObject'
import { Person } from '/src//components/models'
import { InputField } from '/src//components//utils/Fields'
import { formToObject } from '/src//utils/formToObject'

export function NewPersonModal({ isActive, onSave, onClose }) {
const person = new Person()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useState, useEffect } from 'react'
import Select from 'react-select'

import useModelData from '@/hooks/useModelData'
import Person from '@/components//models/Person'
import useModelData from '/src//hooks/useModelData'
import Person from '/src//components//models/Person'

export function PersonDropDown({ onSelect, placeholder, isMulti, isSearchable, excludedIDs = [] }) {
// eslint-disable-next-line
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { Assignment } from '@/components/models'
import { Assignment } from '/src//components/models'

export function AssignmentCard({ assignment }) {
const scoreInfo = Assignment.scoreInfo(assignment.score)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import logo from '@/images/logo.png'
import logo from '/src//images/logo.png'
import { AssignmentCard } from './AssignmentCard'

export function Editing({ showInput, shortName, fullName, assignments, state, dispatch, title }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { StudentProgressReport, Assignment } from '@/components/models'
import { StudentProgressReport, Assignment } from '/src//components/models'
import { GenerateStudentProgressReport } from './GenerateStudentProgressReport'

export function Editor({ progressReport, onSaveStudentReport, index, onSkip }) {
Expand Down
Loading