Skip to content

Commit

Permalink
Adding back in the frontend URL for url sharing and comment org team
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Apr 30, 2024
1 parent f2fc016 commit d573604
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
1 change: 1 addition & 0 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FRONTEND_PORT="3000"
VITE_FRONTEND_URL="http://localhost:3000"
VITE_API_URL="http://localhost:8000/v1"

ADMIN_PATH="admin/"
Expand Down
10 changes: 5 additions & 5 deletions frontend/components/modal/ModalSharePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,22 +242,22 @@ const setEntityInfo = (
// Function to grab the url to the base id of the entity to share.
const getCurrentUrl = () => {
if (props.organization) {
return `/organizations/${props.organization.id}`;
return `${BASE_FRONTEND_URL}/organizations/${props.organization.id}`;
} else if (props.group) {
return `/organizations/${props.group.organization.id}/groups/${props.group.id}`;
return `${BASE_FRONTEND_URL}/organizations/${props.group.organization.id}/groups/${props.group.id}`;
} else if (props.event) {
return `/events/${props.event.id}`;
return `${BASE_FRONTEND_URL}/events/${props.event.id}`;
} else if (props.resource) {
return props.resource.resourceURL;
} else if (props.user) {
return `/users/${props.user.id}`;
return `${BASE_FRONTEND_URL}/users/${props.user.id}`;
}
const url = window.location.href;
return url.substring(0, url.lastIndexOf("/"));
};
const shareOptions = {
url: getCurrentUrl() || ``,
url: getCurrentUrl() || `${BASE_FRONTEND_URL}`,
text: getEntityType()?.text || "Check this out!",
quote: getEntityType()?.text || "Check this out!",
hashtags: ["activism", "organizing"],
Expand Down
2 changes: 1 addition & 1 deletion frontend/composables/useMenuEntriesState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const useMenuEntriesState = () => {
createMenuEntry("_global.groups", "organizations", "IconGroup"),
createMenuEntry("_global.resources", "organizations", "IconResource"),
createMenuEntry("_global.faq", "organizations", "IconFAQ"),
createMenuEntry("_global.team", "organizations", "bi:people"),
// createMenuEntry("_global.team", "organizations", "bi:people"),
createMenuEntry("_global.affiliates", "organizations", "IconSupport"),
createMenuEntry("_global.tasks", "organizations", "bi:check-square"),
createMenuEntry(
Expand Down
20 changes: 10 additions & 10 deletions frontend/pages/organizations/[id]/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,36 +117,36 @@ const organizationButtons: MenuSelector[] = [
iconURL: "IconFAQ",
selected: useRoute().path.split("/").pop() === "faq" ? true : true,
},
// {
// id: X,
// label: "_global.team",
// routeURL: "/organizations/" + id + "/team",
// iconURL: "bi:people",
// selected: useRoute().path.split("/").pop() === "team" ? true : true,
// },
{
id: 6,
label: "_global.team",
routeURL: "/organizations/" + id + "/team",
iconURL: "bi:people",
selected: useRoute().path.split("/").pop() === "team" ? true : true,
},
{
id: 7,
label: "_global.affiliates",
routeURL: "/organizations/" + id + "/affiliates",
iconURL: "IconSupport",
selected: useRoute().path.split("/").pop() === "affiliates" ? true : true,
},
{
id: 8,
id: 7,
label: "_global.tasks",
routeURL: "/organizations/" + id + "/tasks",
iconURL: "bi:check-square",
selected: useRoute().path.split("/").pop() === "tasks" ? true : true,
},
{
id: 9,
id: 8,
label: "_global.discussions",
routeURL: "/organizations/" + id + "/discussions",
iconURL: "octicon:comment-discussion-24",
selected: useRoute().path.split("/").pop() === "discussions" ? true : true,
},
{
id: 10,
id: 9,
label: "_global.settings",
routeURL: "/organizations/" + id + "/settings",
iconURL: "bi:gear",
Expand Down
1 change: 1 addition & 0 deletions frontend/utils/baseURLs.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const BASE_FRONTEND_URL = import.meta.env.VITE_FRONTEND_URL;
export const BASE_BACKEND_URL = import.meta.env.VITE_API_URL;

0 comments on commit d573604

Please sign in to comment.