Update webview paths and startup parameters
This commit is contained in:
6
main.py
6
main.py
@@ -1157,7 +1157,7 @@ Do NOT mention the object itself. Describe the environment in a concise way, e.g
|
|||||||
|
|
||||||
def get_image_json(self, filepath: str):
|
def get_image_json(self, filepath: str):
|
||||||
# filepath kommt aus JS als "output/flower-1.png"
|
# filepath kommt aus JS als "output/flower-1.png"
|
||||||
full_path = os.path.join(BASE_DIR, "web", filepath)
|
full_path = os.path.join(WEB_DIR, filepath)
|
||||||
try:
|
try:
|
||||||
# Always prefer the sidecar if available (contains most up-to-date data)
|
# Always prefer the sidecar if available (contains most up-to-date data)
|
||||||
sidecar = full_path + ".json"
|
sidecar = full_path + ".json"
|
||||||
@@ -1219,7 +1219,7 @@ if __name__ == "__main__":
|
|||||||
api = Api()
|
api = Api()
|
||||||
window = webview.create_window(
|
window = webview.create_window(
|
||||||
"SD 3D Model Image Gen",
|
"SD 3D Model Image Gen",
|
||||||
"web/index.html",
|
WEB_INDEX,
|
||||||
js_api=api,
|
js_api=api,
|
||||||
width=900,
|
width=900,
|
||||||
height=1000,
|
height=1000,
|
||||||
@@ -1227,4 +1227,4 @@ if __name__ == "__main__":
|
|||||||
resizable=True
|
resizable=True
|
||||||
)
|
)
|
||||||
api.set_window(window)
|
api.set_window(window)
|
||||||
webview.start(debug=True)
|
webview.start(debug=not IS_FROZEN, icon=APP_ICON_PATH if os.path.isfile(APP_ICON_PATH) else None)
|
||||||
|
|||||||
Reference in New Issue
Block a user