License Configuration
Obtaining a License
The TechUI-Prime component library is a paid product and requires authorization for full use.
The available license types are as follows:
- Commercial License: An annual subscription that allows for the issuance of a specific number of sub-licenses, all of which are valid permanently.
- Company License: A license issued specifically to a company, valid permanently.
- Project License: A license issued for a specific project, valid permanently.
- Development License: A time-limited license issued to individuals or companies with purchase intent, typically used for internal development testing.
For details on how to obtain authorization, please refer to the Authorization section.
Trial Mode Note
If authorization has not been obtained, you do not need to configure a license; the system will enter Trial Mode automatically.
Usage Method
TechUI has independently developed two types of frontend licenses: Chain License and Independent License. TechUI-Prime utilizes the Chain License, which requires @techui/prime-keychain for decryption.
It consists of three primary parts:
- license: The license body itself.
- licenseConfig: The configuration parameters for the license.
- keychain: The decryption keychain for the license.
After obtaining your license, place the license and licenseConfig into a file (e.g., license.js) as shown in the example below, to be imported by main.js.
// license.js
let license = "1HBv5t8hd33b1iAADWFD1OFU4Rfocq904cFn2b3w82aB..."
let licenseConfig = "EJ9W3h4xEP8T813R9Z0m4l0VBM5mDN8z4Rem41..."
export { license, licenseConfig };Configuration Method
To configure the license, add the following code to your main.js:
import TechUIInit from "techui-prime"
import keychain from "@techui/prime-keychain";
import { license, licenseConfig } from "./utils/license.js";
const app = createApp(App);
const params = {
// ...
license, // License Key
licenseConfig, // License Configuration Key
keychain, // Keychain
// ...
}
TechUIInit(params).then(() => {
// ...
})Verification
Once the configuration is complete, the license is passed to the Wasm module within the Core for parsing.
If the configuration is successful, you will see information similar to the following in your browser's debug console:
Authorized to: XXX
Permanently Valid | XX License | Contact: XXX