Tower: upload havari_license_client 16.0.1.0.0 (was 16.0.1.0.0, via marketplace)
This commit is contained in:
BIN
addons/havari_license_client/static/description/icon.png
Normal file
BIN
addons/havari_license_client/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
40
addons/havari_license_client/static/description/icon.svg
Normal file
40
addons/havari_license_client/static/description/icon.svg
Normal file
@@ -0,0 +1,40 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256">
|
||||
<defs>
|
||||
<linearGradient id="bgGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#1e3c72"/>
|
||||
<stop offset="100%" style="stop-color:#2a5298"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="shieldGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#4facfe"/>
|
||||
<stop offset="100%" style="stop-color:#00f2fe"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
|
||||
<!-- Background rounded square -->
|
||||
<rect x="8" y="8" width="240" height="240" rx="48" ry="48" fill="url(#bgGrad)"/>
|
||||
|
||||
<!-- Shield shape -->
|
||||
<path d="M128 45
|
||||
L195 70
|
||||
L195 130
|
||||
Q195 175 128 210
|
||||
Q61 175 61 130
|
||||
L61 70
|
||||
Z"
|
||||
fill="url(#shieldGrad)" opacity="0.9"/>
|
||||
|
||||
<!-- Checkmark inside shield -->
|
||||
<path d="M100 130 L120 150 L160 100"
|
||||
fill="none" stroke="white" stroke-width="12" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
|
||||
<!-- Small key icon at bottom -->
|
||||
<g transform="translate(128, 185)">
|
||||
<circle cx="0" cy="0" r="8" fill="white" opacity="0.8"/>
|
||||
<rect x="-2" y="5" width="4" height="15" rx="2" fill="white" opacity="0.8"/>
|
||||
<rect x="0" y="12" width="8" height="3" rx="1" fill="white" opacity="0.8"/>
|
||||
</g>
|
||||
|
||||
<!-- Decorative dots -->
|
||||
<circle cx="50" cy="50" r="4" fill="white" opacity="0.3"/>
|
||||
<circle cx="206" cy="50" r="4" fill="white" opacity="0.3"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
45
addons/havari_license_client/static/src/js/license_bus.js
Normal file
45
addons/havari_license_client/static/src/js/license_bus.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { browser } from "@web/core/browser/browser";
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
/**
|
||||
* License Bus Service
|
||||
* Listens for license status updates from the server and reloads the page when needed.
|
||||
*/
|
||||
export const licenseBusService = {
|
||||
dependencies: ["bus_service", "notification"],
|
||||
|
||||
start(env, { bus_service, notification }) {
|
||||
// Subscribe to license status updates
|
||||
bus_service.subscribe("license/status_update", (payload) => {
|
||||
console.log("License status update received:", payload);
|
||||
|
||||
const { module_name, action, state, message, requires_reload } = payload;
|
||||
|
||||
// Show notification to user
|
||||
if (action === "suspend" || action === "revoke") {
|
||||
notification.add(message || `License for ${module_name} has been ${state}`, {
|
||||
title: "License Status Changed",
|
||||
type: "danger",
|
||||
sticky: true,
|
||||
});
|
||||
|
||||
// Reload page after 3 seconds to apply changes
|
||||
if (requires_reload) {
|
||||
setTimeout(() => {
|
||||
browser.location.reload();
|
||||
}, 3000);
|
||||
}
|
||||
} else if (action === "activate") {
|
||||
notification.add(message || `License for ${module_name} has been activated`, {
|
||||
title: "License Activated",
|
||||
type: "success",
|
||||
sticky: false,
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
registry.category("services").add("license_bus", licenseBusService);
|
||||
Reference in New Issue
Block a user