mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
added support button
This commit is contained in:
parent
064537b8a6
commit
db691a5dd8
@ -3,6 +3,7 @@ import * as antd from "antd"
|
|||||||
import { SliderPicker } from "react-color"
|
import { SliderPicker } from "react-color"
|
||||||
import { Translation } from "react-i18next"
|
import { Translation } from "react-i18next"
|
||||||
import classnames from "classnames"
|
import classnames from "classnames"
|
||||||
|
import config from "config"
|
||||||
|
|
||||||
import AuthModel from "models/auth"
|
import AuthModel from "models/auth"
|
||||||
|
|
||||||
@ -17,6 +18,16 @@ const SettingsList = await getSettingsList()
|
|||||||
import "./index.less"
|
import "./index.less"
|
||||||
|
|
||||||
const extraMenuItems = [
|
const extraMenuItems = [
|
||||||
|
{
|
||||||
|
id: "donate",
|
||||||
|
label: "Support us",
|
||||||
|
icon: "Heart",
|
||||||
|
props: {
|
||||||
|
style: {
|
||||||
|
color: "#f72585"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: "logout",
|
id: "logout",
|
||||||
label: "Logout",
|
label: "Logout",
|
||||||
@ -26,6 +37,11 @@ const extraMenuItems = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
const menuEvents = {
|
const menuEvents = {
|
||||||
|
"donate": () => {
|
||||||
|
if (config.fundingLink) {
|
||||||
|
window.open(config.fundingLink, "_blank")
|
||||||
|
}
|
||||||
|
},
|
||||||
"logout": () => {
|
"logout": () => {
|
||||||
antd.Modal.confirm({
|
antd.Modal.confirm({
|
||||||
title: "Logout",
|
title: "Logout",
|
||||||
@ -493,10 +509,10 @@ const generateMenuItems = () => {
|
|||||||
const children = ordererItems.map((item) => {
|
const children = ordererItems.map((item) => {
|
||||||
return {
|
return {
|
||||||
key: item.id,
|
key: item.id,
|
||||||
label: <>
|
label: <div {...item.props}>
|
||||||
{createIconRender(item.icon ?? "Settings")}
|
{createIconRender(item.icon ?? "Settings")}
|
||||||
{item.label}
|
{item.label}
|
||||||
</>,
|
</div>,
|
||||||
type: "item",
|
type: "item",
|
||||||
danger: item.danger,
|
danger: item.danger,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user