Hide OS.js folder from view in File Manager
rocheston opened this issue · 7 comments
Try the following in your src/client/index.js
and do a rebuild:
const osjs = new Core(config, {});
// Right after line above
const foundMount = osjs.config.vfs.mountpoints.find((mount) => mount.name === 'osjs')
if (foundMount) {
foundMount.enabled = false
}
I configured this in src/client/index.js. Rebuild. Now the login screen does not show up. I only see the blank desktop wallpaper and nothing else. Mysql database is used for authentication. Here is the index.js
`import {
Core,
CoreServiceProvider,
DesktopServiceProvider,
VFSServiceProvider,
NotificationServiceProvider,
SettingsServiceProvider,
AuthServiceProvider
} from '@osjs/client';
import {PanelServiceProvider} from '@osjs/panels';
import {GUIServiceProvider} from '@osjs/gui';
import {DialogServiceProvider} from '@osjs/dialogs';
import config from './config.js';
import './index.scss';
const init = () => {
const osjs = new Core(config, {});
const foundMount = osjs.config.vfs.mountpoints.find((mount) => mount.name === 'os.js')
if (foundMount) {
foundMount.enabled = false
}
// Register your service providers
osjs.register(CoreServiceProvider);
osjs.register(DesktopServiceProvider);
osjs.register(VFSServiceProvider);
osjs.register(NotificationServiceProvider);
osjs.register(SettingsServiceProvider, {before: true});
osjs.register(AuthServiceProvider, {before: true});
osjs.register(PanelServiceProvider);
osjs.register(DialogServiceProvider);
osjs.register(GUIServiceProvider);
osjs.boot();
};
window.addEventListener('DOMContentLoaded', () => init());
`
Check devtools for errors.
Safari devtools console:
TypeError: undefined is not an object (evaluating 'osjs.config.vfs.mountpoints')
init — index.js:22
Line 22: const foundMount = osjs.config.vfs.mountpoints.find((mount) => mount.name === 'osjs')
Looks like the system does not recognize osjs. I tried even renaming OS.js. Still no go.
It should be configuration
, not config
. That's where the undefined value comes from.
Nice!