Skip to content

Commit c4294c0

Browse files
committed
0.1.4.7
1 parent b3f0aa8 commit c4294c0

31 files changed

+614
-154
lines changed

data/localizations/ar_AR.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"source_target_path_empty_msg": "مسار المصدر أو الهدف فارغ",
7373
"target_path_empty_msg": "مسار الهدف فارغ",
7474
"treasury_created_msg": "تم إنشاء خزانة النماذج.",
75-
"close_running_projects": "أغلق جميع المشاريع الجارية قبل متابعة العملية."
75+
"close_running_projects": "أغلق جميع المشاريع الجارية قبل متابعة العملية.",
76+
"warn_perm_del": "تحذير ستؤدي هذه العملية إلى حذف النماذج والنتائج الموجودة في هذا الموقع نهائيًا",
77+
"warn_cannot_be_recovered": "ولا يمكن استعادتها.",
78+
"sure_want_to_continue": "هل أنت متأكد أنك تريد المتابعة؟"
7679
}

data/localizations/de_DE.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"source_target_path_empty_msg": "Quell- oder Zielpfad ist leer",
7373
"target_path_empty_msg": "Zielpfad ist leer",
7474
"treasury_created_msg": "Das Modellschatzamt wurde erstellt.",
75-
"close_running_projects": "Schließen Sie alle laufenden Projekte, bevor Sie den Vorgang fortsetzen."
75+
"close_running_projects": "Schließen Sie alle laufenden Projekte, bevor Sie den Vorgang fortsetzen.",
76+
"warn_perm_del": "WARNUNG Diese Aktion löscht dauerhaft Modelle und Ausgaben, die sich in befinden",
77+
"warn_cannot_be_recovered": "und kann nicht wiederhergestellt werden.",
78+
"sure_want_to_continue": "Sind Sie sicher, dass Sie fortfahren möchten?"
7679
}

data/localizations/en_EN.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,9 @@
7272
"source_target_path_empty_msg": "Source or Target path is empty",
7373
"target_path_empty_msg": "Target path is empty",
7474
"treasury_created_msg": "Models treasury has been created.",
75-
"close_running_projects": "Close all running projects before continuing the operation."
75+
"close_running_projects": "Close all running projects before continuing the operation.",
76+
"warn_perm_del": "WARNING This action will permanently delete models and output located in",
77+
"warn_cannot_be_recovered": "and cannot be recovered.",
78+
"sure_want_to_continue": "Are you sure you want to continue?",
79+
"Install webui extension": "Install webui extension"
7680
}

data/localizations/es_ES.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"source_target_path_empty_msg": "La ruta de origen o destino está vacía",
7373
"target_path_empty_msg": "La ruta de destino está vacía",
7474
"treasury_created_msg": "Se ha creado el tesoro de modelos.",
75-
"close_running_projects": "Cierre todos los proyectos en ejecución antes de continuar con la operación."
75+
"close_running_projects": "Cierre todos los proyectos en ejecución antes de continuar con la operación.",
76+
"warn_perm_del": "ADVERTENCIA Esta acción eliminará permanentemente los modelos y la salida ubicados en",
77+
"warn_cannot_be_recovered": "y no se puede recuperar.",
78+
"sure_want_to_continue": "¿Estás seguro de que quieres continuar?"
7679
}

data/localizations/fr_FR.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"source_target_path_empty_msg": "Le chemin source ou cible est vide",
7373
"target_path_empty_msg": "Le chemin cible est vide",
7474
"treasury_created_msg": "La trésorerie des modèles a été créée.",
75-
"close_running_projects": "Fermez tous les projets en cours d'exécution avant de continuer l'opération."
75+
"close_running_projects": "Fermez tous les projets en cours d'exécution avant de continuer l'opération.",
76+
"warn_perm_del": "AVERTISSEMENT Cette action supprimera définitivement les modèles et les résultats situés dans",
77+
"warn_cannot_be_recovered": "et ne pourra pas être récupéré.",
78+
"sure_want_to_continue": "Êtes-vous sûr de vouloir continuer ?"
7679
}

