This commit is contained in:
flaskfarm
2022-10-27 16:02:16 +09:00
parent d746de7e90
commit dbe4d852b2
6 changed files with 34 additions and 5 deletions

2
.gitignore vendored
View File

@@ -148,4 +148,6 @@ lib/support/site/tving.py
lib/support/site/wavve.py
lib/support/site/seezn.py
*.bat
output/
*.mkv

26
cli/chage_ui.py Normal file
View File

@@ -0,0 +1,26 @@
import argparse
import os
import sys
sys.path.append(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'lib'))
from support import SupportFile, logger
class ChangeUI:
def change(self, target, old, new):
if target == 'macro':
target_filepath = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'lib', 'framework', 'templates', 'macro.html')
text = SupportFile.read_file(target_filepath)
SupportFile.write_file(target_filepath, text.replace(old, new))
def process_args(self):
parser = argparse.ArgumentParser()
parser.add_argument('--target', default='macro')
parser.add_argument('--old', default='btn-outline-primary')
parser.add_argument('--new', required=True)
args = parser.parse_args()
self.change(args.target, args.old, args.new)
if __name__== "__main__":
ChangeUI().process_args()

View File

@@ -10,7 +10,7 @@ function j_button_group(h) {
}
// primary, secondary, success, danger, warning, info, light, dark, white
function j_button(id, text, data={}, color='success', outline=true, small=false) {
function j_button(id, text, data={}, color='primary', outline=true, small=false) {
var str = '<button id="'+id+'" name="'+id+'" class="btn btn-sm btn';
if (outline) {
str += '-outline';
@@ -28,7 +28,7 @@ function j_button(id, text, data={}, color='success', outline=true, small=false)
return str;
}
function j_button_small(id, text, data={}, color='success', outline=true) {
function j_button_small(id, text, data={}, color='primary', outline=true) {
return j_button(id, text, data, color, outline, true);
}

View File

@@ -1 +1 @@
VERSION="4.0.43"
VERSION="4.0.44"

View File

@@ -49,7 +49,8 @@ class PagePython(PluginPageBase):
if result['status'] == 'finish':
ret['data'] = []
for tmp in result['log'].split('\n'):
ret['data'].append(tmp.split('=='))
if '==' in tmp:
ret['data'].append(tmp.split('=='))
else:
ret['ret'] = 'danger'
ret['msg'] = "실패"

View File

@@ -11,7 +11,7 @@
<h3>시스템</h3>
<hr>
{{ macros.info_text_and_buttons('python_version', 'Python', [['globalLinkBtn', '패키지 관리', [('url','/system/python')]]], info['python_version']) }}
{{ macros.info_text_and_buttons('python_version', 'Python', [['globalLinkBtn', '패키지 관리', [('url','/system/tool/python')]]], info['python_version']) }}
{{ macros.info_text('platform', 'Platform', info['platform']) }}
{{ macros.info_text('processor', 'Processor', info['processor']) }}
{{ macros.info_text_and_buttons('version_str', '버전', [['globalOpenBtn', '업데이트 내역', [('url',arg['changelog'])]], ['recent_version_btn', '최신버전 확인']], info['version']) }}