Skip to content

Commit

Permalink
Legacy WebUI: プロテクト機能を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
xtne6f committed Aug 22, 2020
1 parent d84d94a commit 73d3cf0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ini/HttpPublic/legacy/default.css
Expand Up @@ -44,7 +44,7 @@ th, td {
}

#footer {
margin-top: 1em;
margin-top: 2em;
margin-bottom: 2em;
}

Expand Down
2 changes: 1 addition & 1 deletion ini/HttpPublic/legacy/recinfo.html
Expand Up @@ -41,7 +41,7 @@ <h1>録画済み一覧</h1>
v=a[i]
ct:Append(' <tr><td><a href="recinfodesc.html?id='..v.id..'">'
..FormatTimeAndDuration(v.startTime, v.durationSecond)
..'</a><td>'..v.serviceName..'<td>'..v.title
..'</a><td>'..v.serviceName..'<td>'..v.title..'<td>'..(v.protectFlag and '🔑' or '-')
..'<td'..(v.drops>0 and ' class="drops"' or v.scrambles>0 and ' class="scrambles"' or '')..'>'..v.drops..'/'..v.scrambles
..'<td'..((v.recStatus==1 or v.recStatus==4 or v.recStatus==6) and '' or (v.recStatus==3 or v.recStatus==11 or v.recStatus==13) and ' class="warn"' or ' class="err"')
..'>'..v.comment..'</tr>\n')
Expand Down
10 changes: 9 additions & 1 deletion ini/HttpPublic/legacy/recinfodesc.html
Expand Up @@ -26,7 +26,10 @@ <h1>録画済み詳細</h1>

post=AssertPost()
if post then
if mg.get_var(post,'del') then
if mg.get_var(post,'protect') then
edcb.ChgProtectRecFileInfo(id,mg.get_var(post,'protect')=='y')
ct:Append(' <div id="result">変更しました</div>\n')
elseif mg.get_var(post,'del') then
edcb.DelRecFileInfo(id)
ct:Append(' <div id="result">削除しました</div>\n')
end
Expand Down Expand Up @@ -103,6 +106,11 @@ <h1>録画済み詳細</h1>
end
end
ct:Append('<br></dd>\n'
..' <dt>プロテクト</dt><dd>\n'
..'<form method="POST" action="recinfodesc.html?id='..v.id..'"><div>\n'
..'<input type="hidden" name="ctok" value="'..CsrfToken()..'">\n'
..'<input type="hidden" name="protect" value="'..(v.protectFlag and 'n' or 'y')..'">\n'
..'<input type="submit" value="'..(v.protectFlag and 'Yes' or 'No')..'"></div></form></dd>\n'
..(#v.programInfo>0 and ' <dt>番組情報</dt><dd>\n'..v.programInfo:gsub('\r?\n', '<br>\n')..'</dd>\n' or '')
..(#v.errInfo>0 and ' <dt>エラーログ</dt><dd>\n'..v.errInfo:gsub('\r?\n', '<br>\n')..'</dd>\n' or '')
..' <dt>-</dt><dd>\n'
Expand Down

0 comments on commit 73d3cf0

Please sign in to comment.