Skip to content
Merged
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
3 changes: 3 additions & 0 deletions src/lib/components/LinksMenu.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@

&:global(.has-menu) {
cursor: pointer;
display: flex;
align-items: center;
gap: 3px;
}
}

Expand Down
15 changes: 0 additions & 15 deletions src/lib/components/user-area/AuthArea.module.scss

This file was deleted.

44 changes: 0 additions & 44 deletions src/lib/components/user-area/AuthArea.svelte

This file was deleted.

118 changes: 0 additions & 118 deletions src/lib/components/user-area/SigninPopup.module.scss

This file was deleted.

61 changes: 0 additions & 61 deletions src/lib/components/user-area/SigninPopup.svelte

This file was deleted.

17 changes: 15 additions & 2 deletions src/lib/components/user-area/UserArea.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { getAppContext } from 'lib/app-context';
import { checkUserAppRole, fetchUserProfile } from 'lib/functions/user-profile.provider';
import { fetchUserProfileCompletedness } from 'lib/functions/profile-nudges';
import { AUTH0_AUTHENTICATOR_URL } from 'lib/config';
import { AUTH_USER_ROLE } from 'lib/config/auth';
import { DISABLE_NUDGES } from "lib/config/profile-toasts.config";

Expand All @@ -12,7 +13,7 @@
import UserAvatar from './UserAvatar.svelte';
import styles from './UserArea.module.scss'
import Completedness from './Completedness.svelte';
import AuthArea from './AuthArea.svelte';
import Button from '../Button.svelte';

const ctx = getAppContext();

Expand Down Expand Up @@ -74,13 +75,25 @@
const authUser = await fetchUserProfile();
$ctx.auth = {...$ctx.auth, ready: true, user: authUser};
});

function onSignIn(signup?: any) {
const locationHref = `${window.location.origin}${window.location.pathname}`
window.location.href = `${AUTH0_AUTHENTICATOR_URL}?retUrl=${encodeURIComponent(locationHref)}${signup === true ? '&mode=signUp' : ''}`;
}

function onSignUp() {
onSignIn(true);
}
</script>

{#if isReady}
<VerticalSeparator />
<div class={styles.userAreaWrap}>
{#if !user}
<AuthArea />
<div class={styles.btnsWrap}>
<Button label="Log in" onClick={onSignIn} />
<Button variant="primary" label="Sign Up" onClick={onSignUp} />
</div>
{:else }
<ToolSelector />
<UserAvatar
Expand Down
5 changes: 0 additions & 5 deletions src/lib/components/user-area/UserMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
class:active={isActive(ACC_SETTINGS_URL)}
>Account Settings</a>
</li>
<li>
<a
href={`${CUSTOMER_LOGIN}/login?as=customer`}
>Log in as Customer</a>
</li>
<li>
<a
href={"javascript:;"}
Expand Down
12 changes: 0 additions & 12 deletions src/lib/config/nav-menu/all-nav-items.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,6 @@ export const allNavItems: {[key: string]: NavMenuItem} = {
icon: 'review',
description: 'Review submissions',
},
selfServiceApp: {
label: 'Self Service Challenges',
url: SELF_SERVICE_HOST,
icon: 'self-service',
description: 'Launch and manage work',
},
communityHome: {
label: 'Community Home',
description: 'Recent challenges and news.',
Expand All @@ -162,12 +156,6 @@ export const allNavItems: {[key: string]: NavMenuItem} = {
icon: 'tcacademy',
description: 'Learn new skills',
},
topCrowdApp: {
// description: 'Engage and reward your workforce',
icon: 'topcrowd',
label: 'Topcoder Platform',
url: 'https://app.topcoder.com',
},
workManager: {
label: 'Work Manager',
icon: 'work-manager',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/config/nav-menu/footer-nav-items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const footerNavItems: NavMenuItem = {
},
allNavItems.opportunities,
allNavItems.mmTournament,
// allNavItems.aiHub,
allNavItems.aiHub,
allNavItems.articles,
allNavItems.statistics,
]
Expand Down
2 changes: 1 addition & 1 deletion src/lib/config/nav-menu/main-navigation.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const mainNavigationItems: NavMenuItem[] = [
children: [
allNavItems.opportunities,
allNavItems.mmTournament,
// allNavItems.aiHub,
allNavItems.aiHub,
allNavItems.articles,
allNavItems.statistics,
]
Expand Down
16 changes: 7 additions & 9 deletions src/lib/config/nav-menu/tool-selector-nav-items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export const toolSelectorNavItems: NavMenuItem = {
children: [
{
children: [
allNavItems.topCrowdApp,
allNavItems.selfServiceApp,
allNavItems.talentSearchApp,
]
},
Expand Down Expand Up @@ -45,13 +43,13 @@ export const toolSelectorNavItems: NavMenuItem = {
allNavItems.payments
]
},
// {
// label: "AI",
// groupOrder: 3,
// children: [
// allNavItems.aiHub,
// ]
// },
{
label: "AI",
groupOrder: 3,
children: [
allNavItems.aiHub,
]
},
{
label: "Compete",
groupOrder: 3,
Expand Down
1 change: 0 additions & 1 deletion types/src/lib/components/hover-menu/index.d.ts

This file was deleted.