data/localizations/he_IL.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"source_target_path_empty_msg": "נתיב המקור או היעד ריקים",
7373
"target_path_empty_msg": "נתיב היעד ריק",
7474
"treasury_created_msg": "מטמון המודלים נוצר בהצלחה.",
75-
"close_running_projects": "סגורו את כל הפרויקטים הפועלים לפני הפעולה."
75+
"close_running_projects": "סגורו את כל הפרויקטים הפועלים לפני הפעולה.",
76+
"warn_perm_del": "אזהרה פעולה זו תמחק לצמיתות את המודלים והפלט הממוקמים ב",
77+
"warn_cannot_be_recovered": "ולא ניתן לשחזור.",
78+
"sure_want_to_continue": "האם אתה בטוחים שאתם רוצים להמשיך?"
7679
}

data/localizations/hi_IN.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"source_target_path_empty_msg": "स्रोत या लक्ष्य पथ खाली है",
7373
"target_path_empty_msg": "लक्ष्य पथ खाली है",
7474
"treasury_created_msg": "मॉडल्स ट्रेज़री बना दी गई है।",
75-
"close_running_projects": "संचालन को जारी रखने से पहले सभी चल रहे परियोजनाओं को बंद करें।"
75+
"close_running_projects": "संचालन को जारी रखने से पहले सभी चल रहे परियोजनाओं को बंद करें।",
76+
"warn_perm_del": "चेतावनी इस कार्रवाई से स्थायी रूप से मॉडल और आउटपुट हटा दिया जाएगा, जो कि इस स्थान पर है",
77+
"warn_cannot_be_recovered": "और इसे वापस प्राप्त नहीं किया जा सकता।",
78+
"sure_want_to_continue": "क्या आप निश्चित रूप से जारी रखना चाहते हैं?"
7679
}

data/localizations/it_IT.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"source_target_path_empty_msg": "Il percorso di origine o destinazione è vuoto",
7373
"target_path_empty_msg": "Il percorso di destinazione è vuoto",
7474
"treasury_created_msg": "Il tesoro dei modelli è stato creato.",
75-
"close_running_projects": "Chiudi tutti i progetti in esecuzione prima di continuare l'operazione."
75+
"close_running_projects": "Chiudi tutti i progetti in esecuzione prima di continuare l'operazione.",
76+
"warn_perm_del": "ATTENZIONE Questa azione eliminerà definitivamente i modelli e l'output presenti in",
77+
"warn_cannot_be_recovered": "e non può essere recuperato.",
78+
"sure_want_to_continue": "Sei sicuro di voler continuare?"
7679
}

data/localizations/ja_JP.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"source_target_path_empty_msg": "ソースまたはターゲットのパスが空です",
7373
"target_path_empty_msg": "ターゲットのパスが空です",
7474
"treasury_created_msg": "モデルの財務省が作成されました。",
75-
"close_running_projects": "操作を続行する前に実行中のすべてのプロジェクトを閉じます。"
75+
"close_running_projects": "操作を続行する前に実行中のすべてのプロジェクトを閉じます。",
76+
"warn_perm_del": "警告 この操作により、以下の場所にあるモデルと出力が完全に削除されます",
77+
"warn_cannot_be_recovered": "そして回復することはできません。",
78+
"sure_want_to_continue": "本当に続けてもよろしいですか?"
7679
}

data/localizations/ko_KR.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"source_target_path_empty_msg": "원본 또는 대상 경로가 비어 있습니다",
7373
"target_path_empty_msg": "대상 경로가 비어 있습니다",
7474
"treasury_created_msg": "모델 재무부가 생성되었습니다.",
75-
"close_running_projects": "작업을 계속하기 전에 실행 중인 모든 프로젝트를 닫으십시오."
75+
"close_running_projects": "작업을 계속하기 전에 실행 중인 모든 프로젝트를 닫으십시오.",
76+
"warn_perm_del": "경고 이 작업은 다음 위치에 있는 모델과 출력을 영구적으로 삭제합니다",
77+
"warn_cannot_be_recovered": "그리고 복구할 수 없습니다.",
78+
"sure_want_to_continue": "계속하시겠습니까?"
7679
}

