upgrading

This commit is contained in:
Rodolfo Berrios 2021-11-20 19:49:12 -03:00
parent 1e38669aa0
commit f5d33866cc
No known key found for this signature in database
GPG key ID: D3AAC2481DBDD9FE
5 changed files with 23 additions and 51 deletions

View file

@ -8,3 +8,4 @@ httpd-php-dev.yml
httpd-php.Dockerfile
httpd-php.yml
README.md
UPGRADING.md

19
UPGRADING.md Normal file
View file

@ -0,0 +1,19 @@
# Upgrading
To keep the software updated you have to simply keep the application files updated. You can update either:
* Using the built-in updater at `/dashboard` > Click **check for updates**
* Downloading a [Release](https://github.com/rodber/chevereto-free/releases) and **Extract to** the application filesystem
* (Docker) Re-creating the container based in our [updated image](https://github.com/rodber/chevereto-free/pkgs/container/chevereto-free-httpd-php)
## Upgrade to Paid
🤑 There's a paid Chevereto version which you can update from Chevereto-Free. To upgrade to paid:
* Purchase a [Chevereto License](https://chevereto.com/pricing) (if you don't have one already 💖)
* Upload the [latest release](https://chevereto.com/panel/downloads) package to your server (usually in the `public_html` folder)
* Unzip the software using your server built-in `unzip` utility
* Remove the `.zip` file
* Open your website at `/install`
Docker users check [chevereto/docker](https://github.com/chevereto/docker) and [chevereto/container-builder](https://github.com/chevereto/container-builder)

View file

@ -73,7 +73,8 @@ $route = function ($handler) {
}
$route_menu['upgrade'] = [
'label' => '<span class="btn-icon icon-star4 color-yellow"></span> <b>Upgrade</b>',
'id' => 'upgrade'
'id' => 'upgrade',
'url' => 'https://github.com/rodber/chevereto-free/blob/master/UPGRADING.md',
];
$handler::setVar('documentationBaseUrl', 'https://v3-docs.chevereto.com/');
$handler::setVar($route_prefix . '_menu', $route_menu);

View file

@ -24,41 +24,5 @@ if (is_upload_allowed() && (CHV\getSetting('upload_gui') == 'js' || G\is_route('
<?php echo CHV\getSetting('analytics_code'); ?>
<?php
if (CHV\Login::isAdmin()) {
?>
<script>
$(document).ready(function() {
$(document).on("click", "[data-action=upgrade]", function() {
PF.fn.modal.call({
template: $("[data-modal=form-upgrade]").html(),
buttons: false,
button_submit: "Upgrade now",
ajax: {
data: {action: 'upgrade'},
deferred: {
success: function(XHR) {
window.location.href = XHR.responseJSON.redir.url;
},
error: function(XHR) {
PF.fn.growl.call(XHR.responseJSON.error.message);
}
}
},
});
});
});
</script>
<div data-modal="form-upgrade" class="hidden">
<span class="modal-box-title">Upgrade</span>
<p>Upgrading to paid Chevereto enables access to all features and latest updates. This process is automated, you will only need to paste your license key.</p>
<p>All data will remain, and you can count on support assistance.</p>
<div class="btn-container"><button class="btn blue" data-action="submit" type="submit"><span class="btn-icon icon-next3"></span> Upgrade now</button> <a class="btn orange outline" href="https://chevereto.com/pricing" target="_blank"><span class="btn-icon icon-key3"></span> Purchase license</a></div>
</div>
<?php
} ?>
</body>
</html>

View file

@ -16,7 +16,7 @@ function get_docs_link($key, $subject)
}
function free_version_warning($wrap=true)
{
$message = _s("This functionality is not part of Chevereto Free. %s to obtain this feature.", ['%s' => '<a data-action="upgrade"><span class="btn-icon icon-star4 color-yellow"></span> ' . _s('Upgrade') . '</a>']);
$message = _s("This functionality is not part of Chevereto Free. %s to obtain this feature.", ['%s' => '<a href="https://github.com/rodber/chevereto-free/blob/master/UPGRADING.md"><span class="btn-icon icon-star4 color-yellow"></span> ' . _s('Upgrade to paid') . '</a>']);
echo($wrap ? ('<div class="input-below">' . $message . '</div>') : $message);
}
?>
@ -29,19 +29,6 @@ function free_version_warning($wrap=true)
<h1><?php _se('Dashboard'); ?></h1>
<?php G\Render\include_theme_file('snippets/tabs'); ?>
</div>
<script>
$(document).ready(function(e) {
$("#upgrade-link").attr("data-action", "upgrade").removeAttr("href");
var $currentTab = $("li.current", ".content-tabs");
$(document).on("click", "#upgrade-link", function(e) {
$("#upgrade-link").closest("li").removeClass("current");
var $tab_menu = $("[data-action=tab-menu]");
$tab_menu.find("[data-content=current-tab-label]").text($currentTab.text());
});
});
</script>
<?php
switch (get_dashboard()) {
case 'stats':