Skip to content

Commit

Permalink
chore: change mail ui route to /mail
Browse files Browse the repository at this point in the history
  • Loading branch information
s-aga-r committed Nov 20, 2024
1 parent 7cce407 commit 38c95c9
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ tags
node_modules
__pycache__
mail_client/public/frontend
mail_client/www/client.html
mail_client/www/mail.html
.vscode
2 changes: 1 addition & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Frappe Mail Client</title>
<title>Frappe Mail</title>
</head>
<body>
<div id="app"></div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "vite",
"serve": "vite preview",
"build": "vite build --base=/assets/mail_client/frontend/ && yarn copy-html-entry",
"copy-html-entry": "cp ../mail_client/public/frontend/index.html ../mail_client/www/client.html"
"copy-html-entry": "cp ../mail_client/public/frontend/index.html ../mail_client/www/mail.html"
},
"dependencies": {
"@vueuse/core": "^10.4.1",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Controls/MultiselectInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ watchDebounced(
)
const filterOptions = createResource({
url: 'mail_client.api.client.get_mail_contacts',
url: 'mail_client.api.mail.get_mail_contacts',
makeParams(values) {
return {
txt: values.txt,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/MailDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const replyDetails = reactive({
})
const mailThread = createResource({
url: 'mail_client.api.client.get_mail_thread',
url: 'mail_client.api.mail.get_mail_thread',
makeParams(values) {
return {
name: values?.mailID || props.mailID,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Inbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const setCurrentMail = (mail) => {
}
const incomingMails = createListResource({
url: 'mail_client.api.client.get_incoming_mails',
url: 'mail_client.api.mail.get_incoming_mails',
doctype: 'Incoming Mail',
auto: true,
start: mailStart.value,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Sent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ onMounted(() => {
})
const outgoingMails = createListResource({
url: 'mail_client.api.client.get_outgoing_mails',
url: 'mail_client.api.mail.get_outgoing_mails',
doctype: 'Outgoing Mail',
auto: true,
start: mailStart.value,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const routes = [
]

let router = createRouter({
history: createWebHistory('/client'),
history: createWebHistory('/mail'),
routes,
})

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/stores/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const sessionStore = defineStore('mail-session', () => {
})

const branding = createResource({
url: 'mail_client.api.client.get_branding',
url: 'mail_client.api.mail.get_branding',
cache: 'brand',
auto: true,
onSuccess(data) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/stores/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createResource } from 'frappe-ui'

export const userStore = defineStore('mail-users', () => {
let userResource = createResource({
url: 'mail_client.api.client.get_user_info',
url: 'mail_client.api.mail.get_user_info',
onError(error) {
if (error && error.exc_type === 'AuthenticationError') {
router.push('/login')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function translate(message) {

function fetchTranslations(lang) {
createResource({
url: 'mail_client.api.client.get_translations',
url: 'mail_client.api.mail.get_translations',
cache: 'translations',
auto: true,
transform: (data) => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/yarn-error.log
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ npm manifest:
"dev": "vite",
"serve": "vite preview",
"build": "vite build --base=/assets/mail_client/frontend/ && yarn copy-html-entry",
"copy-html-entry": "cp ../mail_client/public/frontend/index.html ../mail_client/www/client.html"
"copy-html-entry": "cp ../mail_client/public/frontend/index.html ../mail_client/www/mail.html"
},
"dependencies": {
"feather-icons": "^4.28.0",
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions mail_client/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
}

website_route_rules = [
{"from_route": "/client/<path:app_path>", "to_route": "client"},
{"from_route": "/mail/<path:app_path>", "to_route": "mail"},
]

# DocType Class
Expand Down Expand Up @@ -290,7 +290,7 @@
"name": "mail_client",
"logo": "/assets/mail_client/images/logo.svg",
"title": "Mail Client",
"route": "/client",
"has_permission": "mail_client.api.client.check_app_permission",
"route": "/mail",
"has_permission": "mail_client.api.mail.check_app_permission",
}
]

0 comments on commit 38c95c9

Please sign in to comment.