| 1 | /** |
| 2 | * 浏览器插件相关常量定义 |
| 3 | */ |
| 4 | |
| 5 | /** |
| 6 | * 默认轮询间隔(毫秒) |
| 7 | */ |
| 8 | export const DEFAULT_POLLING_INTERVAL = 2000 |
| 9 | |
| 10 | /** |
| 11 | * 插件下载链接配置 |
| 12 | */ |
| 13 | export const PLUGIN_DOWNLOAD_LINKS = { |
| 14 | chrome: |
| 15 | 'https://chromewebstore.google.com/detail/aitoearn-extension/hnmocdhmnfgcjnedmdgfefcobideaeja', |
| 16 | china: 'https://ai-to-earn.oss-cn-beijing.aliyuncs.com/comment/aitoearn-extension.crx', |
| 17 | github: 'https://github.com/yikart/AiToEarn/releases/download/v2.1.0/aitoearn-extension.crx', |
| 18 | } as const |
| 19 | |
| 20 | /** |
| 21 | * 小红书创作者后台地址 |
| 22 | */ |
| 23 | export const XHS_CREATOR_URL = 'https://creator.xiaohongshu.com/' |
| 24 | |
| 25 | /** |
| 26 | * 插件状态国际化 key 映射 |
| 27 | */ |
| 28 | export const PLUGIN_STATUS_I18N_KEY = { |
| 29 | UNKNOWN: 'plugin:status.unknown', |
| 30 | CHECKING: 'plugin:status.checking', |
| 31 | READY: 'plugin:status.ready', |
| 32 | INSTALLED_NO_PERMISSION: 'plugin:status.installedNoPermission', |
| 33 | NOT_INSTALLED: 'plugin:status.notInstalled', |
| 34 | // 兼容旧代码 |
| 35 | CONNECTED: 'plugin:status.ready', |
| 36 | } as const |
| 37 | |
| 38 | /** |
| 39 | * 发布阶段国际化 key 映射 |
| 40 | */ |
| 41 | export const PUBLISH_STAGE_I18N_KEY = { |
| 42 | download: 'plugin:stage.download', |
| 43 | upload: 'plugin:stage.upload', |
| 44 | publish: 'plugin:stage.publish', |
| 45 | complete: 'plugin:stage.complete', |
| 46 | error: 'plugin:stage.error', |
| 47 | } as const |
| 48 | |
| 49 | /** |
| 50 | * 错误消息国际化 key |
| 51 | */ |
| 52 | export const ERROR_MESSAGE_I18N_KEY = { |
| 53 | PLUGIN_NOT_INSTALLED: 'plugin:error.pluginNotInstalled', |
| 54 | PUBLISHING_IN_PROGRESS: 'plugin:error.publishingInProgress', |
| 55 | LOGIN_FAILED: 'plugin:error.loginFailed', |
| 56 | PUBLISH_FAILED: 'plugin:error.publishFailed', |
| 57 | } as const |
| 58 | |
| 59 | /** |
| 60 | * 任务状态国际化 key 映射 |
| 61 | */ |
| 62 | export const TASK_STATUS_I18N_KEY = { |
| 63 | pending: 'plugin:common.pending', |
| 64 | publishing: 'plugin:common.publishing', |
| 65 | completed: 'plugin:common.completed', |
| 66 | error: 'plugin:common.error', |
| 67 | } as const |
| 68 |