Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
remove @ from folder name
Browse files Browse the repository at this point in the history
  • Loading branch information
HexaField committed Aug 17, 2024
1 parent bfbd238 commit b8fea9a
Show file tree
Hide file tree
Showing 40 changed files with 196 additions and 230 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default function ProjectTable(props: { search: string }) {
startIcon={<HiOutlineArrowPath />}
size="small"
className="mr-2 h-min whitespace-pre bg-theme-blue-secondary text-[#214AA6] disabled:opacity-50 dark:text-white"
disabled={project.name === '@etherealengine/default-project'}
disabled={project.name === 'etherealengine/default-project'}
onClick={() =>
PopoverState.showPopupover(
<AddEditProjectModal update={true} inputProject={project} onSubmit={handleProjectUpdate} />
Expand All @@ -135,7 +135,7 @@ export default function ProjectTable(props: { search: string }) {
startIcon={<GrGithub />}
size="small"
className="mr-2 h-min whitespace-pre bg-theme-blue-secondary text-[#214AA6] disabled:opacity-50 dark:text-white"
disabled={!project || !project.repositoryPath || project.name === '@etherealengine/default-project'}
disabled={!project || !project.repositoryPath || project.name === 'etherealengine/default-project'}
onClick={() => {
PopoverState.showPopupover(
<ConfirmDialog
Expand Down Expand Up @@ -202,7 +202,7 @@ export default function ProjectTable(props: { search: string }) {
startIcon={<HiOutlineTrash />}
size="small"
className="h-min whitespace-pre bg-theme-blue-secondary text-[#214AA6] disabled:opacity-50 dark:text-white"
disabled={project.name === '@etherealengine/default-project'}
disabled={project.name === 'etherealengine/default-project'}
onClick={() => {
PopoverState.showPopupover(
<ConfirmDialog
Expand Down Expand Up @@ -247,7 +247,7 @@ export default function ProjectTable(props: { search: string }) {
projectVersion: row.version,
enabled: (
<Toggle
disabled={row.name === '@etherealengine/default-project'}
disabled={row.name === 'etherealengine/default-project'}
value={row.enabled}
onChange={() => handleEnabledChange(row)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export default function UpdateEngineModal() {
</div>
<div className="grid gap-2">
{projectState.projects.value
.filter((project) => project.name !== '@etherealengine/default-project' && project.repositoryPath)
.filter((project) => project.name !== 'etherealengine/default-project' && project.repositoryPath)
.map((project) => (
<div key={project.id} className="border border-theme-primary bg-theme-surfaceInput px-3.5 py-5">
<Checkbox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { config } from '@etherealengine/common/src/config'
import { avatarPath, userAvatarPath, UserID } from '@etherealengine/common/src/schema.type.module'
import { useFind, useGet } from '@etherealengine/spatial/src/common/functions/FeathersHooks'

export const DEFAULT_PROFILE_IMG_PLACEHOLDER = `${config.client.fileServer}/projects/@etherealengine/default-project/assets/default-silhouette.svg`
export const DEFAULT_PROFILE_IMG_PLACEHOLDER = `${config.client.fileServer}/projects/etherealengine/default-project/assets/default-silhouette.svg`

export const useUserAvatarThumbnail = (userId?: UserID) => {
const userAvatar = useFind(userAvatarPath, {
Expand Down
64 changes: 32 additions & 32 deletions packages/common/tests/regex.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,23 +252,23 @@ describe('regex.test', () => {
it('should match static asset URLs', () => {
const positiveCases = [
{
url: 'https://example.com/projects/@etherealengine/default-project/assets/images/logo.png',
projectName: '@etherealengine/default-project',
url: 'https://example.com/projects/etherealengine/default-project/assets/images/logo.png',
projectName: 'etherealengine/default-project',
assetPath: 'assets/images/logo.png'
},
{
url: 'https://example.com/static-resources/@etherealengine/default-project/assets/images/logo.png',
projectName: '@etherealengine/default-project',
url: 'https://example.com/static-resources/etherealengine/default-project/assets/images/logo.png',
projectName: 'etherealengine/default-project',
assetPath: 'assets/images/logo.png'
},
{
url: 'https://example.com/projects/@etherealengine/default-project/assets/animations/emotes.glb',
projectName: '@etherealengine/default-project',
url: 'https://example.com/projects/etherealengine/default-project/assets/animations/emotes.glb',
projectName: 'etherealengine/default-project',
assetPath: 'assets/animations/emotes.glb'
},
{
url: 'https://example.com/projects/@etherealengine/default-project/assets/animations/locomotion.glb',
projectName: '@etherealengine/default-project',
url: 'https://example.com/projects/etherealengine/default-project/assets/animations/locomotion.glb',
projectName: 'etherealengine/default-project',
assetPath: 'assets/animations/locomotion.glb'
}
]
Expand All @@ -284,7 +284,7 @@ describe('regex.test', () => {
const negativeCases = [
'https://example.com/static-resources/',
'https://example.com/project/subdir/assets',
'https://example.com/@etherealengine/default-project/assets/animations/emotes.glb'
'https://example.com/etherealengine/default-project/assets/animations/emotes.glb'
]
negativeCases.forEach((url) => {
assert.doesNotMatch(url, STATIC_ASSET_REGEX, `Expected '${url}' to not match STATIC_ASSET_REGEX`)
Expand Down Expand Up @@ -581,9 +581,9 @@ describe('regex.test', () => {
describe('ASSETS_REGEX', () => {
it('should match assets URLs', () => {
const positiveCases = [
'https://example.com/projects/@etherealengine/default-project/assets/images/logo.png',
'https://example.com/projects/@etherealengine/default-project/assets/animations/emotes.glb',
'https://example.com/projects/@etherealengine/default-project/assets/animations/locomotion.glb'
'https://example.com/projects/etherealengine/default-project/assets/images/logo.png',
'https://example.com/projects/etherealengine/default-project/assets/animations/emotes.glb',
'https://example.com/projects/etherealengine/default-project/assets/animations/locomotion.glb'
]
positiveCases.forEach((url) => {
assert.match(url, ASSETS_REGEX, `Expected '${url}' to match ASSETS_REGEX`)
Expand All @@ -592,9 +592,9 @@ describe('regex.test', () => {

it('should not match non-assets URLs', () => {
const negativeCases = [
'https://example.com/projects/@etherealengine/default-project/scene.json',
'https://example.com/projects/@etherealengine/default-project/assets',
'https://example.com/@etherealengine/default-project/assets/animations/emotes.glb'
'https://example.com/projects/etherealengine/default-project/scene.json',
'https://example.com/projects/etherealengine/default-project/assets',
'https://example.com/etherealengine/default-project/assets/animations/emotes.glb'
]
negativeCases.forEach((url) => {
assert.doesNotMatch(url, ASSETS_REGEX, `Expected '${url}' to not match ASSETS_REGEX`)
Expand All @@ -605,9 +605,9 @@ describe('regex.test', () => {
describe('PROJECT_REGEX', () => {
it('should match valid project paths', () => {
const positiveCases = [
'projects/@etherealengine/project123',
'projects/@etherealengine/project-name',
'projects/@etherealengine/project_name',
'projects/etherealengine/project123',
'projects/etherealengine/project-name',
'projects/etherealengine/project_name',
'projects/project/123',
'projects/project/abc_def'
]
Expand All @@ -630,9 +630,9 @@ describe('regex.test', () => {
describe('PROJECT_PUBLIC_REGEX', () => {
it('should match valid project paths', () => {
const positiveCases = [
'projects/@etherealengine/project123/public/',
'projects/@etherealengine/project-name/public/',
'projects/@etherealengine/project_name/public/',
'projects/etherealengine/project123/public/',
'projects/etherealengine/project-name/public/',
'projects/etherealengine/project_name/public/',
'projects/project/123/public/',
'projects/project/abc_def/public/'
]
Expand All @@ -643,10 +643,10 @@ describe('regex.test', () => {

it('should not match invalid project paths', () => {
const negativeCases = [
'projects/@etherealengine/project123/public', // (missing trailing slash)
'projects/@etherealengine/project-name/private/', // (incorrect folder private instead of public)
'projects/@etherealengine/project$name/public/', // (contains invalid character $)
'projects/@etherealengine/project-@name/public/', // (contains invalid character @)
'projects/etherealengine/project123/public', // (missing trailing slash)
'projects/etherealengine/project-name/private/', // (incorrect folder private instead of public)
'projects/etherealengine/project$name/public/', // (contains invalid character $)
'projects/etherealengine/project-@name/public/', // (contains invalid character @)
'projects/' // (missing project name and /public/)
]
negativeCases.forEach((value) => {
Expand All @@ -658,9 +658,9 @@ describe('regex.test', () => {
describe('PROJECT_THUMBNAIL_REGEX', () => {
it('should match valid project thumbnail paths', () => {
const positiveCases = [
'projects/@etherealengine/project123/thumbnails/',
'projects/@etherealengine/project-name/thumbnails/',
'projects/@etherealengine/project_name/thumbnails/',
'projects/etherealengine/project123/thumbnails/',
'projects/etherealengine/project-name/thumbnails/',
'projects/etherealengine/project_name/thumbnails/',
'projects/project/123/thumbnails/',
'projects/project/abc_def/thumbnails/'
]
Expand All @@ -671,10 +671,10 @@ describe('regex.test', () => {

it('should not match invalid project thumbnail paths', () => {
const negativeCases = [
'projects/@etherealengine/project123/thumbnails', // (missing trailing slash)
'projects/@etherealengine/project-name/private/', // (incorrect folder private instead of public)
'projects/@etherealengine/project$name/thumbnails/', // (contains invalid character $)
'projects/@etherealengine/project-@name/thumbnails/', // (contains invalid character @)
'projects/etherealengine/project123/thumbnails', // (missing trailing slash)
'projects/etherealengine/project-name/private/', // (incorrect folder private instead of public)
'projects/etherealengine/project$name/thumbnails/', // (contains invalid character $)
'projects/etherealengine/project-@name/thumbnails/', // (contains invalid character @)
'projects/' // (missing project name and /thumbnail/)
]
negativeCases.forEach((value) => {
Expand Down
40 changes: 20 additions & 20 deletions packages/editor/src/components/prefabs/PrefabEditors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,106 +41,106 @@ export const PrefabShelfState = defineState({
[
{
name: '3D Model',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/3d-model.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/3d-model.prefab.gltf`,
category: 'Geo',
detail: 'Blank 3D model ready for your own assets'
},
{
name: 'Primitive Geometry',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/geo.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/geo.prefab.gltf`,
category: 'Geo'
},
{
name: 'Ground Plane',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/ground-plane.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/ground-plane.prefab.gltf`,
category: 'Geo'
},
{
name: 'Point Light',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/point-light.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/point-light.prefab.gltf`,
category: 'Lighting'
},
{
name: 'Spot Light',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/spot-light.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/spot-light.prefab.gltf`,
category: 'Lighting'
},
{
name: 'Directional Light',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/directional-light.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/directional-light.prefab.gltf`,
category: 'Lighting'
},
{
name: 'Ambient Light',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/ambient-light.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/ambient-light.prefab.gltf`,
category: 'Lighting'
},
{
name: 'Hemisphere Light',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/hemisphere-light.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/hemisphere-light.prefab.gltf`,
category: 'Lighting'
},
{
name: 'Box Collider',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/box-collider.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/box-collider.prefab.gltf`,
category: 'Collider',
detail: 'Simple box collider'
},
{
name: 'Sphere Collider',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/sphere-collider.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/sphere-collider.prefab.gltf`,
category: 'Collider',
detail: 'Simple sphere collider'
},
{
name: 'Cylinder Collider',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/cylinder-collider.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/cylinder-collider.prefab.gltf`,
category: 'Collider',
detail: 'Simple cylinder collider'
},
{
name: 'Text',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/text.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/text.prefab.gltf`,
category: 'Text'
},
{
name: 'Title',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/title.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/title.prefab.gltf`,
category: 'Text'
},
{
name: 'Body',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/body.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/body.prefab.gltf`,
category: 'Text'
},
{
name: 'Image',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/image.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/image.prefab.gltf`,
category: 'Image'
},
{
name: 'Video',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/video.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/video.prefab.gltf`,
category: 'Video'
},
{
name: 'Skybox',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/skybox.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/skybox.prefab.gltf`,
category: 'Lookdev'
},
{
name: 'Postprocessing',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/postprocessing.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/postprocessing.prefab.gltf`,
category: 'Lookdev'
},
{
name: 'Fog',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/fog.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/fog.prefab.gltf`,
category: 'Lookdev'
},
{
name: 'Camera',
url: `${config.client.fileServer}/projects/@etherealengine/default-project/assets/prefabs/camera.prefab.gltf`,
url: `${config.client.fileServer}/projects/etherealengine/default-project/assets/prefabs/camera.prefab.gltf`,
category: 'Camera'
}
] as PrefabShelfItem[],
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/components/projects/ProjectsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ const ProjectsPage = ({ studioPath }: { studioPath: string }) => {
</a>
<div className={styles.headerContainer} id={'headerContainer-' + project.name}>
<h3 className={styles.header}>{project.name.replace(/-/g, ' ')}</h3>
{project.name !== '@etherealengine/default-project' && (
{project.name !== 'etherealengine/default-project' && (
<IconButton
className={styles.iconButton}
disableRipple
Expand Down Expand Up @@ -534,7 +534,7 @@ const ProjectsPage = ({ studioPath }: { studioPath: string }) => {
</div>
) : null} */}
</div>
{activeProjectValue?.name !== '@etherealengine/default-project' && (
{activeProjectValue?.name !== 'etherealengine/default-project' && (
<Menu
anchorEl={projectAnchorEl.value}
open={Boolean(projectAnchorEl.value)}
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/functions/sceneFunctions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export const saveSceneGLTF = async (

export const createScene = async (
projectName: string,
templateURL = config.client.fileServer + '/projects/@etherealengine/default-project/public/scenes/default.gltf'
templateURL = config.client.fileServer + '/projects/etherealengine/default-project/public/scenes/default.gltf'
) => {
const sceneData = await Engine.instance.api.service(fileBrowserPath).patch(null, {
project: projectName,
Expand All @@ -168,7 +168,7 @@ export const createScene = async (
}

export const onNewScene = async (
templateURL = config.client.fileServer + '/projects/@etherealengine/default-project/public/scenes/default.gltf'
templateURL = config.client.fileServer + '/projects/etherealengine/default-project/public/scenes/default.gltf'
) => {
const { projectName } = getState(EditorState)
if (!projectName) return
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/src/avatar/animation/Util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const preloadedAnimations = {
emotes: 'emotes'
}

export const defaultAnimationPath = `${config.client.fileServer}/projects/@etherealengine/default-project/assets/animations/`
export const defaultAnimationPath = `${config.client.fileServer}/projects/etherealengine/default-project/assets/animations/`

export const matchesIkTarget = matches.some(
...Object.keys(ikTargets).map((k: keyof typeof ikTargets) => matches.literal(k))
Expand Down
Loading

0 comments on commit b8fea9a

Please sign in to comment.