浏览代码

chore: Mark globals as being part of the window object

Silences eslint
Sam Atkins 11 月之前
父节点
当前提交
d81f6e5ede
共有 3 个文件被更改,包括 6 次插入6 次删除
  1. 1 1
      src/UI/Settings/UITabPersonalization.js
  2. 4 4
      src/UI/UIDesktop.js
  3. 1 1
      src/UI/UIWindow.js

+ 1 - 1
src/UI/Settings/UITabPersonalization.js

@@ -108,7 +108,7 @@ export default {
                 puter.kv.set('menubar_style', value);
                 
                 if(value === 'system'){
-                    if(detectHostOS() === 'macos')
+                    if(window.detectHostOS() === 'macos')
                         value = 'desktop';
                     else
                         value = 'window';

+ 4 - 4
src/UI/UIDesktop.js

@@ -571,11 +571,11 @@ async function UIDesktop(options){
             window.menubar_style = 'system';
         }
 
-        if(menubar_style === 'system'){
+        if(window.menubar_style === 'system'){
             if(window.detectHostOS() === 'macos')
-                menubar_style = 'desktop';
+                window.menubar_style = 'desktop';
             else
-                menubar_style = 'window';
+                window.menubar_style = 'window';
         }
 
         // set menubar style class to body
@@ -1630,4 +1630,4 @@ window.reset_window_size_and_position = (el_window)=>{
     });
 }
 
-export default UIDesktop;
+export default UIDesktop;

+ 1 - 1
src/UI/UIWindow.js

@@ -1392,7 +1392,7 @@ async function UIWindow(options) {
             // if this is the home directory of another user, show the sharing dialog
             // --------------------------------------------------------
             let cur_path = $(el_window).attr('data-path');
-            if(countSubstr(cur_path, '/') === 1 && cur_path !== '/'+window.user.username){
+            if(window.countSubstr(cur_path, '/') === 1 && cur_path !== '/'+window.user.username){
                 let username = cur_path.split('/')[1];
 
                 const items_to_share = []