app_cache.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ;(function (){
  2. const
  3. local_storage = require('local-storage'),
  4. transfer = require('transfer')
  5. ;
  6. let cache = {
  7. cur_user: {
  8. },
  9. shareBcrumbs: [{
  10. id: '',
  11. text: "分享文件"
  12. }],
  13. myShareBcrumbs: [{
  14. id: '',
  15. text: "我的分享"
  16. }],
  17. breadcrumbs: [{
  18. id: '0',
  19. text: "我的云盘"
  20. }],
  21. use_space: {},
  22. historys: [],
  23. file_show_type: false,
  24. storage_left_menu: true,
  25. share_left_menu: true,
  26. storage_left_btn: true,
  27. share_left_btn: true,
  28. task_panel: 'complete',
  29. task_controller: 'task.complete',
  30. share_config:{
  31. limitShareData : 300
  32. },
  33. local_config: function () {
  34. let config = Object.assign(
  35. {
  36. close:{
  37. type : 'min',
  38. default:false
  39. },
  40. down_setting: {
  41. 'default': false,
  42. 'path': 'C:\\'
  43. },
  44. task: {
  45. down_num:3,
  46. upload_num: 3
  47. }
  48. },
  49. local_storage.get('local_config')
  50. );
  51. config.task.down_num = 3;
  52. config.task.upload_num = 3;
  53. config.down_setting.path = config.down_setting.path||'C:\\';
  54. return config ;
  55. }
  56. };
  57. transfer.cache = cache;
  58. }())