def setup_widget_maps(self): # 위젯 <-> settings key 매핑 self.widget_map = { # 관리자 "admin_toggle": { "key": "admin/admin_toggle", # 관리자 여부 토글 "state_key": "is_admin", "dependents": { "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "admin_id_input": { "key": "admin/admin_id_input", # 관리자 ID 입력 "state_key": "admin_id", "dependents": { "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "admin_pw_input": { "key": "admin/admin_pw_input", # 관리자 PW 입력 "state_key": "admin_pw", "dependents": { "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "user_id_input": { "key": "admin/user_id_input", # 직원 ID 입력 "state_key": "user_id", "dependents": { "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "user_pw_input": { "key": "admin/user_pw_input", # 직원 PW 입력 "state_key": "user_pw", "dependents": { "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, # 글로벌 "collect_method_combo": { "key": "global/collect_method", "type": "data", # 또는 "text" "state_key": "collect_method", "dependents": { "api": [], "lens": [] }, "visible": { "api": ["client_id_input", "client_secret_input", "client_id_label", "client_secret_label"], "lens": [] } }, "client_id_input": { "key": "global/client_id_text", # 쇼핑검색API 클라이언트ID "state_key": "clientID", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "client_secret_input": { "key": "global/client_secret_text", # 쇼핑검색API 클라이언트 secret "state_key": "clientSecret", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "client_id_label": { "key": "global/client_id_text_label", # 쇼핑검색API 클라이언트ID 라벨 "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "client_secret_label": { "key": "global/client_secret_text_label", # 쇼핑검색API 클라이언트 secret 라벨 "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "ocr_toggle": { "key": "global/ocr_enabled", # OCR 기능 사용 여부 "dependents": { # ON/OFF별 enable 위젯 리스트 "state_key": "ocr", "on": ["unwanted_words_button"], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": ["unwanted_words_button_label", "unwanted_words_button"], "off": [], } }, "unwanted_words_button": { "key": "global/unwanted_words_button_enabled", # OCR 토글에 따른 버튼 사용 여부 "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "unwanted_words_button_label": { "key": "global/unwanted_words_button_label", # OCR 토글에 따른 버튼 사용 여부 "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "debug_toggle": { "key": "global/debug_enabled", # 디버그 사용 여부 "state_key": "debug", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, # 상품명 "title_toggle": { "key": "title/title_enabled", # 상품명 AI 수정 사용 여부 "state_key": "title", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": ["title_trans_type_toggle_label", "title_trans_type_toggle"], "off": [], } }, "title_trans_type_toggle": { "key": "title/title_trans_type_enabled", # 상품명 수정을 위한 번역엔진 설정 "state_key": "title_trans_type", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "title_trans_type_toggle_label": { "key": "title/title_trans_type_label", # 상품명 수정을 위한 번역엔진 라벨 "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "cat_rec_toggle": { "key": "title/cat_rec_enabled", # 카테고리 추천버튼 클릭 여부 "state_key": "cat_rec", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "title_shuffle_toggle": { "key": "title/title_shuffle_enabled", # 카테고리 추천버튼 클릭 여부 "state_key": "title_shuffle", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "keyword_fix_toggle": { "key": "title/keyword_fix_toggle", # 키워드 고정 여부 "state_key": "fixed_keywords", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": ["keyword_fix_count_input"], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "keyword_fix_count_input": { "key": "title/keyword_fix_count_input_enabled", # 키워드 고정시 고정숫자 설정 "state_key": "fixed_keywords_count", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "title_length_limit_input": { "key": "title/title_length_limit_input_enabled", # 상품명 최대 길이 설정 "state_key": "title_length_limit", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, # 옵션 "optionTrnas_toggle": { "key": "option/option_trans_enabled", # 옵션 번역 사용 여부 "state_key": "option_trans", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "optionIMGTrans_toggle": { "key": "option/option_img_trans_enabled", # 옵션 이미지 번역 사용 여부 "state_key": "optionIMGTrans", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": ["optionIMGTrans_type_toggle_label", "optionIMGTrans_type_toggle"], "off": [], } }, "optionIMGTrans_type_toggle": { "key": "option/option_img_trans_type_enabled", # 옵션 이미지 번역 타입 설정 "state_key": "optionIMGTrans_type", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "optionIMGTrans_type_toggle_label": { "key": "option/option_img_trans_type_label", # 옵션 이미지 번역 타입 라벨 "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "optionAutoSelect_toggle": { "key": "option/option_auto_select_enabled", # 옵션 자동 선택 사용 여부 "state_key": "optionAutoSelect", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": ["max_option_count_input"], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "max_option_count_input": { "key": "option/max_option_count_input_enabled", # 옵션 최대 개수 설정 "state_key": "max_option_count", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, # 태그 "tag_toggle": { "key": "tag/tag_toggle", # 태그 수정 사용 여부 "state_key": "tag", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, # 가격 "price_toggle": { "key": "price/price_toggle", # 가격 수정 사용 여부 "state_key": "price", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": ["cmb_button"], "off": [], } }, "remove_overprice_toggle": { "key": "price/remove_overprice_toggle", # 가격초과 옵션 제거 사용 여부 "state_key": "remove_overprice", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "cmb_button": { "key": "price/cmb_button", # 가격설정 다이알로그 버튼 "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, # 썸네일 "thumb_toggle": { "key": "thumb/thumb_toggle_enabled", # 썸네일 번역 사용 여부 "state_key": "thumb", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": ["thumb_trans_type_toggle_label", "thumb_trans_type_toggle"], "off": [], } }, "thumb_trans_type_toggle": { "key": "thumb/thumb_trans_type_enabled", # 썸네일 번역 타입 설정 "state_key": "thumb_trans_type", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "thumb_trans_type_toggle_label": { "key": "thumb/thumb_trans_type_label", # 썸네일 번역 타입 라벨 "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "thumb_nukki_toggle": { "key": "thumb/thumb_nukki_enabled", # 썸네일 배경제거 사용 여부 "state_key": "thumb_nukki", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": ["thumb_rmb_count_input"], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "thumb_rmb_count_input": { "key": "thumb/thumb_rmb_count_input_enabled", # 썸네일 배경제거 사용 여부 "state_key": "thumb_rmb_count", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "nukki_server_toggle": { "key": "thumb/nukki_server_toggle", # 누끼 서버 사용 여부 "state_key": "use_local_rembg", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, # 상세페이지 "detail_Option_toggle": { "key": "detail/detail_option_toggle", # 상세페이지 옵션 사용 여부 "state_key": "detailOption", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": ["detail_text_button"], "off": [], } }, "detail_text_button": { "key": "detail/detail_text_button", # 상세페이지 텍스트 수정 버튼 "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "detail_IMGTrans_toggle": { "key": "detail/detail_img_trans_enabled", # 상세페이지 이미지 번역 사용 여부 "state_key": "detailIMGTrans", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": ["detail_IMGTrans_type_toggle_label", "detail_IMGTrans_type_toggle"], "off": [], } }, "detail_IMGTrans_type_toggle": { "key": "detail/detail_img_trans_type_toggle", # 상세페이지 이미지 번역 타입 토글 "state_key": "detailIMGTrans_type", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "detail_IMGTrans_type_toggle_label": { "key": "detail/detail_img_trans_type_label", # 상세페이지 이미지 번역 타입 라벨 "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "watermark_toggle": { "key": "detail/watermark_enabled", # 상세페이지 이미지 워터마크 사용 여부 "state_key": "watermark", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": ["watermark_text_input", "opacity_percent_input"], "off": [], }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "watermark_text_input": { "key": "detail/watermark_text_input", # 상세페이지 이미지 워터마크 텍스트 "state_key": "watermark_text", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, "opacity_percent_input": { "key": "detail/opacity_percent_input", # 상세페이지 이미지 워터마크 투명도 설정 "state_key": "opacity_percent", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": [], "off": [], } }, # 기타 "discord_notify_toggle": { "key": "etc/discord_notify_toggle", # 디스코드 알림 사용 여부 "state_key": "discord", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, "visible": { # ON/OFF별 visible 위젯 리스트 "on": ["webhook_input_label", "webhook_input"], "off": [], } }, "webhook_input_label": { "key": "etc/webhook_input_label", # 디스코드 웹훅 입력 라벨 "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, }, "webhook_input": { "key": "etc/webhook_input", # 디스코드 웹훅 입력 "state_key": "discord_webhook", "dependents": { # ON/OFF별 enable 위젯 리스트 "on": [], "off": [] }, }, } self.toggle_states = { 'title': False, 'title_shuffle': False, 'title_trans_type': False, 'collect_method_combo': "api", 'ocr': False, 'optionTrnas': False, 'optionIMGTrans': False, 'optionIMGTrans_type': False, 'optionAutoSelect': False, 'price': False, 'tag': False, 'thumb': False, 'thumb_trans_type': False, 'thumb_nukki': False, 'detail_Option': False, 'detail_IMGTrans': False, 'detail_IMGTrans_type': False, 'debug_mode': False, 'ed_mode': False, 'discord': False, 'watermark': False, 'clientID': "", 'clientSecret': "", 'discord_webhook': "", 'watermark_text': "구대", 'thumb_rmb_count': 3, 'max_option_count': 3, 'opacity_percent': 50, 'group_index': 1, 'remove_overprice': False, # 가격초과제외 기능 'cat_rec': False, # 카테 추천 기능 'fixed_keywords': False, # 키고정 기능 'fixed_keywords_count': 3, # 키고정 개수 기본값 'title_length_limit': 35, # 상품명 최대 길이 }