Comments (7)
Sounds like a good addition, the documentation for writing files is here, you may be able to find something useful.
from cookbook.
@Luticus I can't find anything on the topic here: https://docs.nextcloud.com/server/latest/developer_manual/search.html?q=revision&check_keywords=yes&area=default
Are you aware of any other words that describe this feature?
from cookbook.
I'm definitely not a Nextcloud app developer but that's my best guess.
from cookbook.
Is it possible to edit an entry instead of deleting and adding it when they get updated?
Currently when a entry is updated the file gets deleted and written. I'm not surprised that nextcloud cannot keep revisions of such behavior.
from cookbook.
@Teifun2 Aha, you've got a point. The change would be in the lib/Service/RecipeService::updateRecipe
method
from cookbook.
I looked into it a little further and i noticed that the RecipeService::addRecipe already has the capabilities to deal with an "existing" Recipe.
To me it seems we could just remove the delete statement and the files should be updated instead of replaced.
I tried it on my local instance and it worked but my testing was rather minor. The File had a revision and there was no duplication just by removing the line with $this->service->deleteRecipe($id);
.
It would be greate if somone else could test that, because i'm unsure if i understand all the implications that might have. @mrzapp
from cookbook.
@Teifun2 that's our culprit! The reason for that delete statement was so we could clear the image cache, which no longer works as it used to, so the delete statement is redundant.
Feel free to make the change and merge it into develop
. I will test all issues afterwards and push a new release.
from cookbook.
Related Issues (20)
- Replace Markdown library with Nextcloud NcRichText component
- Check operations for correct exception handling HOT 3
- Fail to download images HOT 1
- Shareing of Recipts collections HOT 2
- Link other recipies HOT 3
- Enhance admin documentation
- Food Shopping List would be fantastic! No Issues, I love it! HOT 1
- Add Typescript support
- unable to activate/download after NC28 upgrade HOT 7
- NC28 update breaks cookbook website - remains empty in browser HOT 4
- Bulk-assign recipes to tags/categories
- changing image url does not change displayed image HOT 2
- Print feature - picture and ingredients - but no method HOT 1
- [FEATURE REQUEST] Add "Sub-Section" text to Ingredients and Instructions sections HOT 1
- Import recipe from copy-paste (text) HOT 4
- "I made this" button HOT 1
- Jump to new ingredient when pressing Enter/Return in ingredient text box HOT 1
- Fix regression introduced with Typescript HOT 3
- If edited multiple time (for example 4 times), the JSON file store multiple times (4 times) the different version of the Recipe HOT 3
- When creating a recipe or editing is , it randomly not save the last ingredient or the last instruction (or both) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookbook.