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