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

Commit

Permalink
Merge branch 'dev' into michael/IR-2665-triggers
Browse files Browse the repository at this point in the history
* dev: (21 commits)
  show grid lines by default in studio (#10500)
  Fix xrui pointer input & improved follow camera  (#10471)
  feat: zendesk widget in viewer app & custom button (#10494)
  fix the download project button (#10499)
  studio: titles of some elements on components are not properly displayed (camelcased or lowercased) (#10491)
  fix slider ui (#10490)
  add point light name (#10495)
  upload from assets panel (#10487)
  IR-2838-Studio-Click-Selection-Regression (#10479)
  Add better error to file-browser patch (#10489)
  Fixed issue with HLS streams not playing (#10485)
  IR-2810: Redesign Compress Menu (#10469)
  studio: fix context menu (#10475)
  fix(IR-2799): fix feature flags state (#10453)
  fix WebXR (#10484)
  IR-2727: Zendesk authentication (#10452)
  Assets must populate from all projects you have perms for (#10409)
  image convert modal (#10466)
  clean out userdata after initializing ecs data from gltfs (#10470)
  Material IO Fixes (#10480)
  ...

# Conflicts:
#	packages/common/src/utils/getAllStringValueNodes.ts
#	packages/engine/src/avatar/systems/AvatarCameraInputSystem.ts
#	packages/spatial/src/camera/components/FollowCameraComponent.ts
  • Loading branch information
MbfloydIR committed Jul 2, 2024
2 parents 777e93c + 3a056b7 commit 86cf49b
Show file tree
Hide file tree
Showing 259 changed files with 3,574 additions and 1,955 deletions.
6 changes: 6 additions & 0 deletions .env.local.default
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ VITE_APP_HOST=localhost
VITE_APP_PORT=3000
VITE_ZENDESK_ENABLED=false
VITE_ZENDESK_KEY=
VITE_ZENDESK_AUTHENTICATION_ENABLED=false
# Use following value for minio s3 provider
#VITE_FILE_SERVER=https://localhost:9000/etherealengine-static-resources
#VITE_TEST_FILE_SERVER=https://localhost:9000/etherealengine-static-resources-test
Expand Down Expand Up @@ -220,3 +221,8 @@ OPENSEARCH_HOST=http://localhost:9200

# Switch to `true` to enable local file system operations
FS_PROJECT_SYNC_ENABLED=true

# Zendesk key for user authentication
ZENDESK_KEY_NAME=
ZENDESK_SECRET=
ZENDESK_KID=
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ ARG VITE_AVATURN_URL
ARG VITE_AVATURN_API
ARG VITE_ZENDESK_ENABLED
ARG VITE_ZENDESK_KEY
ARG VITE_ZENDESK_AUTHENTICATION_ENABLED

ENV MYSQL_HOST=$MYSQL_HOST
ENV MYSQL_PORT=$MYSQL_PORT
ENV MYSQL_USER=$MYSQL_USER
Expand All @@ -92,6 +94,7 @@ ENV VITE_AVATURN_URL=$VITE_AVATURN_URL
ENV VITE_AVATURN_API=$VITE_AVATURN_API
ENV VITE_ZENDESK_ENABLED=$VITE_ZENDESK_ENABLED
ENV VITE_ZENDESK_KEY=$VITE_ZENDESK_KEY
ENV VITE_ZENDESK_AUTHENTICATION_ENABLED=$VITE_ZENDESK_AUTHENTICATION_ENABLED

ARG CACHE_DATE
RUN npx cross-env ts-node --swc scripts/check-db-exists.ts
Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/api/Dockerfile-api-client
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ ARG VITE_AVATURN_URL
ARG VITE_AVATURN_API
ARG VITE_ZENDESK_ENABLED
ARG VITE_ZENDESK_KEY
ARG VITE_ZENDESK_AUTHENTICATION_ENABLED
ENV KUBERNETES=$KUBERNETES
ENV AUTH_SECRET=$AUTH_SECRET
ENV STORAGE_CLOUDFRONT_DOMAIN=$STORAGE_CLOUDFRONT_DOMAIN
Expand Down Expand Up @@ -114,6 +115,7 @@ ENV VITE_AVATURN_URL=$VITE_AVATURN_URL
ENV VITE_AVATURN_API=$VITE_AVATURN_API
ENV VITE_ZENDESK_ENABLED=$VITE_ZENDESK_ENABLED
ENV VITE_ZENDESK_KEY=$VITE_ZENDESK_KEY
ENV VITE_ZENDESK_AUTHENTICATION_ENABLED=$VITE_ZENDESK_AUTHENTICATION_ENABLED

RUN npm run build-client

Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/client/Dockerfile-client
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ ARG VITE_AVATURN_API
ARG AUTH_SECRET
ARG VITE_ZENDESK_ENABLED
ARG VITE_ZENDESK_KEY
ARG VITE_ZENDESK_AUTHENTICATION_ENABLED
ENV KUBERNETES=$KUBERNETES
ENV AUTH_SECRET=$AUTH_SECRET
ENV STORAGE_CLOUDFRONT_DOMAIN=$STORAGE_CLOUDFRONT_DOMAIN
Expand Down Expand Up @@ -92,6 +93,7 @@ ENV VITE_AVATURN_URL=$VITE_AVATURN_URL
ENV VITE_AVATURN_API=$VITE_AVATURN_API
ENV VITE_ZENDESK_ENABLED=$VITE_ZENDESK_ENABLED
ENV VITE_ZENDESK_KEY=$VITE_ZENDESK_KEY
ENV VITE_ZENDESK_AUTHENTICATION_ENABLED=$VITE_ZENDESK_AUTHENTICATION_ENABLED

RUN npm run build-client

Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/client/Dockerfile-client-serve-static
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ ARG VITE_AVATURN_URL
ARG VITE_AVATURN_API
ARG VITE_ZENDESK_ENABLED
ARG VITE_ZENDESK_KEY
ARG VITE_ZENDESK_AUTHENTICATION_ENABLED
ARG AUTH_SECRET
ENV KUBERNETES=$KUBERNETES
ENV AUTH_SECRET=$AUTH_SECRET
Expand Down Expand Up @@ -93,6 +94,7 @@ ENV VITE_AVATURN_URL=$VITE_AVATURN_URL
ENV VITE_AVATURN_API=$VITE_AVATURN_API
ENV VITE_ZENDESK_ENABLED=$VITE_ZENDESK_ENABLED
ENV VITE_ZENDESK_KEY=$VITE_ZENDESK_KEY
ENV VITE_ZENDESK_AUTHENTICATION_ENABLED=$VITE_ZENDESK_AUTHENTICATION_ENABLED

RUN npm run build-client

Expand Down
8 changes: 7 additions & 1 deletion packages/client-core/i18n/en/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,13 @@
"processInterval": "Process Interval"
},

"plugins": "Plugins"
"plugins": "Plugins",
"zendesk": {
"header": "Zendesk",
"subtitle": "Edit Zendesk Settings"
},
"keyName": "key Name",
"kid": "Key Id"
},
"avatar": {
"columns": {
Expand Down
67 changes: 41 additions & 26 deletions packages/client-core/i18n/en/editor.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"lbl-return": "Return",
"loadingScenes": "Loading Scenes",
"loadingScenesWithProgress": "Scene Loading... {{progress}}% ({{assetsLeft}} assets left)",
"help": "Help",
"menubar": {
"newScene": "New Scene",
"saveScene": "Save Scene",
Expand Down Expand Up @@ -469,14 +470,18 @@
"lbl-interactionText": "Interaction Text",
"lbl-interactionType": "Interaction Type",
"transform": {
"lodLevels": "LOD Levels",
"lodLevelNumber": "LOD Level {{index}}",
"compress": "Compress",
"applyPresetConfirmation": "Would you like to apply this preset?",
"savePreset": "Save Preset",
"useDraco": "Use DRACO Mesh Compression",
"useMeshopt": "Use Meshoptimizer",
"useQuantization": "Use Mesh Quantization",
"textureFormat": "Image Format",
"modelFormat": "Model Format",
"resourceUri": "Resource URI",
"dst": "File Name",
"resourceUri": "Resource URL",
"dst": "File name",
"resampleAnimations": "Resample Animations",
"maxTextureSize": "Max Texture Size",
"simplifyRatio": "Simplify Ratio",
Expand Down Expand Up @@ -666,6 +671,7 @@
"error-url": "Error Loading From URL"
},
"pointLight": {
"name": "Point Light",
"description": "A light which emits in all directions from a single point.",
"lbl-color": "Color",
"lbl-intensity": "Intensity",
Expand Down Expand Up @@ -986,33 +992,33 @@
},
"text": {
"textGroup": "Text",
"textOpacity": "opacity",
"textWidth": "width",
"textIndent": "indent",
"textAlign": "align",
"textWrap": "wrap",
"textAnchor": "anchor",
"textDepthOffset": "depthOffset",
"textCurveRadius": "curveRadius",
"letterSpacing": "letterSpacing",
"lineHeightGroup": "lineHeight",
"lineHeight": "height",
"textDirection": "direction",
"textOpacity": "Opacity",
"textWidth": "Width",
"textIndent": "Indent",
"textAlign": "Align",
"textWrap": "Wrap",
"textAnchor": "Anchor",
"textDepthOffset": "Depth off set",
"textCurveRadius": "Curve radius",
"letterSpacing": "Letter spacing",
"lineHeightGroup": "Line height",
"lineHeight": "Height",
"textDirection": "Direction",
"fontGroup": "Font",
"fontFamily": "family",
"fontSize": "size",
"fontColor": "color",
"fontMaterial": "material",
"fontFamily": "Family",
"fontSize": "Size",
"fontColor": "Color",
"fontMaterial": "Material",
"outlineGroup": "Outline",
"outlineColor": "color",
"outlineOpacity": "opacity",
"outlineWidth": "width",
"outlineBlur": "blur",
"outlineOffset": "offset",
"outlineColor": "Color",
"outlineOpacity": "Opacity",
"outlineWidth": "Width",
"outlineBlur": "Blur",
"outlineOffset": "Offset",
"strokeGroup": "Stroke",
"strokeColor": "color",
"strokeOpacity": "opacity",
"strokeWidth": "width",
"strokeColor": "Color",
"strokeOpacity": "Opacity",
"strokeWidth": "Width",
"advancedActive": "Show Advanced",
"advancedGroup": "Advanced",
"clippingActive": "clip.active",
Expand Down Expand Up @@ -1214,8 +1220,11 @@
"convert": "Convert",
"downloadProject": "Download Project",
"uploadAssets": "Upload Assets",
"uploadFiles": "Upload Files",
"search-placeholder": "Search folders",
"generatingThumbnails": "Generating Thumbnails ({{count}} remaining)",
"file": "File",
"directory": "Directory",
"fileProperties": {
"name": "Name:",
"type": "Type:",
Expand Down Expand Up @@ -1244,6 +1253,12 @@
"dateModified": "Date Modified",
"size": "Size"
}
},
"image-convert": {
"format": "Format",
"resize": "Resize",
"width": "Width",
"height": "Height"
}
},
"scene-assets": {
Expand Down
3 changes: 2 additions & 1 deletion packages/client-core/i18n/en/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@
"userIdCopied": "User ID copied",
"apiKeyCopied": "API Key copied",
"refreshApiKey": "Refresh API Key",
"privacyPolicy": "Privacy Policy"
"privacyPolicy": "Privacy Policy",
"helpChat": "Help Chat"
},
"oauth": {
"authenticating": "Authenticating...",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,21 @@ import { PopoverState } from '@etherealengine/client-core/src/common/services/Po
import { ProjectService } from '@etherealengine/client-core/src/common/services/ProjectService'
import { AuthState } from '@etherealengine/client-core/src/user/services/AuthService'
import { userHasAccess } from '@etherealengine/client-core/src/user/userHasAccess'
import { InviteCode, ProjectPermissionType, ProjectType } from '@etherealengine/common/src/schema.type.module'
import {
InviteCode,
ProjectPermissionType,
ProjectType,
projectPermissionPath
} from '@etherealengine/common/src/schema.type.module'
import { getMutableState, useHookstate } from '@etherealengine/hyperflux'
import { useFind } from '@etherealengine/spatial/src/common/functions/FeathersHooks'
import Button from '@etherealengine/ui/src/primitives/tailwind/Button'
import Input from '@etherealengine/ui/src/primitives/tailwind/Input'
import Modal from '@etherealengine/ui/src/primitives/tailwind/Modal'
import Text from '@etherealengine/ui/src/primitives/tailwind/Text'
import Toggle from '@etherealengine/ui/src/primitives/tailwind/Toggle'

export default function ManageUserPermissionModal({
project,
projectPermissions
}: {
project: ProjectType
projectPermissions: readonly ProjectPermissionType[]
}) {
console.log('ManageUserPermissionModal', project, projectPermissions)
export default function ManageUserPermissionModal({ project }: { project: ProjectType }) {
const { t } = useTranslation()
const selfUser = useHookstate(getMutableState(AuthState)).user
const userInviteCode = useHookstate('' as InviteCode)
Expand All @@ -58,13 +57,21 @@ export default function ManageUserPermissionModal({
? 'owner'
: 'user'

const projectPermissionsFindQuery = useFind(projectPermissionPath, {
query: {
projectId: project.id,
paginate: false
}
})

const handleCreatePermission = async () => {
if (!userInviteCode.value) {
userInviteCodeError.set(t('admin:components.project.inviteCodeCantEmpty'))
return
}
try {
await ProjectService.createPermission(userInviteCode.value, project.id, 'reviewer')
projectPermissionsFindQuery.refetch()
} catch (err) {
NotificationService.dispatchNotify(err.message, { variant: 'error' })
}
Expand All @@ -73,6 +80,7 @@ export default function ManageUserPermissionModal({
const handlePatchPermission = async (permission: ProjectPermissionType) => {
try {
await ProjectService.patchPermission(permission.id, permission.type === 'owner' ? 'user' : 'owner')
projectPermissionsFindQuery.refetch()
} catch (err) {
NotificationService.dispatchNotify(err.message, { variant: 'error' })
}
Expand All @@ -81,6 +89,7 @@ export default function ManageUserPermissionModal({
const handleRemovePermission = async (id: string) => {
try {
await ProjectService.removePermission(id)
projectPermissionsFindQuery.refetch()
} catch (err) {
NotificationService.dispatchNotify(err.message, { variant: 'error' })
}
Expand All @@ -105,7 +114,7 @@ export default function ManageUserPermissionModal({
/>
)}
<div className="grid gap-4">
{projectPermissions?.map((permission) => (
{projectPermissionsFindQuery.data.map((permission) => (
<div key={permission.id} className="flex items-center gap-2">
<Text fontSize="sm">
{permission.userId === selfUser.id.value ? `${permission.user?.name} (you)` : permission.user?.name}
Expand All @@ -119,7 +128,7 @@ export default function ManageUserPermissionModal({
disabled={
selfUserPermission !== 'owner' ||
selfUser.id.value === permission.userId ||
projectPermissions?.length === 1
projectPermissionsFindQuery.data.length === 1
}
/>
<Button
Expand Down
13 changes: 2 additions & 11 deletions packages/client-core/src/admin/components/project/ProjectTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { PopoverState } from '@etherealengine/client-core/src/common/services/Po
import { ProjectService } from '@etherealengine/client-core/src/common/services/ProjectService'
import config from '@etherealengine/common/src/config'
import multiLogger from '@etherealengine/common/src/logger'
import { projectPath, projectPermissionPath, ProjectType } from '@etherealengine/common/src/schema.type.module'
import { projectPath, ProjectType } from '@etherealengine/common/src/schema.type.module'
import { getMutableState, useHookstate } from '@etherealengine/hyperflux'
import { useFind } from '@etherealengine/spatial/src/common/functions/FeathersHooks'
import ConfirmDialog from '@etherealengine/ui/src/components/tailwind/ConfirmDialog'
Expand Down Expand Up @@ -72,13 +72,6 @@ export default function ProjectTable() {
}
})

const projectPermissionsFindQuery = useFind(projectPermissionPath, {
query: {
projectId: activeProjectId?.value,
paginate: false
}
})

const handleEnabledChange = async (project: ProjectType) => {
await ProjectService.setEnabled(project.id, !project.enabled)
projectQuery.refetch()
Expand Down Expand Up @@ -144,9 +137,7 @@ export default function ProjectTable() {
className="mr-2 h-min whitespace-pre bg-theme-blue-secondary text-[#214AA6] disabled:opacity-50 dark:text-white"
onClick={() => {
activeProjectId.set(project.id)
PopoverState.showPopupover(
<ManageUserPermissionModal project={project} projectPermissions={projectPermissionsFindQuery.data} />
)
PopoverState.showPopupover(<ManageUserPermissionModal project={project} />)
}}
>
{t('admin:components.project.actions.access')}
Expand Down
5 changes: 5 additions & 0 deletions packages/client-core/src/admin/components/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import ProjectTab from './tabs/project'
import RedisTab from './tabs/redis'
import ServerTab from './tabs/server'
import TaskServerTab from './tabs/taskServer'
import ZendeskTab from './tabs/zendesk'

export const SettingsTabsData = [
{
Expand Down Expand Up @@ -86,6 +87,10 @@ export const SettingsTabsData = [
{
label: t('admin:components.setting.features.header'),
Component: FeaturesTab
},
{
label: t('admin:components.setting.zendesk.header'),
Component: ZendeskTab
}
]

Expand Down
Loading

0 comments on commit 86cf49b

Please sign in to comment.