sys_default.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. from .args import p_args
  2. class ConfigSecretRelease:
  3. """ 加密相关配置 """
  4. passwd_salt = p_args['app_secret']
  5. wtf_secret = p_args['app_secret']
  6. class ConfUserRelease:
  7. """ 用户信息相关配置 """
  8. default_score = 10
  9. default_reputation = 300
  10. max_rubbish_week = 34
  11. limit_rubbish_week = 50
  12. max_score = 500 # 积分上限为500分
  13. class ConfigSystemRelease:
  14. """ 系统信息相关配置 """
  15. base_location = "KZ"
  16. search_reset_time = 10 # 搜索间隔的时间
  17. show_uid_len = 12 # 展示uid的长度
  18. show_gid_len = 12 # 展示uid的长度
  19. about_info = f'''
  20. HGSSystem is Garbage Sorting System
  21. HGSSystem 版权归属 SuperHuan
  22. 作者: SongZihuan[SuperHuan]
  23. 项目托关于 Github 平台
  24. '''.strip()
  25. class ConfigSystemTest(ConfigSystemRelease):
  26. """ 系统信息相关配置 """
  27. search_reset_time = 1 # 搜索间隔的时间
  28. about_info = f'''
  29. HGSSystem is Garbage Sorting System
  30. HGSSystem 版权归属 SuperHuan
  31. 作者: SongZihuan[SuperHuan]
  32. 开发者模式
  33. 项目托关于 Github 平台
  34. '''.strip()
  35. class ConfigTkinterRelease:
  36. """ tkinter 相关配置 """
  37. tk_refresh_delay = 50 # 延时任务的时间
  38. tk_second_win_bg = "#fffffb" # tkinter 第二窗口 标准颜色
  39. tk_win_bg = "#F0FFF0" # tkinter 一般窗口 标准颜色 蜜瓜绿
  40. tk_btn_bg = "#dcdcdc" # tkinter 按钮 标准颜色
  41. ConfigTkinter = ConfigTkinterRelease
  42. ConfigSystem = ConfigSystemTest if p_args['run'] == 'test' else ConfigSystemRelease
  43. ConfUser = ConfUserRelease
  44. ConfigSecret = ConfigSecretRelease