seitime-frappe/frappe/docs/user/zh/guides/app-development/adding-module-icons-on-desktop.md
Loocor c43d1fac59 frappe chinese document translation plan (#4689)
* [add] Chinese documents init.

* Videos chinese document translated

* Bench chinese documents translated half

* Bench chinese documents translated

* Fixed several mistakes for bench guides

* Frappé Tutorial chinese version in translation
2018-01-23 14:50:46 +05:30

769 B
Executable file

Adding Module Icons On Desktop

To create a module icon for a Page, List or Module, you will have to edit the config/desktop.py file in your app.

In this file you will have to write the get_data method that will return a dict object with the module icon parameters

Example 1: Module Icon

def get_data():
	return {
		"Accounts": {
			"color": "#3498db",
			"icon": "octicon octicon-repo",
			"type": "module"
		},
	}

Example 2: List Icon

def get_data():
	return {
		"To Do": {
			"color": "#f1c40f",
			"icon": "fa fa-check",
			"icon": "octicon octicon-check",
			"label": _("To Do"),
			"link": "List/ToDo",
			"doctype": "ToDo",
			"type": "list"
		},
	}

Note: Module views are visible based on permissions.