Coder Social home page Coder Social logo

nextcloud-libraries / nextcloud-browser-storage Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 1.0 4.47 MB

Browser storage (e.g. local storage) abstraction for Nextcloud apps https://npmjs.org/@nextcloud/browser-storage

License: GNU General Public License v3.0

JavaScript 57.58% TypeScript 42.42%
browser-storage javascript javascript-library localstorage nextcloud nextcloud-plugin

nextcloud-browser-storage's People

Contributors

christophwurst avatar dependabot[bot] avatar nextcloud-bot avatar nickvergessen avatar pytal avatar skjnldsv avatar susnux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nextcloud-browser-storage's Issues

Page local storage

To store global attributes to be shared between components (like localStorage) but that should not survive page refresh like avatar states.

Could add another option ".pageLocal()and stores it inwindow._pageLocal` or something.

I'd use this for nextcloud/spreed#4284 because when people add an avatar when they didn't have one, there is no easy way for a user to force-refresh the avatars apart from logging out

Unified/shared storage + fields e.g. for guest names

E.g. guest name was chosen to be localStorage.getItem('nick') in the past and we decided it should e.g. persist over apps, so the same value should be used in Talk, Deck, Text, etc.
Since all apps use a scoped browser storage, we need a fixed scope for shared data like this, so all apps can use the same scope.

Proposal would be server or shared and in there we use nick or guest-name?

After we agreed on this, it should be documented in the readme.

cc @juliushaertl @ChristophWurst

PS: would a getUnscopedItem function make sense, so you don't need 2 stores, one for the guest name and one for your apps data?

Please update package

Hello, please update the package on npmjs because it says unsupported engine when installing with npm.

Usage documentation

I tried to infer usage from the source code but it isn't as straightforward.

Would be good to add some usage examples in the README for volatile and persistent, and maybe best practices.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.