Skip to content

Commit

Permalink
Merge pull request #1526 from ssiyad/chore/rm_branding
Browse files Browse the repository at this point in the history
Remove branding - favicon & custom name
  • Loading branch information
ssiyad authored Aug 23, 2023
2 parents 909c672 + 732c742 commit 4b6c53c
Show file tree
Hide file tree
Showing 20 changed files with 103 additions and 72 deletions.
5 changes: 2 additions & 3 deletions desk/src/pages/desk/AgentRoot.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<template>
<div class="flex h-screen w-screen">
<SideBar />
<RouterView :key="route.fullPath" class="z-0 grow overflow-auto" />
<RouterView :key="$route.fullPath" class="z-0 grow overflow-auto" />
</div>
</template>

<script setup lang="ts">
import { onBeforeMount } from "vue";
import { useRoute, useRouter } from "vue-router";
import { useRouter } from "vue-router";
import { useAuthStore } from "@/stores/auth";
import { useConfigStore } from "@/stores/config";
import { CUSTOMER_PORTAL_LANDING, ONBOARDING_PAGE } from "@/router";
import SideBar from "@/components/desk/sidebar/SideBar.vue";
const route = useRoute();
const router = useRouter();
const authStore = useAuthStore();
const configStore = useConfigStore();
Expand Down
8 changes: 7 additions & 1 deletion desk/src/pages/desk/DeskDashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</template>