data/localizations/pt_BR.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"source_target_path_empty_msg": "O caminho de origem ou destino está vazio",
7373
"target_path_empty_msg": "O caminho de destino está vazio",
7474
"treasury_created_msg": "O tesouro de modelos foi criado.",
75-
"close_running_projects": "Feche todos os projetos em execução antes de continuar a operação."
75+
"close_running_projects": "Feche todos os projetos em execução antes de continuar a operação.",
76+
"warn_perm_del": "AVISO Esta ação excluirá permanentemente modelos e saídas localizados em",
77+
"warn_cannot_be_recovered": "e não poderão ser recuperados.",
78+
"sure_want_to_continue": "Tem certeza de que deseja continuar?"
7679
}

data/localizations/ru_RU.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"source_target_path_empty_msg": "Путь источника или цели пуст",
7373
"target_path_empty_msg": "Путь цели пуст",
7474
"treasury_created_msg": "Создана казначейство моделей.",
75-
"close_running_projects": "Закройте все работающие проекты перед продолжением операции."
75+
"close_running_projects": "Закройте все работающие проекты перед продолжением операции.",
76+
"warn_perm_del": "ПРЕДУПРЕЖДЕНИЕ Это действие навсегда удалит модели и результаты, расположенные в",
77+
"warn_cannot_be_recovered": "и восстановить их будет невозможно.",
78+
"sure_want_to_continue": "Вы уверены, что хотите продолжить?"
7679
}

data/localizations/tr_TR.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"source_target_path_empty_msg": "Kaynak veya Hedef yol boş",
7373
"target_path_empty_msg": "Hedef yol boş",
7474
"treasury_created_msg": "Modeller hazinesi oluşturuldu.",
75-
"close_running_projects": "İşlemi sürdürmeden önce çalışan tüm projeleri kapatın."
75+
"close_running_projects": "İşlemi sürdürmeden önce çalışan tüm projeleri kapatın.",
76+
"warn_perm_del": "UYARI Bu eylem, şu konumdaki modelleri ve çıktıları kalıcı olarak silecektir",
77+
"warn_cannot_be_recovered": "ve geri getirilemez.",
78+
"sure_want_to_continue": "Devam etmek istediğinizden emin misiniz?"
7679
}

data/localizations/zh_CN.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"source_target_path_empty_msg": "源路径或目标路径为空",
7373
"target_path_empty_msg": "目标路径为空",
7474
"treasury_created_msg": "模型库已创建。",
75-
"close_running_projects": "在继续操作之前,请关闭所有正在运行的项目。"
75+
"close_running_projects": "在继续操作之前,请关闭所有正在运行的项目。",
76+
"warn_perm_del": "警告 此操作将永久删除位于以下位置的模型和输出",
77+
"warn_cannot_be_recovered": "且无法恢复。",
78+
"sure_want_to_continue": "确定要继续吗?"
7679
}

data/localizations/zh_TW.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"source_target_path_empty_msg": "來源或目標路徑為空",
7373
"target_path_empty_msg": "目標路徑為空",
7474
"treasury_created_msg": "模型庫已創建。",
75-
"close_running_projects": "在繼續操作之前,請關閉所有正在運行的項目。"
75+
"close_running_projects": "在繼續操作之前,請關閉所有正在運行的項目。",
76+
"warn_perm_del": "警告 此操作將永久刪除位於以下位置的模型和輸出",
77+
"warn_cannot_be_recovered": "並且無法恢復。",
78+
"sure_want_to_continue": "確定要繼續嗎?"
7679
}

layout/dialog.py

+51-2
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,70 @@
55

