Skip to content

Commit

Permalink
Merge branch 'master' into color-variable-sweep
Browse files Browse the repository at this point in the history
  • Loading branch information
nikk15 committed Jul 25, 2023
2 parents 08500b0 + b524853 commit b26de51
Show file tree
Hide file tree
Showing 23 changed files with 127 additions and 76 deletions.
2 changes: 1 addition & 1 deletion admin/src/utils/feature_flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function hasPaidFeature(): boolean {
// If the user is not a turkey user then no need to check.
if (configs.ITA_SERVER != "turkey") return true;

const authorizedTiers: PaidTiers[] = ["p1", "b1"];
const authorizedTiers: PaidTiers[] = ["p1", "b1","b0"];
return authorizedTiers.includes(configs.TIER);
}

Expand Down
6 changes: 5 additions & 1 deletion src/bit-systems/mixer-animatable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addComponent, defineQuery, enterQuery, exitQuery, removeComponent } from "bitecs";
import { addComponent, defineQuery, enterQuery, entityExists, exitQuery, removeComponent } from "bitecs";
import { AnimationMixer } from "three";
import { MixerAnimatable, MixerAnimatableInitialize, MixerAnimatableData, Object3DTag } from "../bit-components";
import { HubsWorld } from "../app";
Expand All @@ -10,6 +10,10 @@ const mixerExitQuery = exitQuery(mixerQuery);