<script setup lang="ts">
import { createResource, Tooltip } from "frappe-ui";
import { createResource, usePageMeta, Tooltip } from "frappe-ui";
import { isEmpty } from "lodash";
import PageTitle from "@/components/PageTitle.vue";
import LineChart from "@/components/charts/LineChart.vue";
Expand All @@ -63,4 +63,10 @@ const items = createResource({
const dateInfo =
"📊 The information displayed in these charts are derived from data collected over the past 30 days";
usePageMeta(() => {
return {
title: "Dashboard",
};
});
</script>
8 changes: 7 additions & 1 deletion desk/src/pages/desk/agent/AgentList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</template>
<script setup lang="ts">
import { ref } from "vue";
import { Avatar, Badge } from "frappe-ui";
import { usePageMeta, Avatar, Badge } from "frappe-ui";
import { AGENT_PORTAL_TICKET_LIST } from "@/router";
import { createListManager } from "@/composables/listManager";
import { useFilter } from "@/composables/filter";
Expand Down Expand Up @@ -101,6 +101,12 @@ const agents = createListManager({
},
});
usePageMeta(() => {
return {
title: "Agents",
};
});
function toTickets(user: string) {
storage.value.clear();
storage.value.add({
Expand Down
7 changes: 7 additions & 0 deletions desk/src/pages/desk/canned_response/CannedResponseList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
</template>
<script setup lang="ts">
import { ref } from "vue";
import { usePageMeta } from "frappe-ui";
import { AGENT_PORTAL_CANNED_RESPONSE_SINGLE } from "@/router";
import { createListManager } from "@/composables/listManager";
import PageTitle from "@/components/PageTitle.vue";
Expand Down Expand Up @@ -69,4 +70,10 @@ const responses = createListManager({
return data;
},
});
usePageMeta(() => {
return {
title: "Canned responses",
};
});
</script>
8 changes: 7 additions & 1 deletion desk/src/pages/desk/contact/ContactList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</template>
<script setup lang="ts">
import { ref } from "vue";
import { Avatar } from "frappe-ui";
import { usePageMeta, Avatar } from "frappe-ui";
import { createListManager } from "@/composables/listManager";
import NewContactDialog from "@/components/desk/global/NewContactDialog.vue";
import PageTitle from "@/components/PageTitle.vue";
Expand Down Expand Up @@ -83,6 +83,12 @@ const contacts = createListManager({
},
});
usePageMeta(() => {
return {
title: "Contacts",
};
});
function openContact(id: string) {
selectedContact.value = id;
isContactDialogVisible.value = true;
Expand Down
8 changes: 7 additions & 1 deletion desk/src/pages/desk/customer/CustomerList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</template>
<script setup lang="ts">
import { ref } from "vue";
import { Avatar } from "frappe-ui";
import { usePageMeta, Avatar } from "frappe-ui";
import { createListManager } from "@/composables/listManager";
import NewCustomerDialog from "@/components/desk/global/NewCustomerDialog.vue";
import PageTitle from "@/components/PageTitle.vue";
Expand Down Expand Up @@ -81,6 +81,12 @@ const customers = createListManager({
},
});
usePageMeta(() => {
return {
title: "Customers",
};
});
function openCustomer(id: string) {
selectedCustomer.value = id;
isCustomerDialogVisible.value = true;
Expand Down
8 changes: 7 additions & 1 deletion desk/src/pages/desk/email/EmailList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</div>
</template>
<script setup lang="ts">
import { Badge, FormControl } from "frappe-ui";
import { usePageMeta, Badge, FormControl } from "frappe-ui";
import { AGENT_PORTAL_EMAIL_NEW, AGENT_PORTAL_EMAIL_SINGLE } from "@/router";
import { createListManager } from "@/composables/listManager";
import PageTitle from "@/components/PageTitle.vue";
Expand Down Expand Up @@ -111,4 +111,10 @@ const accounts = createListManager({
return data;
},
});
usePageMeta(() => {
return {
title: "Email accounts",
};
});
</script>
8 changes: 7 additions & 1 deletion desk/src/pages/desk/escalation/EscalationRuleList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</template>
<script setup lang="ts">
import { ref } from "vue";
import { Badge } from "frappe-ui";
import { usePageMeta, Badge } from "frappe-ui";
import { socket } from "@/socket";
import { createListManager } from "@/composables/listManager";
import { ListView } from "@/components";
Expand Down Expand Up @@ -84,6 +84,12 @@ const rules = createListManager({
auto: true,
});
usePageMeta(() => {
return {
title: "Escalation rules",
};
});
function openDialog(rule: string | null) {
selectedRule.value = rule;
showDialog.value = true;
Expand Down
8 changes: 7 additions & 1 deletion desk/src/pages/desk/sla/SlaList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</div>
</template>
<script setup lang="ts">
import { Badge } from "frappe-ui";
import { usePageMeta, Badge } from "frappe-ui";
import { AGENT_PORTAL_SLA_NEW, AGENT_PORTAL_SLA_SINGLE } from "@/router";
import { createListManager } from "@/composables/listManager";
import PageTitle from "@/components/PageTitle.vue";
Expand Down Expand Up @@ -76,4 +76,10 @@ const policies = createListManager({
return data;
},
});
usePageMeta(() => {
return {
title: "Support policies",
};
});
</script>
8 changes: 7 additions & 1 deletion desk/src/pages/desk/team/TeamList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<script setup lang="ts">
import { ref } from "vue";
import { useRouter } from "vue-router";
import { createResource, Dialog, FormControl } from "frappe-ui";
import { createResource, usePageMeta, Dialog, FormControl } from "frappe-ui";
import { isEmpty } from "lodash";
import { AGENT_PORTAL_TEAM_SINGLE } from "@/router";
import { createListManager } from "@/composables/listManager";
Expand Down Expand Up @@ -119,4 +119,10 @@ const newTeam = createResource({
},
onError: useError({ title: "Error creating team" }),
});
usePageMeta(() => {
return {
title: "Teams",
};
});
</script>
7 changes: 0 additions & 7 deletions desk/src/pages/desk/ticket-list/PresetFilters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,13 @@ export default {
return options;
},
},
watch: {
title(newTitle) {
this.configStore.setTitle(newTitle);
},
},
mounted() {
this.configStore.setTitle(this.title);
this.$socket.on("helpdesk:new-preset-filter", (data) => {
if (data.reference_doctype !== "HD Ticket") return;
this.$resources.presetFilterOptions.reload();
});
},
unmounted() {
this.configStore.setTitle();
this.$socket.off("helpdesk:new-preset-filter");
},
resources: {
Expand Down
14 changes: 13 additions & 1 deletion desk/src/pages/desk/ticket-list/TicketList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@

<script setup lang="ts">
import { computed, ref } from "vue";
import { createResource, Button, Dialog, Dropdown } from "frappe-ui";
import {
createResource,
usePageMeta,
Button,
Dialog,
Dropdown,
} from "frappe-ui";
import { Icon } from "@iconify/vue";
import { AGENT_PORTAL_TICKET } from "@/router";
import { socket } from "@/socket";
Expand Down Expand Up @@ -198,4 +204,10 @@ const columns = [
width: "w-36",
},
];
usePageMeta(() => {
return {
title: "Tickets",
};
});
</script>
8 changes: 7 additions & 1 deletion desk/src/pages/desk/ticket/TicketSingle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<script setup lang="ts">
import { onBeforeUnmount, onMounted, toRef } from "vue";
import { createResource } from "frappe-ui";
import { createResource, usePageMeta } from "frappe-ui";
import { emitter } from "@/emitter";
import { socket } from "@/socket";
import ConversationBox from "./ConversationBox.vue";
Expand Down Expand Up @@ -68,4 +68,10 @@ onBeforeUnmount(() => {
events.forEach((e) => socket.off(e));
ticket.value = null;
});
usePageMeta(() => {
return {
title: ticket.value.data.subject,
};
});
</script>
7 changes: 7 additions & 0 deletions desk/src/pages/desk/ticket_type/TicketTypeList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
</div>
</template>
<script setup lang="ts">
import { usePageMeta } from "frappe-ui";
import {
AGENT_PORTAL_TICKET_TYPE_NEW,
AGENT_PORTAL_TICKET_TYPE_SINGLE,
Expand Down Expand Up @@ -62,4 +63,10 @@ const ticketTypes = createListManager({
return data;
},
});
usePageMeta(() => {
return {
title: "Ticket types",
};
});
</script>
10 changes: 7 additions & 3 deletions desk/src/pages/knowledge-base/KnowledgeBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PageTitle title="Knowledge base" />
<div class="flex grow border-t">
<KnowledgeBaseSidebar />
<RouterView :key="route.fullPath" v-slot="{ Component }">
<RouterView :key="$route.fullPath" v-slot="{ Component }">
<component :is="Component" v-if="Component" />
<EmptyMessage v-else message="Select a category" />
</RouterView>
Expand All @@ -12,10 +12,14 @@
</template>