66
def dialog_window(title,method,lang_data):
77
# method = lang_data[util.remove_special_characters_from_text(get_first_word(method),case='capitalize')]
8-
method = lang_data[util.remove_special_characters_from_text(method,case='capitalize')]
8+
method_lang = lang_data[util.remove_special_characters_from_text(method,case='capitalize')]
99
event, values = sg.Window('',
1010
[
1111
[
1212
sg.Frame('',[
1313
[
14-
sg.Button(f'{method} ?',expand_x=True,expand_y=True,font=FONT_H1_BOLD,disabled_button_color=(color.LIGHT_BLUE, color.DARK_GRAY),disabled=True,border_width=0),
14+
sg.Button(f'{method_lang} ?',expand_x=True,expand_y=True,font=FONT_H1_BOLD,disabled_button_color=(color.LIGHT_BLUE, color.DARK_GRAY),disabled=True,border_width=0),
1515
],
1616
[
1717
sg.Button(lang_data[LOCAL_YES],k='-yes_key-',expand_x=True,expand_y=True,s=(5,2),font=FONT_H2_BOLD,button_color=(color.DIM_GREEN,color.DARK_GRAY),border_width=0),
1818
sg.Button(lang_data[LOCAL_NO],k='-no_key-',expand_x=True,expand_y=True,s=(5,2),font=FONT_H2_BOLD,button_color=(color.RED_ORANGE, color.DARK_GRAY),border_width=0)
1919
],
2020
],expand_x=True,expand_y=True,border_width=0,relief=sg.RELIEF_FLAT,element_justification="c",background_color=color.LIGHT_GRAY)
2121
]
22+
# if method == 'Install webui extension' else
23+
# [
24+
# sg.Frame('',[
25+
# [
26+
# sg.Button(f'Install {title} ?',expand_x=True,expand_y=True,font=FONT_H1_BOLD,disabled_button_color=(color.DIM_GREEN, color.GRAY),disabled=True,border_width=0,
27+
# button_color=(color.DARK_GRAY, color.DARK_GRAY)),
28+
# ],
29+
# [
30+
# # Do you wish to install ControlNet WebUI extension? it will also download about 19GB of controlnet adpters models
31+
# sg.ML(f"""
32+
# Please select the desired installation option:
33+
34+
# Option 1 (Default): Install ControlNet and download adapter models (approximately 19GB).
35+
36+
# Option 2: Install ControlNet only. (Choose if you already have the adapter models)
37+
38+
# """,
39+
# font=FONT_H1,text_color=color.DIM_BLUE,background_color=color.DARK_GRAY,size=(80,8),expand_x=True,expand_y=True,visible=True,no_scrollbar=True,disabled=True,justification='l'),
40+
# ],
41+
# [
42+
# sg.Button("Option 1",k='-yes_key-',expand_x=True,expand_y=True,s=(25,2),font=FONT_H2_BOLD,button_color=(color.DIM_GREEN,color.DARK_GRAY),border_width=0),
43+
# sg.Button("Option 2",k='-yes_key-',expand_x=True,expand_y=True,s=(25,2),font=FONT_H2_BOLD,button_color=(color.DIM_GREEN,color.DARK_GRAY),border_width=0),
44+
45+
# sg.Button(lang_data[LOCAL_NO],k='-no_key-',expand_x=True,expand_y=True,s=(5,2),font=FONT_H2_BOLD,button_color=(color.RED_ORANGE, color.DARK_GRAY),border_width=0)
46+
# ],
47+
# ],expand_x=True,expand_y=True,border_width=0,relief=sg.RELIEF_FLAT,element_justification="c",background_color=color.LIGHT_GRAY)
48+
49+
# ]
50+
if method != 'uninstall' else [
51+
sg.Frame('',[
52+
[
53+
sg.Button(f'{method_lang} ?',expand_x=True,expand_y=True,font=FONT_H1_BOLD,disabled_button_color=(color.RED_ORANGE, color.GRAY),disabled=True,border_width=0,
54+
button_color=(color.DARK_GRAY, color.DARK_GRAY)),
55+
],
56+
[
57+
sg.ML(f"""
58+
{lang_data[LOCAL_WARN_PERM_DEL]}
59+
{title} {lang_data[LOCAL_WARN_CANNOT_BE_RECOVERED]} {lang_data[LOCAL_SURE_WANT_TO_CONTINUE]}
60+
""",
61+
font=FONT_H1,text_color=color.RED_ORANGE,background_color=color.DARK_GRAY,size=(80,5),expand_x=True,expand_y=True,visible=True,no_scrollbar=True,disabled=True,justification='c'),
62+
],
63+
[
64+
sg.Button(lang_data[LOCAL_YES],k='-yes_key-',expand_x=True,expand_y=True,s=(5,2),font=FONT_H2_BOLD,button_color=(color.DIM_GREEN,color.DARK_GRAY),border_width=0),
65+
sg.Button(lang_data[LOCAL_NO],k='-no_key-',expand_x=True,expand_y=True,s=(5,2),font=FONT_H2_BOLD,button_color=(color.RED_ORANGE, color.DARK_GRAY),border_width=0)
66+
],
67+
],expand_x=True,expand_y=True,border_width=0,relief=sg.RELIEF_FLAT,element_justification="c",background_color=color.LIGHT_GRAY)
68+
]
69+
2270
],modal=True, element_justification='c',no_titlebar=True,background_color=color.DARK_GRAY,auto_size_text=True,).read(close=True)
71+
2372
if event == '-yes_key-':
2473
return True
2574
if event == '-no_key-':

