Skip to content

Commit

Permalink
chore: community info
Browse files Browse the repository at this point in the history
  • Loading branch information
uhrjun committed Jul 22, 2024
1 parent e54a8c0 commit b2cb390
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 16 deletions.
16 changes: 16 additions & 0 deletions frontend/src/components/EspressoIcons/Docs.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template>
<svg
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M1.73633 3.86328C1.73633 3.58714 1.96019 3.36328 2.23633 3.36328H4.61769L4.61787 3.36328L4.61807 3.36328L4.61981 3.3633L4.63259 3.36348C4.64475 3.36369 4.66408 3.36416 4.6899 3.36513C4.74159 3.36708 4.81909 3.37106 4.91714 3.37919C5.11374 3.39549 5.39028 3.42824 5.70547 3.49374C6.28138 3.61342 6.94983 3.83496 7.5003 4.2341V13.2101C6.95008 12.925 6.38153 12.7588 5.90892 12.6606C5.54599 12.5852 5.22809 12.5475 4.99977 12.5286C4.88537 12.5191 4.7928 12.5143 4.72753 12.5118C4.69487 12.5106 4.669 12.5099 4.65058 12.5096L4.62862 12.5093L4.62198 12.5092L4.61977 12.5092L4.61895 12.5092H4.61861C4.61846 12.5092 4.61831 12.5092 4.61831 13.0092V12.5092H1.73633V3.86328ZM8.32464 14.5171C8.90383 14.0305 9.6564 13.7724 10.2951 13.6397C10.6103 13.5742 10.8869 13.5414 11.0835 13.5251C11.1815 13.517 11.259 13.513 11.3107 13.5111C11.3365 13.5101 11.3558 13.5097 11.368 13.5094L11.3808 13.5093L11.3823 13.5092H11.3825H11.3827H11.383H14.7643C15.0404 13.5092 15.2643 13.2854 15.2643 13.0092V3.86328C15.2643 3.03485 14.5927 2.36328 13.7643 2.36328H11.3823V2.86328C11.3823 2.36328 11.3821 2.36328 11.382 2.36328H11.3817H11.3808L11.3786 2.36329L11.372 2.36334L11.35 2.36364C11.3316 2.36397 11.3057 2.36461 11.2731 2.36584C11.2078 2.36829 11.1152 2.37312 11.0008 2.38261C10.7725 2.40154 10.4546 2.43924 10.0917 2.51466C9.47347 2.64312 8.69109 2.88781 8.0003 3.36306C7.30951 2.88781 6.52714 2.64312 5.90892 2.51466C5.54599 2.43924 5.22809 2.40154 4.99977 2.38261C4.88537 2.37312 4.7928 2.36829 4.72753 2.36584C4.69487 2.36461 4.669 2.36397 4.65058 2.36364L4.62862 2.36334L4.62198 2.36329L4.61977 2.36328H4.61895H4.61861C4.61846 2.36328 4.61831 2.36328 4.61831 2.86328V2.36328H2.23633C1.4079 2.36328 0.736328 3.03485 0.736328 3.86328V13.0092C0.736328 13.2854 0.960186 13.5092 1.23633 13.5092L4.61753 13.5092H4.6176L4.61762 13.5092H4.61787H4.61807H4.61831L4.61981 13.5093L4.63259 13.5094C4.64475 13.5097 4.66408 13.5101 4.6899 13.5111C4.74159 13.513 4.81909 13.517 4.91714 13.5251C5.11374 13.5414 5.39028 13.5742 5.70547 13.6397C6.34421 13.7724 7.09677 14.0305 7.67596 14.5171C7.76328 14.5916 7.87654 14.6366 8.0003 14.6366C8.12406 14.6366 8.23733 14.5916 8.32464 14.5171ZM8.5003 13.2101V4.2341C9.05077 3.83496 9.71922 3.61342 10.2951 3.49374C10.6103 3.42824 10.8869 3.39549 11.0835 3.37919C11.1815 3.37106 11.259 3.36708 11.3107 3.36513C11.3365 3.36416 11.3558 3.36369 11.368 3.36348L11.3808 3.3633L11.3823 3.36328L11.3825 3.36328L11.3827 3.36328L11.3829 3.36328H13.7643C14.0404 3.36328 14.2643 3.58714 14.2643 3.86328V12.5092H11.3823V13.0092C11.3823 12.5092 11.3821 12.5092 11.382 12.5092H11.3817L11.3808 12.5092L11.3786 12.5092L11.372 12.5093L11.35 12.5096C11.3316 12.5099 11.3057 12.5106 11.2731 12.5118C11.2078 12.5143 11.1152 12.5191 11.0008 12.5286C10.7725 12.5475 10.4546 12.5852 10.0917 12.6606C9.61907 12.7588 9.05053 12.925 8.5003 13.2101Z"
fill="currentColor"
/>
</svg>
</template>
52 changes: 38 additions & 14 deletions frontend/src/components/PrimaryDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import { Dropdown, FeatherIcon } from "frappe-ui"
import SettingsDialog from "@/components/Settings/SettingsDialog.vue"
import FrappeDriveLogo from "@/components/FrappeDriveLogo.vue"
import Docs from "@/components/EspressoIcons/Docs.vue"
export default {
name: "PrimaryDropdown",
Expand Down Expand Up @@ -85,22 +86,45 @@ export default {
settingsItems() {
return [
{
icon: "grid",
label: "Switch to Desk",
condition: () => this.$store.state.user.isSystemUser,
onClick() {
window.location.href = "/app"
},
group: "Manage",
hideLabel: true,
items: [
{
icon: "corner-up-left",
label: "Switch to Desk",
condition: () => this.$store.state.user.systemUser,
onClick() {
window.location.href = "/app"
},
},
{
icon: Docs,
label: "Documentation",
onClick: () =>
window.open("https://docs.frappe.io/drive", "_blank"),
},
{
icon: "life-buoy",
label: "Support",
onClick: () => window.open("https://t.me/frappedrive", "_blank"),
},
],
},
{
icon: "settings",
label: "Settings",
onClick: () => (this.showSettings = true),
},
{
icon: "log-out",
label: "Log out",
onClick: () => this.logout(),
group: "Others",
hideLabel: true,
items: [
{
icon: "settings",
label: "Settings",
onClick: () => (this.showSettings = true),
},
{
icon: "log-out",
label: "Log out",
onClick: () => this.logout(),
},
],
},
]
},
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/components/Settings/UserRoleSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
Create
</Button>
</div>
<div class="w-full flex flex-col items-stretch justify-start overflow-y-auto">
<div
class="w-full h-full flex flex-col items-stretch justify-start overflow-y-auto"
>
<div v-for="(group, index) in AllRoles" :key="group.name">
<div
v-if="index > 0"
Expand Down Expand Up @@ -52,7 +54,7 @@

<div
v-if="!AllRoles?.length"
class="h-1/2 w-full flex flex-col items-center justify-center mt-20 mb-12"
class="h-1/2 w-full flex flex-col items-center justify-center my-auto"
>
<FeatherIcon class="h-8 stroke-1 text-gray-600" name="users" />
<span class="text-gray-800 text-sm mt-2">No groups</span>
Expand Down

0 comments on commit b2cb390

Please sign in to comment.