<script setup lang="ts">
import { useRoute } from "vue-router";
import { usePageMeta } from "frappe-ui";
import PageTitle from "@/components/PageTitle.vue";
import EmptyMessage from "@/components/EmptyMessage.vue";
import KnowledgeBaseSidebar from "./KnowledgeBaseSidebar.vue";
const route = useRoute();
usePageMeta(() => {
return {
title: "Knowledge base",
};
});
</script>
3 changes: 0 additions & 3 deletions desk/src/pages/portal/TicketList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,4 @@ function transformStatus(status: string) {
function isHighlight(ticket) {
return ticket.status === "Replied";
}
onMounted(() => configStore.setTitle("My Tickets"));
onUnmounted(() => configStore.setTitle());
</script>
5 changes: 1 addition & 4 deletions desk/src/pages/portal/TicketNew.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<RouterLink
v-for="article in articles.data"
:key="article.name"
class="group flex cursor-pointer gap-2 hover:text-gray-900"
class="group flex cursor-pointer gap-2 hover:text-gray-900"
:to="getArticleLink(article.name, article.title)"
target="_blank"
>
Expand Down Expand Up @@ -236,7 +236,4 @@ function searchArticles(term: string) {
articles.reload();
}
onMounted(() => configStore.setTitle("New ticket"));
onUnmounted(() => configStore.setTitle());
</script>
Loading

0 comments on commit 4b6c53c

Please sign in to comment.