Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidenav and path changes for activity feature #1103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions .github/workflows/build_deploy_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:

- uses: unstructuredstudio/zubhub/.github/actions/scp_action@master
with:
host: ${{ vars.DO_BACKEND_HOST }}
username: ${{ vars.DO_BACKEND_USERNAME }}
host: ${{ vars.DO_FRONTEND_HOST }}
username: ${{ vars.DO_FRONTEND_USERNAME }}
key: ${{ secrets.DO_SSHKEY }}
source: "."
target: "/home/zubhub-frontend/zubhub"
Expand All @@ -65,7 +65,7 @@ jobs:
script: |

docker system prune -a -f

volumes=$(docker volume ls -q)
# Loop through the volumes
while IFS= read -r volume; do
Expand Down
1 change: 1 addition & 0 deletions zubhub_frontend/zubhub/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions zubhub_frontend/zubhub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"axios": "^1.5.1",
"caniuse-lite": "^1.0.30001543",
"classnames": "^2.2.6",
"clsx": "^2.1.0",
"compressorjs": "^1.0.7",
"dayjs": "^1.11.10",
"formik": "^2.2.5",
Expand Down
5 changes: 3 additions & 2 deletions zubhub_frontend/zubhub/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@
},
"activityLog": {
"activity": "Activity Log",
"addActivityLog": "Seems like there isn't any activity on your account yet! Get involved to see activity logs!"
"addActivityLog": "Seems like there isn't any activity on your account yet! Get involved to see activity logs!"
},
"team": "Team",
"createteam": "Create Team",
Expand Down Expand Up @@ -949,6 +949,7 @@
"primary": "Create Activity",
"edit": "Update Activity"
},
"unauthorized": "You have to be an educator to create activities",
"inputs": {
"title": {
"label": "Name your Activity",
Expand Down Expand Up @@ -1191,4 +1192,4 @@
"buttonLabel": "Get Started"
}
}
}
}
72 changes: 35 additions & 37 deletions zubhub_frontend/zubhub/src/components/Sidenav/data.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,43 @@
import { GiNotebook } from 'react-icons/gi';
import { TEAM_ENABLED } from '../../utils.js';
import { RiLogoutBoxRFill, RiTeamFill } from 'react-icons/ri';
import {
Bookmark,
Dashboard,
EmojiObjects,
ExpandMore,
FeaturedPlayList,
Person,
PostAddOutlined,
Publish,
Settings,
Bookmark,
Dashboard,
EmojiObjects,
FeaturedPlayList,
Person,
PostAddOutlined,
Publish,
} from '@mui/icons-material';
import { TEAM_ENABLED } from '../../utils.js';

export const links = ({ draftCount, myProjectCount, auth, t }) => [
{ label: t('pageWrapper.sidebar.projects'), link: '/', icon: Dashboard },
{ label: t('pageWrapper.sidebar.profile'), link: '/profile', icon: Person, reactIcon: true, requireAuth: true },
{ label: t('pageWrapper.sidebar.createProject'), link: '/projects/create', icon: EmojiObjects },
...(auth?.tags.includes('staff')
? [{ label: t('pageWrapper.sidebar.createActivity'), link: '/activities/create', icon: PostAddOutlined }]
: []),
{
label: `${t('pageWrapper.sidebar.myDrafts')}`,
link: `/creators/${auth?.username}/drafts`,
icon: GiNotebook,
requireAuth: true,
customButton: true,
},
{
label: `${t('pageWrapper.sidebar.myProjects')}`,
link: `/creators/${auth?.username}/projects`,
icon: Publish,
requireAuth: true,
customButton: true,
},
{ label: t('pageWrapper.sidebar.bookmarks'), link: '/projects/saved', icon: Bookmark, requireAuth: true },
...(TEAM_ENABLED ? [{ label: t('pageWrapper.sidebar.teams'), link: '/teams/all', icon: RiTeamFill }] : []),
{ label: t('pageWrapper.sidebar.expoloreActivities'), link: 'https://kriti.unstructured.studio/', target: '_blank', icon: FeaturedPlayList },
export const links = ({ auth, t }) => [
{ label: t('pageWrapper.sidebar.projects'), link: '/', icon: Dashboard },
{ label: t('pageWrapper.sidebar.profile'), link: '/profile', icon: Person, reactIcon: true, requireAuth: true },
{ label: t('pageWrapper.sidebar.createProject'), link: '/projects/create', icon: EmojiObjects },
...(auth?.tags.includes('staff') || auth?.tags.includes('educator')
? [{ label: t('pageWrapper.sidebar.createActivity'), link: '/activities/create', icon: PostAddOutlined }]
: []),
{
label: `${t('pageWrapper.sidebar.myDrafts')}`,
link: `/creators/${auth?.username}/drafts`,
icon: GiNotebook,
requireAuth: true,
customButton: true,
},
{
label: `${t('pageWrapper.sidebar.myProjects')}`,
link: `/creators/${auth?.username}/projects`,
icon: Publish,
requireAuth: true,
customButton: true,
},
{ label: t('pageWrapper.sidebar.bookmarks'), link: '/projects/saved', icon: Bookmark, requireAuth: true },
...(TEAM_ENABLED ? [{ label: t('pageWrapper.sidebar.teams'), link: '/teams/all', icon: RiTeamFill }] : []),
{ label: t('pageWrapper.sidebar.expoloreActivities'), link: '/activities', icon: FeaturedPlayList },
];

export const bottomLinks = ({ t }) => [
// { label: t('pageWrapper.sidebar.settings'), link: '/settings', icon: Settings, requireAuth: true },
{ label: t('pageWrapper.sidebar.logout'), action: 'logout', icon: RiLogoutBoxRFill, red: true, requireAuth: true },
];
// { label: t('pageWrapper.sidebar.settings'), link: '/settings', icon: Settings, requireAuth: true },
{ label: t('pageWrapper.sidebar.logout'), action: 'logout', icon: RiLogoutBoxRFill, red: true, requireAuth: true },
];
Loading
Loading