Skip to content

Commit

Permalink
Fix multisync button (#688)
Browse files Browse the repository at this point in the history
* Bug fix: check user roles in repo clone

* Fix typo
  • Loading branch information
hiveer committed Nov 7, 2024
1 parent 84ed668 commit 7cd9ee7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/new_admin/AdminNavbar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="w-full h-[60px] bg-[#1C7A6C]">
<div class="max-w-[1280px] m-auto h-full flex justify-between items-center">
<p class="font-[700] text-[#D1DDD0]"> OpenCSG Admin Pannel </p>
<p class="font-[700] text-[#D1DDD0]"> OpenCSG Admin Panel </p>
<a href="/" target="_blank" class="font-[500] text-[#D1DDD0] underline"> Open Site </a>
<p class="text-[#D1DDD0]">{{ userName }} ( {{ userRoles }} )</p>
</div>
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/shared/RepoClone.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@
import useFetchApi from '../../packs/useFetchApi'
import { ElMessage } from "element-plus"
import AddToCollections from '../collections/AddToCollections.vue'
import useUserStore from '../../stores/UserStore'
const userStore = useUserStore()
const { cookies } = useCookies()
const props = defineProps({
Expand Down Expand Up @@ -226,7 +228,7 @@ git clone ${httpCloneProtocol.value}//${
const accessToken = ref('')
const showSyncButton = computed(() =>
props.admin &&
userStore.roles.includes('admin') &&
props.repo.source === 'opencsg' &&
['pending', 'inprogress', 'failed'].includes(props.repo.sync_status)
)
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/locales/en_js/admin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const admin = {
dashboard: {
title: 'Admin Dashboard',
intro: 'This is the admin pannel, admin users can do the system settings here.'
intro: 'This is the admin panel, admin users can do the system settings here.'
},
syncSetting: {
title: 'Sync Setting',
Expand Down

0 comments on commit 7cd9ee7

Please sign in to comment.