Include changelog as markdown files and show it in the about dialog

This commit is contained in:
Bernd Bestel 2019-03-09 15:54:16 +01:00
parent 8fec262184
commit 6de4b120b3
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
52 changed files with 321 additions and 25 deletions

View File

@ -0,0 +1 @@
- Added a login screen and switched to cookie/session based authentication instead of HTTP-basic-auth

View File

@ -0,0 +1,2 @@
- New feature: Habit tracking
- Fixed an issue which prevented that the databse is correctly created on unix systems

View File

@ -0,0 +1,2 @@
- New feature: Rechargeable battery management
- Improved productivity of input forms

View File

@ -0,0 +1 @@
- Improved sidebar responsiveness

View File

@ -0,0 +1,2 @@
- Allow to add anything to the shopping list, not only products
- Major project refactoring

View File

@ -0,0 +1 @@
- grocy is now fully localizable and ships by default with English and German translations

View File

@ -0,0 +1,2 @@
- New configuration option "BASE_URL" to define base installation URL (should make subdirectory installations possible, see #3)
- Added some missing translations

View File

@ -0,0 +1 @@
- Fixed login form didn't respect the configured BASE_URL

View File

@ -0,0 +1 @@
- Documented the REST API and data model, see the integrated instance of Swagger UI at [/api](https://demo-en.grocy.info/api)

View File

@ -0,0 +1 @@
- Added validation of all API requests and improved Swagger/OpenAPI description

View File

@ -0,0 +1 @@
- Basic features, mainly about a interface to record grocery purchases and consumptions

View File

@ -0,0 +1 @@
- Added a plugin system for looking up products against external services by barcode, see #6 for reference

View File

@ -0,0 +1,4 @@
- It's now possible to consume products directly from stock overview with one click
- Added due/overdue info on bateries- and habits overview (like on stock overview)
- Reworked general page layout and improved responsiveness (see #9 and thanks @d-Rickyy-b)
- Translations fixes

View File

@ -0,0 +1 @@
- Added an option to not use URL rewriting (for webservers which, however, don't support URL rewriting)

View File

@ -0,0 +1,2 @@
- On the stockoverview it's now possible to filter the products by location
- All dropdowns are now sorted alphabetically

View File

@ -0,0 +1 @@
- Bug fix for location filtering on stock overview page did not work in all browsers

View File

@ -0,0 +1,3 @@
- Upgraded Bootstrap and some other dependencies (grocy now looks even better!)
- Added Italian translation (thanks @davidoskky)
- => Demo for this language available at: https://demo-it.grocy.info

View File

@ -0,0 +1,5 @@
This was released shortly after the last release to fix a small regression bug, original changes from Version 1.13.0:
- Upgraded Bootstrap and some other dependencies (grocy now looks even better!)
- Added Italian translation (thanks @davidoskky)
- => Demo for this language available at: https://demo-it.grocy.info

View File

@ -0,0 +1,13 @@
- New feature: **Recipes**
- Organize a list of products, amounts and a description into recipes and see at a glance if everything needed is in stock or put the missing things with one click on the shopping list
- Try it live on the demo page: => https://demo-en.grocy.info/recipes
- Added norwegian translation (thanks @BlizzWave)
- Demo available at: => https://demo-no.grocy.info
- A lot of small UI improvements
- Columns in tables can now be reordered
- Show a calendar on the shopping list page (useful, at least for me)
- Table column ordering and sorting is now remembered
- Sidebar collapse state is now remembered
- Fixed datetimepicker border
- Keep the parent sidebar menu item expanded if the active page is a sub menu item
- Custom JS/CSS file names have changed [see README](https://github.com/berrnd/grocy#adding-your-own-css-or-js-without-to-have-to-modify-the-application-itself)

View File

@ -0,0 +1,9 @@
- New related project: **grocy-desktop**
- => https://github.com/berrnd/grocy-desktop
- Run grocy without a webserver just like a normal (windows) desktop application
- New "embedded mode" for grocy to help running in "desktop application mode" [see README](https://github.com/berrnd/grocy#embedded-mode)
- New datepicker shorthands and improvements
- `YYYYMMe` or `YYYYMM+` gets expanded to the end of the given month in the given year in proper notation
- Changed: `MMDD` will be expanded to the given day next year if > today
- [see README](https://github.com/berrnd/grocy#input-shorthands-for-date-fields)
- Some other small bug fixes

View File

@ -0,0 +1,8 @@
- Replaced the single user (so far defined in `/data/config.php`) with a multi-user management
- The currently defined user will automatically be migrated, please remove `HTTP_USER` and `HTTP_PASSWORD` from your config file afterwards
- For this it was necessary to delete all sessions and API keys during the migration
- Added an update script (`/update.sh`) to make updates (on Linux machines) easier
- See also ["How to update" in README](https://github.com/berrnd/grocy#how-to-update)
- Added the possibility to track who did a habit
- Added a rudimentary habit analysis possibility
- Different small UI, code and translation improvements

View File

@ -0,0 +1 @@
- General improvements, the work goes on...

View File

@ -0,0 +1,4 @@
- Basic product price tracking (can be entered on purchase, a little price history chart is shown in the product card - right side on purchase/consume/etc. pages)
- Proper pluralization of everything (for quantity units you can enter the plural form in master data)
- On all overview pages the statistics shown in the header are now updated when doing changes directly on the page (e. g. consuming a product)
- Lots of small fixes and improvements (form validation, translations - thanks for keeping the norwegian translation always updated @BlizzWave, other small bugs)

View File

@ -0,0 +1,5 @@
- The complete row is now refreshed on changes on all overview pages
- Added a checkbox to set the "never expires date" in best before date inputs (alternative to shortcut "x")
- Recipes can now have arbitrary quantity units and stock is only checked for one unit then (imagine you have sugar in "Packs" in stock but your recipe "Pancakes" needs 200 grams)
- Added a "consume this recipe button" to remove all ingredients of a recipe from stock with one click
- Other small UI changes/improvements

View File

@ -0,0 +1 @@
- Some smaller UI bug fixes and enhancements (thanks again for all the testing @BlizzWave)

View File

@ -0,0 +1,6 @@
- New feature: Tasks / To-do list
- Renamed habits to chores as this is more what it is about
- Products can now be organized in product groups, this group is also used to group the items on the shopping list (you can use this to optimize your way in the supermarket for example)
- Added an option to stay logged in permanently (checkbox on the login page)
- When the database was changed externally, the current page is automatically reloaded when there was no input for at least 50 seconds
- Fixed some minor UI bugs

View File

@ -0,0 +1,2 @@
- The colored info bars on top of all (overview)pages can now be clicked to filter the table accordingly
- Fixed some minor mostly UI related bugs

View File

@ -0,0 +1,2 @@
- Important bug fix: All forms were submitted twice when using ENTER instead of the OK/Save button
- Norwegian translation updates (thanks @BlizzWave )

View File

@ -0,0 +1,3 @@
- New optional "Night Mode" (thanks a lot @BlizzWave, can also be activated automatically by a time range - see the new dropdown menu next to the user menu)
- Docker support (thanks @talmai)
- Fixed some minor UI bugs

View File

@ -0,0 +1,6 @@
- New feature: Equipment
- Manage all your household equipment/devices in one place and have the information/instruction manual at hand when needed
- New feature: Products can now have pictures
- Add them in the product edit page
- Will be shown in the productcard (purchase/consume/etc. pages) and when you click the product name on the stock overview page (a little image icon next to the product name indicates if the product has an image)
- Recipes and the new equipment edit page now have a little editor with text formatting capabilities

View File

@ -0,0 +1,14 @@
- Added a journal for stock bookings, chore executions and battery charge cycles
- => Button in each line on the overview pages or the "Journal" button next to the headline on every overview page
- Added the possibility to undo any stock booking, chore execution and battery charge cycle
- => Button in the success popup while booking a purchase/consume/etc. or on the new journal pages (see above)
- Presets for new products are now configurable
- => "Presets for new products" button next to the headline on the products list page
- Recipes can now be nested (include a recipe into another one)
- Recipe ingredients can now be grouped together which will result in headlines per group in the rendered recipe
- => Group can be set on the recipe position edit page, demo recipe is "Pizza")
- On the stock overview page, the product card is now shown when clicking the product name
- Added option to filter by product group on stock overview page
- When auto reloading on external changes is enabled, the page is not reloaded when there is a fullscreen card active (recipe/equipment instruction manual)
- On the product-/chore-/batterycard there is now a link to the edit page of the corresponding item
- Some other minor bug fixes

View File

@ -0,0 +1,18 @@
- New feature: "Shopping list to stock workflow"
- Add a single shopping list item or all at once to stock directly from the shopping list
- There are new "stock settings" under settings menu in the top right corner
- You can enable there, that all products which have "Default best before days" set, are added without confirmation in this workflow
- => This means, you can add the whole shopping list to stock with one click, if you want
- Improved stock handling
- On consume, a specific stock item can now be picked
- A stock item can now be marked as "opened" (on the consume page or directly from stock overview, visible in the product card and on the stock overview page)
- New feature: Calendar
- Shows all upcoming product expirations, due chores, due tasks and due battery charge cycles
- New translation: French (thanks all the translators)
- As for all languages, a demo is available at: https://demo-fr.grocy.info
- Small other improvements
- Allow fraction numbers for recipe ingredients when not checked against stock and add an option to not check stock for a recipe position
- The current time can now be shown in the header (see the settings menu next to the user icon)
- Changed: Docker related things are now in a separate repository: https://github.com/grocy/grocy-docker
- Changed: Translations are now managed with Transifex: https://www.transifex.com/grocy/grocy

View File

@ -0,0 +1 @@
- Form validation and barcode input handling improvements

View File

@ -0,0 +1,2 @@
- Added a skip button when adding all shopping list items in "Shopping list to stock workflow"
- Fixed some minor UI related bugs

View File

@ -0,0 +1 @@
- All `config.php` settings can now also be set via environment variables (for [grocy-docker](https://github.com/grocy/grocy-docker))

View File

@ -0,0 +1,5 @@
- Fixed a SQL error during database migration when using SQLite >= 3.25.2
- Improved data tables loading time
- Location edit form did not work (master data)
- Quantity unit "purchase to stock factor" was not respected when putting a recipe on the shopping list or when comparing the already on the shopping list amount
- Better API response for POST routes when there is no or invalid JSON request body content

View File

@ -0,0 +1,23 @@
- Breaking change: The API has been completely reworked, please review [the documentation](https://demo-en.grocy.info/api) before updating when you are using the API
- New feature: Tare weight handling
- An option per product
- Imagine this: You have flour in jars, the jar weighs 500 grams, currently there are 1000 grams in stock, the new weight including the jar is 1100 grams - grocy can now calculate the used amount on consume/purchase/inventory automatically, you only have to enter the weighed amount including the jar (demo product to showcase this "Flour")
- Recipe improvements
- Recipes are now scalable - define per recipe for how much servings it is, change the desired servings on the fly when the recipe is displayed, ingredient amounts are scaled accordingly
- The cost of a recipe is now displayed based on the last purchase price per ingredient (recipe scaling also applies)
- When putting all missing recipe ingredients on the shopping list, it is now possible to ignore certain ingredients (in the popup when clicking the "Put missing items on shopping list" button)
- A new option per recipe to not check against the amount already on the shopping list when putting all missing ingredients on it (by default, only the amount not already on the shopping list is added, when this is enabled, always the whole missing amount will be put on the shopping list)
- On consume, there can now be tracked for which recipe it was, this is also tracked automatically when using the "Consume all ingredients needed by this recipe" button (for future statistical purposes)
- Recipes can now have pictures
- New "gallery view" for recipes (demo available at https://demo-en.grocy.info/recipes?tab=gallery)
- Stock improvements
- It is now optionally possible to have partial units in stock (option per product)
- On purchase, a different location can now be assigned (imagine you have two freezers, by default you store your pizza there, but sometimes there)
- New translations: (thanks all the translators)
- Spanish (demo available at https://demo-es.grocy.info)
- Turkish (demo available at https://demo-tr.grocy.info)
- Other improvements
- The calendar can now be shared/integrated in iCal format (button in the header on the calendar page)
- Added feature flags to hide/disable certain parts of grocy when you don't use them (for example hide "Chores" and all related UI elements, when you don't use it, see `config-dist.php`)
- Added a "Apple Touch Icon" and a "Web App Manifest" which should improve grocy on mobile devices and also enables "Add to Home screen" on major mobile browsers
- A lot of other minor small and bigger UI improvements

View File

@ -0,0 +1,6 @@
- Some small UI fixes & improvements
- Recipe ingredient notes were not displayed
- Edit/delete buttons on equipment page had no icons
- Improved the overview pages "button column" (e. g. hide more rarely used options behind a context/dropdown menu)
- Some JS files were not loaded correctly on case sensitive file systems
- The changelog is now included as markdown files (in `/changelog` directory, one file per release with a filename in format `<ReleaseNumber>_<Version>_<ReleaseDateIso>.md`) and shown in the about dialog

View File

@ -0,0 +1 @@
- Add possibility to have multiple barcodes per product

View File

@ -0,0 +1 @@
- Ready to ERP your fridge!

View File

@ -0,0 +1 @@
- Added flow to directly add products and barcodes from purchase and inventory view

View File

@ -0,0 +1,2 @@
* New feature: Shopping list (which is also automatically filled based on defined min. stock amount)
* Small UI changes for better productivity

View File

@ -0,0 +1 @@
- Added a flow to add a new product with prefilled barcode

View File

@ -0,0 +1 @@
- Added a favicon and more productivity improvements

View File

@ -5,7 +5,8 @@
"morris/lessql": "^0.3.4",
"rubellum/slim-blade-view": "^0.1.1",
"tuupola/cors-middleware": "^0.7.0",
"eluceo/ical": "^0.15.0"
"eluceo/ical": "^0.15.0",
"erusev/parsedown": "^1.7.1"
},
"autoload": {
"psr-4": {

48
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "0b203f875499dfeaa61890cdec018a2d",
"content-hash": "d11fedeb82f88d3996984cca43395a08",
"packages": [
{
"name": "container-interop/container-interop",
@ -155,6 +155,52 @@
],
"time": "2019-01-13T22:00:58+00:00"
},
{
"name": "erusev/parsedown",
"version": "1.7.1",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown.git",
"reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown/zipball/92e9c27ba0e74b8b028b111d1b6f956a15c01fc1",
"reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35"
},
"type": "library",
"autoload": {
"psr-0": {
"Parsedown": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Emanuil Rusev",
"email": "hello@erusev.com",
"homepage": "http://erusev.com"
}
],
"description": "Parser for Markdown.",
"homepage": "http://parsedown.org",
"keywords": [
"markdown",
"parser"
],
"time": "2018-03-08T01:11:30+00:00"
},
{
"name": "http-interop/http-factory",
"version": "0.3.0",

View File

@ -34,7 +34,8 @@ class SystemController extends BaseController
public function About(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
{
return $this->AppContainer->view->render($response, 'about', [
'system_info' => $this->ApplicationService->GetSystemInfo()
'system_info' => $this->ApplicationService->GetSystemInfo(),
'changelog' => $this->ApplicationService->GetChangelog()
]);
}
}

View File

@ -347,9 +347,11 @@ return array(
'Gallery' => 'Gallery',
'The current picture will be deleted when you save the recipe' => 'The current picture will be deleted when you save the recipe',
'Show product details' => 'Show product details',
'Stock journal for this product' => 'Stock journal for this product',
'Show chore details' => 'Show chore details',
'Journal for this chore' => 'Journal for this chore',
'Show battery details' => 'Show battery details',
'Journal for this battery' => 'Journal for this battery'
'Stock journal for this product' => 'Stock journal for this product',
'Show chore details' => 'Show chore details',
'Journal for this chore' => 'Journal for this chore',
'Show battery details' => 'Show battery details',
'Journal for this battery' => 'Journal for this battery',
'System info' => 'System info',
'Changelog' => 'Changelog'
);

View File

@ -497,7 +497,8 @@ $("#about-dialog-link").on("click", function()
{
bootbox.alert({
message: '<iframe height="400px" class="embed-responsive" src="' + U("/about?embedded") + '"></iframe>',
closeButton: false
closeButton: false,
size: "large"
});
});

5
public/viewjs/about.js Normal file
View File

@ -0,0 +1,5 @@
$('[data-toggle="collapse-next"]').on("click", function(e)
{
e.preventDefault();
$(this).parent().next().collapse("toggle");
});

View File

@ -27,4 +27,42 @@ class ApplicationService extends BaseService
'sqlite_version' => $sqliteVersion
);
}
public function GetChangelog()
{
$changelogItems = array();
foreach(glob(__DIR__ . '/../changelog/*.md') as $file)
{
$fileName = basename($file);
$fileNameParts = explode('_', $fileName);
$fileContent = file_get_contents($file);
$version = $fileNameParts[1];
$releaseDate = explode('.', $fileNameParts[2])[0];
$releaseNumber = intval($fileNameParts[0]);
$changelogItems[] = array(
'version' => $version,
'release_date' => $releaseDate,
'body' => $fileContent,
'release_number' => $releaseNumber
);
}
// Sort changelog items to have the changelog descending by newest version
usort($changelogItems, function($a, $b)
{
if ($a['release_number'] == $b['release_number'])
{
return 0;
}
return ($a['release_number'] < $b['release_number']) ? 1 : -1;
});
return array(
'changelog_items' => $changelogItems,
'newest_release_number' => $changelogItems[0]['release_number']
);
}
}

View File

@ -1,31 +1,64 @@
@extends('layout.default')
@section('title', $L('About grocy'))
@section('viewJsName', 'about')
@section('content')
<div class="row">
<div class="col-xs-12 col-md-6 col-xl-4 text-center">
<div class="col-xs-12 col-md-6 text-center">
<h1>@yield('title')</h1>
<p class="font-italic">
grocy is a project by
<a href="https://berrnd.de" class="discrete-link" target="_blank">Bernd Bestel</a><br>
Created with passion since 2017
</p>
<ul class="nav nav-tabs justify-content-center mt-3">
<li class="nav-item">
<a class="nav-link active" id="system-info-tab" data-toggle="tab" href="#system-info">{{ $L('System info') }}</a>
</li>
<li class="nav-item">
<a class="nav-link" id="changelog-tab" data-toggle="tab" href="#changelog">{{ $L('Changelog') }}</a>
</li>
</ul>
<p>
Version <code>{{ $version }}</code><br>
{{ $L('Released on') }} <code>{{ $releaseDate }}</code> <time class="timeago timeago-contextual" datetime="{{ $releaseDate }}"></time>
</p>
<div class="tab-content mt-3">
<div class="tab-pane show active" id="system-info">
<p>
Version <code>{{ $version }}</code><br>
{{ $L('Released on') }} <code>{{ $releaseDate }}</code> <time class="timeago timeago-contextual" datetime="{{ $releaseDate }}"></time>
</p>
<p>
PHP Version <code>{{ $system_info['php_version'] }}</code><br>
SQLite Version <code>{{ $system_info['sqlite_version'] }}</code>
</p>
</div>
<div class="tab-pane show" id="changelog">
@php $Parsedown = new Parsedown(); @endphp
@foreach($changelog['changelog_items'] as $changelogItem)
<div class="card my-2">
<div class="card-header">
<a class="discrete-link" data-toggle="collapse-next" href="#">
Version <span class="font-weight-bold">{{ $changelogItem['version'] }}</span><br>
{{ $L('Released on') }} <span class="font-weight-bold">{{ $changelogItem['release_date'] }}</span>
<time class="timeago timeago-contextual" datetime="{{ $changelogItem['release_date'] }}"></time>
</a>
</div>
<div class="collapse @if($changelogItem['release_number'] >= $changelog['newest_release_number'] - 4) show @endif">
<div class="card-body text-left">
{!! $Parsedown->text($changelogItem['body']) !!}
</div>
</div>
</div>
@endforeach
</div>
</div>
<p>
PHP Version <code>{{ $system_info['php_version'] }}</code><br>
SQLite Version <code>{{ $system_info['sqlite_version'] }}</code>
</p>
<p class="small text-muted">
grocy is a project by
<a href="https://berrnd.de" class="text-dark" target="_blank">Bernd Bestel</a><br>
Created with passion since 2017<br>
Life runs on code<br>
<a href="https://github.com/grocy/grocy" class="discrete-link" target="_blank">
<a href="https://github.com/grocy/grocy" class="text-dark" target="_blank">
<i class="fab fa-github"></i>
</a>
</p>