os-js / osjs-filemanager-application

OS.js File Manager Application

Home Page:https://manual.os-js.org/v3/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to make filesystem live only on client side?

Q5Ca opened this issue · comments

I want to disable default mountpoints which live on server side (OS.js and Home) and create filesystem which live only on client side and read-only.
How can I implement that? I tried the solution on #24 but it didnt work.

Could you show me what you tried ? Because the solution in #24 should work just fine.

I changed the following lines in index.js:

const init = () => {
  const osjs = new Core(config, {
    omit: ['vfs.mountpoints']
  });

and config.js:

import wallpaper from './1.jpg';

export default {
  auth: {
    login: {
      username: 'demo',
      password: 'demo'
    }
  },
  vfs: {
    mountpoints: [{
      name: 'apps',
      label: 'Applications',
      adapter: 'apps',
      attributes: {
        visibility: 'restricted',
        readOnly: true
      }
    }, {
      name: 'osjs',
      label: 'OS.js',
      adapter: 'system',
      icon: {name: 'folder-publicshare'}
    }, {
      name: 'home',
      label: 'Home',
      adapter: 'system',
      icon: {name: 'user-home'}
    }],
  },
  desktop: {
    settings: {
      font: 'Roboto',
      theme: 'StandardTheme',
      sounds: 'FreedesktopSounds',
      icons: 'GnomeIcons',
      panels: [{
        position: 'top',
        items: [
          { name: 'menu' },
          { name: 'windows' },
          { name: 'tray' },
          { name: 'clock' }
        ]
      }],
      background: {
        src: wallpaper,
        color: '#000',
        style: 'cover'
      }
    }
  }
};

But the mountpoints still exists:
image

You have all of the mountpoints defined in your client config though. Remove the ones you don't wont from there, then re-build and it should be like you expect.

Okay it worked. Thank you!
And it was written in the documentation already :) So for anyone encounter the same problem, here FYI: https://manual.os-js.org/config/#caveats

Great! :)