mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Fix: Template name at config add
This commit is contained in:
parent
c41210d6fb
commit
b734e1c407
@ -166,7 +166,7 @@ def alas_template():
|
|||||||
for file in os.listdir('./config'):
|
for file in os.listdir('./config'):
|
||||||
name, extension = os.path.splitext(file)
|
name, extension = os.path.splitext(file)
|
||||||
if name == 'template' and extension == '.json':
|
if name == 'template' and extension == '.json':
|
||||||
out.append(f'{name}-alas')
|
out.append(f'{name}-src')
|
||||||
|
|
||||||
# out.extend(mod_template())
|
# out.extend(mod_template())
|
||||||
|
|
||||||
|
@ -1020,8 +1020,8 @@ class AlasGUI(Frame):
|
|||||||
def get_unused_name():
|
def get_unused_name():
|
||||||
all_name = alas_instance()
|
all_name = alas_instance()
|
||||||
for i in range(2, 100):
|
for i in range(2, 100):
|
||||||
if f"alas{i}" not in all_name:
|
if f"src{i}" not in all_name:
|
||||||
return f"alas{i}"
|
return f"src{i}"
|
||||||
else:
|
else:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
@ -1060,7 +1060,7 @@ class AlasGUI(Frame):
|
|||||||
name="AddAlas_copyfrom",
|
name="AddAlas_copyfrom",
|
||||||
label=t("Gui.AddAlas.CopyFrom"),
|
label=t("Gui.AddAlas.CopyFrom"),
|
||||||
options=alas_template() + alas_instance(),
|
options=alas_template() + alas_instance(),
|
||||||
value=origin or "template-alas",
|
value=origin or "template-src",
|
||||||
scope=s,
|
scope=s,
|
||||||
),
|
),
|
||||||
put_button(label=t("Gui.AddAlas.Confirm"), onclick=add, scope=s)
|
put_button(label=t("Gui.AddAlas.Confirm"), onclick=add, scope=s)
|
||||||
|
Loading…
Reference in New Issue
Block a user