Skip to content

Commit

Permalink
chore: refine
Browse files Browse the repository at this point in the history
  • Loading branch information
vernesong committed Nov 19, 2023
1 parent d5d1303 commit 2b94046
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
3 changes: 1 addition & 2 deletions luci-app-openclash/luasrc/model/cbi/openclash/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ HTTP.setfilehandler(
)

if HTTP.formvalue("upload") then
local f = HTTP.formvalue("ulfile")
if #f <= 0 then
if not um.value then
um.value = translate("No Specify Upload File")
end
end
Expand Down
20 changes: 10 additions & 10 deletions luci-app-openclash/luasrc/view/openclash/dvalue.htm
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<%+cbi/valueheader%>
<div style="text-align: center; margin:0 auto; display: block; width: 100%; height: 50px; text-overflow: ellipsis;">
<div>
<%:Note: Please Upload File According To File Type, File Will Be Saved To The Prompt Path%>
</div>
<div style="color: green; transform:translateY(100%);">
<%
local val = self:cfgvalue(section) or self.default or ""
write(pcdata(val))
%>
</div>
<div style="text-align: center; margin:2% auto; display: block; width: 100%; text-overflow: ellipsis;">
<div>
<%:Note: Please Upload File According To File Type, File Will Be Saved To The Prompt Path%>
</div>
<div style="color: green; margin-top: 1%;">
<%
local val = self:cfgvalue(section) or self.default or ""
write(pcdata(val))
%>
</div>
</div>
<%+cbi/valuefooter%>
2 changes: 1 addition & 1 deletion luci-app-openclash/luasrc/view/openclash/upload.htm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%+cbi/valueheader%>
<div style="text-align: center; margin:0 auto; display:block; white-space: nowrap;">
<label class="cbi-value" style="display:inline-block; width: 100%;" for="ulfile"><%:Upload File Type%>&nbsp;<%:(Click to select)%>&nbsp;&nbsp;&nbsp;
<label class="cbi-value" style="display:inline-block; width: 100%;" for="ulfiles"><%:Upload File Type%>&nbsp;<%:(Click to select)%>&nbsp;&nbsp;&nbsp;
<select name="file_type" style="width:auto">&nbsp;&nbsp;&nbsp;
<option value="config" selected="selected"><%:Config File%> (.yaml)</option>
<option value="proxy-provider"><%:Proxy Provider File%></option>
Expand Down

0 comments on commit 2b94046

Please sign in to comment.