export function mixerAnimatableSystem(world: HubsWorld): void {
initializeEnterQuery(world).forEach(eid => {
if (!entityExists(world, eid)) {
console.warn("Skipping nonexistant entity."); // TODO Why does this happen?
return;
}
addComponent(world, MixerAnimatable, eid);

const object = world.eid2obj.get(eid)!;
Expand Down
2 changes: 1 addition & 1 deletion src/bit-systems/object-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function updateVisibility(world: HubsWorld, menu: EntityID, frozen: boolean) {

world.eid2obj.get(ObjectMenu.unpinButtonRef[menu])!.visible = visible && isPinned(target);
world.eid2obj.get(ObjectMenu.pinButtonRef[menu])!.visible =
visible && !isPinned(target) && canPin(APP.hubChannel!, world, target);
visible && !isPinned(target) && canPin(APP.hubChannel!, target);

[
ObjectMenu.cameraFocusButtonRef[menu],
Expand Down
6 changes: 3 additions & 3 deletions src/bit-systems/object-spawner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FloatyObject, Held, HeldRemoteRight, Interacted, ObjectSpawner } from "
import { FLOATY_OBJECT_FLAGS } from "../systems/floaty-object-system";
import { sleep } from "../utils/async-utils";
import { coroutine } from "../utils/coroutine";
import { createNetworkedEntity } from "../utils/create-networked-entity";
import { createNetworkedMedia } from "../utils/create-networked-entity";
import { EntityID } from "../utils/networking-types";
import { setMatrixWorld } from "../utils/three-utils";
import { animateScale, waitForMediaLoaded } from "./media-loading";
Expand All @@ -15,8 +15,8 @@ export enum OBJECT_SPAWNER_FLAGS {
}

function* spawnObjectJob(world: HubsWorld, spawner: EntityID) {
const spawned = createNetworkedEntity(world, "media", {
src: APP.getString(ObjectSpawner.src[spawner]),
const spawned = createNetworkedMedia(world, {
src: APP.getString(ObjectSpawner.src[spawner])!,
recenter: false,
resize: false,
animateLoad: false,
Expand Down
7 changes: 3 additions & 4 deletions src/load-media-on-paste-or-drop.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createNetworkedEntity } from "./utils/create-networked-entity";
import { createNetworkedMedia } from "./utils/create-networked-entity";
import { upload, parseURL } from "./utils/media-utils";
import { guessContentType } from "./utils/media-url-utils";
import { AElement } from "aframe";
Expand All @@ -23,7 +23,7 @@ export function spawnFromUrl(text: string) {
console.warn(`Could not parse URL. Ignoring pasted text:\n${text}`);
return;
}
const eid = createNetworkedEntity(APP.world, "media", {
const eid = createNetworkedMedia(APP.world, {
src: text,
recenter: true,
resize: !qsTruthy("noResize"),
Expand Down Expand Up @@ -62,12 +62,11 @@ export async function spawnFromFileList(files: FileList) {
recenter: true,
resize: !qsTruthy("noResize"),
animateLoad: true,
fileId: null,
isObjectMenuTarget: true
};
});

const eid = createNetworkedEntity(APP.world, "media", params);
const eid = createNetworkedMedia(APP.world, params);
const avatarPov = (document.querySelector("#avatar-pov-node")! as AElement).object3D;
const obj = APP.world.eid2obj.get(eid)!;
obj.position.copy(avatarPov.localToWorld(new Vector3(0, 0, -1.5)));
Expand Down
10 changes: 6 additions & 4 deletions src/react-components/input/Button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,21 @@

:local(.basic),
:local(.transparent) {
color: theme.$text4-color;
color: theme.$text2-color;
border: 2px solid theme.$basic-border-color;
background-color: theme.$basic-color;

svg {
color: theme.$text4-color;
color: theme.$text2-color;
}

&:hover {
color: theme.$text4-color-hover;
color: theme.$text2-color-hover;
background-color: theme.$basic-color-hover;
}

&:active {
color: theme.$text4-color-pressed;
color: theme.$text2-color-pressed;
background-color: theme.$basic-color-pressed;
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/react-components/input/InputField.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@

:local(.info) {
margin-top: 8px;
color: theme.$text3-color;
color: theme.$text2-color;
align-self: flex-start;
}

:local(.info), :local(.error) {
:local(.info),
:local(.error) {
font-size: 10px;
}
4 changes: 3 additions & 1 deletion src/react-components/input/RadioInput.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@
:local(.label) {
font-size: theme.$font-size-sm;
font-weight: theme.$font-weight-bold;
color: theme.$text1-color;
}

:local(.description) {
margin-top: 4px;
font-size: theme.$font-size-xs;
font-weight: theme.$font-weight-regular;
}
color: theme.$text2-color;
}
24 changes: 14 additions & 10 deletions src/react-components/input/TextInput.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $input-height: 40px;
color: theme.$text1-color;
overflow: hidden;

&:focus-within {
&:focus-within {
border-color: theme.$input-outline-color;
box-shadow: 0 0 0 2px theme.$input-outline-color;
}
Expand All @@ -22,7 +22,8 @@ $input-height: 40px;
height: 100%;
}

:local(.before-input), :local(.after-input) {
:local(.before-input),
:local(.after-input) {
display: flex;
height: $input-height;
align-items: center;
Expand All @@ -35,11 +36,10 @@ $input-height: 40px;
border-width: 0;
min-height: auto;
border: none;

&:hover {
border:none;
border: none;
}


:global(.keyboard-user) &:focus {
border-width: 0;
Expand All @@ -50,21 +50,21 @@ $input-height: 40px;
border-top-left-radius: theme.$border-radius-regular;
border-bottom-left-radius: theme.$border-radius-regular;
}

&:last-child {
margin-left: 1px;
box-shadow: inset 0 0 0 3px theme.$outline-color, 1px 0 0 2px theme.$outline-color;
border-top-right-radius: theme.$border-radius-regular;
border-bottom-right-radius: theme.$border-radius-regular;
}
}

}

:local(.icon-button), & > svg {
:local(.icon-button),
& > svg {
padding: 0;
margin-left: 8px;

&:last-child {
margin-right: 8px;
}
Expand Down Expand Up @@ -92,7 +92,7 @@ $input-height: 40px;
:local(.invalid) {
border-color: theme.$error-color !important;

&:focus-within {
&:focus-within {
box-shadow: 0 0 0 2px theme.$error-color;
}
}
Expand All @@ -108,6 +108,10 @@ $input-height: 40px;
&:focus {
box-shadow: none;
}

&::placeholder {
color: theme.$text3-color;
}
}

:local(.invalid-icon) {
Expand Down
1 change: 0 additions & 1 deletion src/react-components/input/ToggleInput.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
margin-left: 16px;
display: flex;
flex-direction: column;
color: theme.$text2-color;
}

:local(.label) {
Expand Down
3 changes: 2 additions & 1 deletion src/react-components/layout/LoadingScreenLayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
bottom: 0;
top: 0;
background: theme.$loading-screen-background;
color: theme.$text1-color;

font-size: theme.$font-size-sm;

@media(min-width: theme.$breakpoint-lg) and (min-height: theme.$breakpoint-vr) {
@media (min-width: theme.$breakpoint-lg) and (min-height: theme.$breakpoint-vr) {
font-size: theme.$font-size-md;
}
}
Expand Down
19 changes: 12 additions & 7 deletions src/react-components/layout/Page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@
box-sizing: border-box;
}

html, body, :global(#root), :global(#ui-root), :global(.home-root) {
html,
body,
:global(#root),
:global(#ui-root),
:global(.home-root) {
margin: 0;
height:100%;
height: 100%;
}

body {
background: theme.$background1-color;
color: theme.$text1-color;
}

:global(#root), :global(#ui-root), :global(.home-root) {
display:flex;
flex-direction:column;
:global(#root),
:global(#ui-root),
:global(.home-root) {
display: flex;
flex-direction: column;
}

h1 {
Expand All @@ -32,7 +37,7 @@ main {
order: -1;
flex: 1;

@media(min-width: theme.$breakpoint-lg) {
@media (min-width: theme.$breakpoint-lg) {
order: 0;
display: flex;
flex-direction: column;
Expand Down
5 changes: 3 additions & 2 deletions src/react-components/room/ContentMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
border-radius: 12px;
pointer-events: auto;
padding: 4px;
color: theme.$text1-color;

@media(min-width: theme.$breakpoint-lg) {
@media (min-width: theme.$breakpoint-lg) {
top: 24px;
right: 24px;
}
Expand Down Expand Up @@ -76,4 +77,4 @@
:local(.disabled) {
pointer-events: none;
background-color: theme.$transparent;
}
}
3 changes: 2 additions & 1 deletion src/react-components/room/RoomEntryModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@

h5 {
font-size: theme.$font-size-xs;
color: theme.$grey;
color: theme.$text3-color;
margin-bottom: 4px;
}

p {
font-size: theme.$font-size-sm;
text-align: center;
color: theme.$text1-color;

@media (min-width: theme.$breakpoint-lg) and (min-height: theme.$breakpoint-vr) {
font-size: 20px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ const chatTooltipDescription = defineMessage({

type ChatToolbarButtonProps = {
onClick: () => void;
selected: boolean
};

const ChatToolbarButton = ({ onClick }: ChatToolbarButtonProps) => {
const ChatToolbarButton = ({ onClick, selected }: ChatToolbarButtonProps) => {
const { unreadMessages } = useContext(ChatContext);
const intl = useIntl();
const description = intl.formatMessage(chatTooltipDescription);
Expand All @@ -31,6 +32,7 @@ const ChatToolbarButton = ({ onClick }: ChatToolbarButtonProps) => {
icon={<ChatIcon />}
preset="accent4"
label={<FormattedMessage id="chat-toolbar-button" defaultMessage="Chat" />}
selected={selected}
/>
</ToolTip>
);
Expand Down
3 changes: 2 additions & 1 deletion src/react-components/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
--toolbar-label-accent4: var(--accent4-color);
--toolbar-label-accent5: var(--accent5-color);

--tile-text-color: var(--text4-color);
--tile-text-color: var(--text2-color);
--tile-bg-color: var(--secondary-color);
--tile-bg-color-hover: var(--secondary-color-hover);
--tile-bg-color-pressed: var(--secondary-color-pressed);
Expand All @@ -192,6 +192,7 @@ body {
height: 100%;
overflow: auto;
overscroll-behavior-y: none;
color: var(--text1-color);
}

body[data-theme="light"],
Expand Down
Loading

0 comments on commit b26de51

Please sign in to comment.