moved onctext definitions in mzta-utils.js
This commit is contained in:
parent
0b62350138
commit
5c2e7a63f6
2 changed files with 8 additions and 3 deletions
|
|
@ -19,14 +19,14 @@
|
|||
// Some original methods are derived from https://github.com/ali-raheem/Aify/blob/cfadf52f576b7be3720b5b73af7c8d3129c054da/plugin/html/actions.js
|
||||
|
||||
import { getPrompts } from './mzta-prompts.js';
|
||||
import { getLanguageDisplayName } from './mzta-utils.js'
|
||||
import { getLanguageDisplayName, getMenuContextCompose, getMenuContextDisplay } from './mzta-utils.js'
|
||||
|
||||
export class mzta_Menus {
|
||||
|
||||
allPrompts = [];
|
||||
openChatGPT = null;
|
||||
menu_context_compose = 'compose_action_menu';
|
||||
menu_context_display = 'message_display_action_menu';
|
||||
menu_context_compose = null;
|
||||
menu_context_display = null;
|
||||
menu_listeners = {};
|
||||
|
||||
rootMenu = [
|
||||
|
|
@ -34,6 +34,8 @@ export class mzta_Menus {
|
|||
];
|
||||
|
||||
constructor(openChatGPT) {
|
||||
this.menu_context_compose = getMenuContextCompose();
|
||||
this.menu_context_display = getMenuContextDisplay();
|
||||
this.openChatGPT = openChatGPT;
|
||||
this.allPrompts = [];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export const getMenuContextCompose = () => 'compose_action_menu';
|
||||
export const getMenuContextDisplay = () => 'message_display_action_menu';
|
||||
|
||||
|
||||
export function getLanguageDisplayName(languageCode) {
|
||||
const languageDisplay = new Intl.DisplayNames([languageCode], {type: 'language'});
|
||||
|
|
|
|||
Loading…
Reference in a new issue