layout/project.py

+14-8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from util.json_tools_projects import get_pref_project_data
88
from util.util import convert_string_to_list
99
import os
10+
from util.path_handler import full_path
1011

1112
def create_layout(project,lang_data):
1213
main_key = '-selected_app_'
@@ -15,8 +16,12 @@ def create_layout(project,lang_data):
1516

1617
project_pref_path_len = 0
1718
project_pref_def_args=""
18-
project_pref_path = os.path.abspath(project['repo_name'])
19-
project_pref_path_def = os.path.abspath(project['repo_name'])
19+
# project_pref_path = os.path.abspath(project['repo_name'])
20+
project_pref_path = f"{full_path}\{project['repo_name']}"
21+
22+
# project_pref_path_def = os.path.abspath(project['repo_name'])
23+
project_pref_path_def = f"{full_path}\{project['repo_name']}"
24+
2025
project_pref = get_pref_project_data(project['id'])
2126

2227
if project_pref:
@@ -68,13 +73,14 @@ def create_layout(project,lang_data):
6873
sg.Button(project_commit_hash,visible=True,k=f"-{selected_project_key}commit_hash_lbl-",size=(50,1),font=FONT,expand_x=True,disabled=True)
6974
],
7075
[
71-
launch_buttons_button
72-
# sg.Text(project['type'],font=FONT,background_color=color.DARK_GRAY),
73-
76+
launch_buttons_button,
77+
sg.Button(f'{lang_data[LOCAL_INSTALL]} ControlNet',visible=True if len(project['launch_buttons']) > 2 else False,
78+
k=f"{selected_project_key}install_ext_btn-",font=FONT_H1,expand_x=False
79+
,mouseover_colors=launch_buttons_mouseover_colors,button_color=launch_buttons_button_color)
7480
]
75-
# if project['type'] == 'app' else [
76-
77-
# ]
81+
if len(project['launch_buttons']) > 2 else [
82+
launch_buttons_button,
83+
]
7884
],key=f'{main_key}frame-',expand_x=True,expand_y=False,border_width=5,pad=(10,10),relief=sg.RELIEF_FLAT,element_justification="l",background_color=color.DARK_GRAY)
7985
],
8086
[

layout/requirements.py

+1-10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from util.dependency_check import check_git, detect_python
77
import subprocess
88
import layout.quick_launch as quick_launch
9-
from util.util import contains_spaces
109
import os
1110
python = "Python"
1211
git = "Git"
@@ -15,18 +14,10 @@
1514

1615

1716
def create_layout(lang_data,projects):
18-
path_spaces = contains_spaces(os.path.abspath(os.getcwd()))
1917
# path_spaces = True
2018
python_ver = detect_python()
2119

22-
layout = [
23-
[
24-
sg.Button(lang_data[LOCAL_PATH_SPACES_WARNING] ,k="LOCAL_CHECK_PYTHON_PATH_LBL",
25-
disabled_button_color=(color.RED_ORANGE,color.DARK_GRAY),
26-
button_color=(color.RED_ORANGE,color.DARK_GRAY),
27-
font=FONT,expand_x=True,size=(60,2),disabled=True,visible=True),
28-
]
29-
if path_spaces else [],
20+
layout = [
3021
#seait
3122
[
3223
sg.Frame('',[

0 commit comments

Comments
 (0)