Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch space from online+local to local only after creation #697

Open
3 tasks done
bf39l opened this issue Apr 28, 2024 · 1 comment
Open
3 tasks done

Switch space from online+local to local only after creation #697

bf39l opened this issue Apr 28, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@bf39l
Copy link

bf39l commented Apr 28, 2024

Have you read a contributing guide?

  • I have read CONTRIBUTING.md
  • I have searched the existing requests and didn't find any that were similar
  • I have considered creating a pull request instead and want to proceed

Clear and concise description of the problem

Hi Anytype team first thing first, thank you so much for providing 1GB cloud file storage for online spaces!
I am new to Anytype about 3 days and I am not entirly sure I did correct things. But just quickly show you guys how "dumb" I was

  • My originally idea was keeping my data entirely in "local" then I sync my data by myself with eg: google drive (I know this sounds dumb)
  • I don't think I got abilities to self host the anytype heart etc at the moment
  • I "accidentally" created an online+local spaces at software "on-board" stage since I did not notice the "Gear" button.
  • I have to "export" the whole anytype spaces and recreate "vault" with local only then import the space back
  • After creating the local vault, I realised the data was stored at (macOS) ~/Library/Application Support/anytype/data and I forgot to change the location and I lost the chance to change with UI.
  • I "export" -> "re-create local only" + "correct user data path" -> "import" and finally got everything looks correct (for me).

So just wondering would that be possible to let user

  1. would that be possible to let user change user data location after creation?
  2. switching space(s) between online+local to local-only after creation?
  3. (optional) would that be possible to make local-only more obvious at on-board stage?

Suggested solution

I am not TS/Electron developer so please bearing with my shallow knowledge on that.

  1. let user change user data location after creation?
    I read a bit with the source code and added a new "Change" button right next to "Open" button in settings page
    anytype-ts/src/ts/component/popup/page/settings/data.tsx
...
// line 58
<Button color="blank" className="c28" text={translate(`commonOpen`)} onClick={this.onOpenDataLocation} />
<Button color="blank" className="c28" text={translate(`commonChange`)} onClick={this.onChangeDataLocation.bind(this)} />
...

I copied over from codes in other places and make the onclick handler like so

    onChangeDataLocation () {
        const onConfirm = () => {
            const cb = (paths: string[]) => {
                Renderer.send('setUserDataPath', paths[0]);
                Renderer.send('exit', "", true);
            }
	   Action.openDir({}, cb);
	};
    };

I tested with online+local spaces, it does change to user data to the new place after restarting and user data also re-sync down.
but surely there are lots of things missing eg:

  1. switching space(s) between online+local to local-only after creation?
    I think this would be the toggle button in space settings page?
    as far as I understand local-only spaces does not have network id. I though sync everything down for targe space remove the network id from space would work?

  2. (optional) would that be possible to make local-only more obvious at on-board stage?
    I did not try the mobile/windows/linux versions of anytype, for mac desktop version on-board stage, would that be possible to make drop down list for vault config instead of the Gear button on top right of window?

Alternative

No response

Additional context

No response

@bf39l bf39l added the enhancement New feature or request label Apr 28, 2024
@ra3orblade
Copy link
Contributor

Hello, we have decided to no include such logic as it may lead to these consequences that you have described and it can harm your account as you need to restart middleware when you change the folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants