https://github.com/vokseverk/vokseverk.versionnumber
A property editor for a version number (e.g. 4.3 or 8.13.9)
https://github.com/vokseverk/vokseverk.versionnumber
property-editor umbraco
Last synced: 20 days ago
JSON representation
A property editor for a version number (e.g. 4.3 or 8.13.9)
- Host: GitHub
- URL: https://github.com/vokseverk/vokseverk.versionnumber
- Owner: vokseverk
- License: mit
- Created: 2021-02-26T14:43:19.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-04T12:40:59.000Z (about 2 years ago)
- Last Synced: 2024-08-31T17:17:59.994Z (8 months ago)
- Topics: property-editor, umbraco
- Language: C#
- Homepage: https://our.umbraco.com/packages/backoffice-extensions/version-number/
- Size: 139 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Version Number for Umbraco
This property editor for Umbraco v10 shows two or three "number" inputs
combined to display a typical version number with major, minor and revision
digits/parts.The configuration allows for displaying only the major and minor
or all three, depending on how granular the version your particular document
type should display.The included `PropertyValueConverter` makes sure to return the value as a `System.Version`.
## Screenshots
### Editor

### Configuration

## Rendering
The raw value is a JSON object with the individual segments, e.g.:
```json
{
"major": 7,
"minor": 15,
"revision": 5
}
```Using the `PropertyValueConverter` you get either the full version number or
any of its parts, like this:```razor
- Full version
- @(Model.VersionNumber)
- Major
- @Model.VersionNumber.Major
- Minor
- @Model.VersionNumber.Minor
- Revision
- @Model.VersionNumber.Build
```
(If the editor is configured to not use the *Revision* number, the `.Build`
property is returned as `-1` and the full version only has the major and minor
parts.)
## Developing & Building
On macOS you can run the `nuget-build.sh` script from the terminal, which will
build a .nupkg file in the `dist` folder.