mirror of
https://github.com/HighCapable/YukiHookAPI-ProjectBuilder.git
synced 2025-09-01 08:15:27 +08:00
feat: support YukiHookAPI 1.2.0
This commit is contained in:
@@ -134,7 +134,7 @@
|
||||
<i class="mdui-icon material-icons">photo_library</i>
|
||||
<label class="mdui-textfield-label i18n">{{addResourcesHookSupport}}</label>
|
||||
<select class="mdui-select" id="support_resources_hook_select">
|
||||
<option class="i18n" value="0">{{notConfigureDefYes}}</option>
|
||||
<option class="i18n" value="0">{{notConfigureDefNo}}</option>
|
||||
<option class="i18n" value="1">{{yesOfConfigure}}</option>
|
||||
<option class="i18n" value="2">{{noOfConfigure}}</option>
|
||||
</select>
|
||||
|
@@ -178,6 +178,7 @@ const locale = {
|
||||
"later": "Later",
|
||||
"notConfigure": "Not Configured",
|
||||
"notConfigureDefYes": "Not Configured (Default Yes/Enabled)",
|
||||
"notConfigureDefNo": "Not Configured (Default No/Disabled)",
|
||||
"yesOfConfigure": "Yes/Enabled",
|
||||
"noOfConfigure": "No/Disabled",
|
||||
"version": "Version",
|
||||
@@ -312,6 +313,7 @@ const locale = {
|
||||
"later": "稍后",
|
||||
"notConfigure": "未配置",
|
||||
"notConfigureDefYes": "未配置 (默认 是/Yes)",
|
||||
"notConfigureDefNo": "未配置 (默认 否/No)",
|
||||
"yesOfConfigure": "是/Yes",
|
||||
"noOfConfigure": "否/No",
|
||||
"version": "版本",
|
||||
@@ -446,6 +448,7 @@ const locale = {
|
||||
"later": "後で",
|
||||
"notConfigure": "構成されていません",
|
||||
"notConfigureDefYes": "構成されていません (デフォルトは はい/Yes)",
|
||||
"notConfigureDefNo": "構成されていません (デフォルトは いいえ/No)",
|
||||
"yesOfConfigure": "はい/Yes",
|
||||
"noOfConfigure": "いいえ/No",
|
||||
"version": "バージョン",
|
||||
|
@@ -122,7 +122,8 @@ const transaction = {
|
||||
'HookEntry.kt': {
|
||||
annotations: {
|
||||
entryClassName: (name) => 'entryClassName = "' + name + '"',
|
||||
supportResourcesHook: (isEnabled) => 'isUsingResourcesHook = ' + (isEnabled ? 'true' : 'false')
|
||||
supportResourcesHook: (isEnabled) => 'isUsingResourcesHook = ' + (isEnabled ? 'true' : 'false'),
|
||||
supportXposedModuleStatus: (isEnabled) => 'isUsingXposedModuleStatus = ' + (isEnabled ? 'true' : 'false')
|
||||
},
|
||||
configs: {
|
||||
debugLog: {
|
||||
@@ -131,7 +132,6 @@ const transaction = {
|
||||
},
|
||||
enableDebug: (isEnabled) => 'isDebug = ' + (isEnabled ? 'true' : 'false'),
|
||||
enableResourcesCache: (isEnabled) => 'isEnableModuleAppResourcesCache = ' + (isEnabled ? 'true' : 'false'),
|
||||
enableModuleStatus: (isEnabled) => 'isEnableHookModuleStatus = ' + (isEnabled ? 'true' : 'false'),
|
||||
enableYChannel: (isEnabled) => 'isEnableDataChannel = ' + (isEnabled ? 'true' : 'false')
|
||||
}
|
||||
},
|
||||
@@ -251,6 +251,11 @@ const transaction = {
|
||||
if (configs.yukiHookApiConfig.supportResourcesHook !== 0)
|
||||
hookEntryAnnotationCode = hookEntryAnnotationCode.concat(
|
||||
codeFiles['HookEntry.kt'].annotations.supportResourcesHook(configs.yukiHookApiConfig.supportResourcesHook === 1));
|
||||
if (configs.yukiHookApiConfig.supportResourcesHook !== 0 && configs.yukiHookApiConfig.enableModuleStatus !== 0)
|
||||
hookEntryAnnotationCode = hookEntryAnnotationCode.concat(', ');
|
||||
if (configs.yukiHookApiConfig.enableModuleStatus !== 0)
|
||||
hookEntryAnnotationCode = hookEntryAnnotationCode.concat(
|
||||
codeFiles['HookEntry.kt'].annotations.supportXposedModuleStatus(configs.yukiHookApiConfig.enableModuleStatus === 1));
|
||||
if (hookEntryAnnotationCode.trim() !== '')
|
||||
hookEntryAnnotationCode = '(' + (hookEntryAnnotationCode.trim().endsWith(',') ?
|
||||
hookEntryAnnotationCode.trim().substring(0, hookEntryAnnotationCode.trim().lastIndexOf(',')) :
|
||||
@@ -276,9 +281,6 @@ const transaction = {
|
||||
if (configs.yukiHookApiConfig.enableResourcesCache !== 0)
|
||||
hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode,
|
||||
codeFiles['HookEntry.kt'].configs.enableResourcesCache(configs.yukiHookApiConfig.enableResourcesCache === 1));
|
||||
if (configs.yukiHookApiConfig.enableModuleStatus !== 0)
|
||||
hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode,
|
||||
codeFiles['HookEntry.kt'].configs.enableModuleStatus(configs.yukiHookApiConfig.enableModuleStatus === 1));
|
||||
if (configs.yukiHookApiConfig.enableYChannel !== 0)
|
||||
hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode,
|
||||
codeFiles['HookEntry.kt'].configs.enableYChannel(configs.yukiHookApiConfig.enableYChannel === 1));
|
||||
|
Reference in New Issue
Block a user