Skip to content

Commit

Permalink
Clean up auth imports in UserMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Apr 4, 2024
1 parent ea5f6cf commit 41a2357
Showing 3 changed files with 9 additions and 18 deletions.
6 changes: 3 additions & 3 deletions src/config/config.js
Original file line number Diff line number Diff line change
@@ -33,9 +33,9 @@ export const BASE_API_URL = DC_BASE + API;
export const DC_LOGIN = "/accounts/login/squarelet";
export const DC_LOGOUT = "/accounts/logout/";
export const SQUARELET_SIGNUP = "/accounts/signup/?intent=documentcloud&next=";
export const SIGN_IN_URL = DC_BASE + DC_LOGIN;
export const SIGN_UP_URL = SQUARELET_BASE + SQUARELET_SIGNUP;
export const SIGN_OUT_URL = DC_BASE + DC_LOGOUT;
export const SIGN_IN_URL = new URL(DC_LOGIN, DC_BASE).toString();
export const SIGN_UP_URL = new URL(SQUARELET_SIGNUP, SQUARELET_BASE).toString();
export const SIGN_OUT_URL = new URL(DC_LOGOUT, DC_BASE).toString();

export const LANGUAGES = [
["US English", "en", "🇺🇸"],
5 changes: 4 additions & 1 deletion src/lib/components/accounts/OrgMenu.svelte
Original file line number Diff line number Diff line change
@@ -52,6 +52,8 @@
height: 1rem;
fill: #5c717c;
}
/* unused
.premium {
display: flex;
justify-content: center;
@@ -61,7 +63,8 @@
fill: var(--premium);
height: 2rem;
width: 2rem;
}
}
*/
@media (max-width: 64rem) {
.name {
16 changes: 2 additions & 14 deletions src/lib/components/accounts/UserMenu.svelte
Original file line number Diff line number Diff line change
@@ -14,19 +14,7 @@
} from "svelte-octicons";
import Menu from "@/common/Menu.svelte";
import {
DC_BASE,
DC_LOGIN,
SQUARELET_BASE,
SQUARELET_SIGNUP,
DC_LOGOUT,
} from "@/config/config.js";
export const SQUARELET_URL = SQUARELET_BASE;
export const SIGN_IN_URL = DC_BASE + DC_LOGIN;
export const SIGN_UP_URL =
SQUARELET_BASE + SQUARELET_SIGNUP + encodeURIComponent($page.url.href);
export const SIGN_OUT_URL = DC_BASE + DC_LOGOUT;
import { SQUARELET_BASE, SIGN_OUT_URL } from "@/config/config.js";
export let user: User;
@@ -43,7 +31,7 @@
<div class="dropdownArrow"><ChevronDown16 /></div>
</SidebarItem>
<Menu>
<SidebarItem href={SQUARELET_URL} target="_blank" on:click={close}>
<SidebarItem href={SQUARELET_BASE} target="_blank" on:click={close}>
<Gear16 />
{$_("authSection.user.acctSettings")}
</SidebarItem>

0 comments on commit 41a2357

Please sign in to comment.