opkg.htm 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <%#
  2. Copyright 2018 Jo-Philipp Wich <jo@mein.io>
  3. Licensed to the public under the Apache License 2.0.
  4. -%>
  5. <%+header%>
  6. <style type="text/css">
  7. .controls {
  8. display: flex;
  9. margin: .5em 0 1em 0;
  10. flex-wrap: wrap;
  11. justify-content: space-around;
  12. }
  13. .controls > * {
  14. padding: .25em;
  15. white-space: nowrap;
  16. flex: 1 1 33%;
  17. box-sizing: border-box;
  18. display: flex;
  19. flex-wrap: wrap;
  20. }
  21. .controls > *:first-child,
  22. .controls > * > label {
  23. flex-basis: 100%;
  24. min-width: 250px;
  25. }
  26. .controls > * > .btn {
  27. flex-basis: 20px;
  28. text-align: center;
  29. }
  30. .controls > * > * {
  31. flex-grow: 1;
  32. align-self: center;
  33. }
  34. .controls > div > input {
  35. width: auto;
  36. }
  37. .td.version,
  38. .td.size {
  39. white-space: nowrap;
  40. }
  41. ul.deps, ul.deps ul, ul.errors {
  42. margin-left: 1em;
  43. }
  44. ul.deps li, ul.errors li {
  45. list-style: none;
  46. }
  47. ul.deps li:before {
  48. content: "↳";
  49. display: inline-block;
  50. width: 1em;
  51. margin-left: -1em;
  52. }
  53. ul.deps li > span {
  54. white-space: nowrap;
  55. }
  56. ul.errors li {
  57. color: #c44;
  58. font-size: 90%;
  59. font-weight: bold;
  60. padding-left: 1.5em;
  61. }
  62. ul.errors li:before {
  63. content: "⚠";
  64. display: inline-block;
  65. width: 1.5em;
  66. margin-left: -1.5em;
  67. }
  68. </style>
  69. <h2><%:Software%></h2>
  70. <div class="controls">
  71. <div>
  72. <label><%:Free space%>:</label>
  73. <div class="cbi-progressbar" title="<%:unknown%>">
  74. <div>&#160;</div>
  75. </div>
  76. </div>
  77. <div>
  78. <label><%:Filter%>:</label>
  79. <input type="text" name="filter" placeholder="<%:Type to filter…%>"<%=attr("value", luci.http.formvalue("query") or "")%> /><!--
  80. --><button class="btn cbi-button" onclick="handleReset(event)"><%:Clear%></button>
  81. </div>
  82. <div>
  83. <label><%:Download and install package%>:</label>
  84. <input type="text" name="install" placeholder="<%:Package name or URL…%>" onkeydown="if (event.keyCode === 13) handleManualInstall(event)" /><!--
  85. --><button class="btn cbi-button cbi-button-action" onclick="handleManualInstall(event)"><%:OK%></button>
  86. </div>
  87. <div>
  88. <label><%:Actions%>:</label>
  89. <button class="btn cbi-button-positive" data-command="update" onclick="handleOpkg(event)"><%:Update lists…%></button>
  90. &#160;
  91. <button class="btn cbi-button-neutral" onclick="handleConfig(event)"><%:Configure opkg…%></button>
  92. </div>
  93. </div>
  94. <ul class="cbi-tabmenu mode">
  95. <li data-mode="available" class="available cbi-tab"><a href="#"><%:Available%></a></li>
  96. <li data-mode="installed" class="installed cbi-tab-disabled"><a href="#"><%:Installed%></a></li>
  97. <li data-mode="updates" class="installed cbi-tab-disabled"><a href="#"><%:Updates%></a></li>
  98. </ul>
  99. <div class="controls" style="display:none">
  100. <div id="pager" class="center">
  101. <button class="btn cbi-button-neutral prev" aria-label="<%:Previous page%>">«</button>
  102. <div class="text">dummy</div>
  103. <button class="btn cbi-button-neutral next" aria-label="<%:Next page%>">»</button>
  104. </div>
  105. </div>
  106. <div class="table" id="packages">
  107. <div class="tr cbi-section-table-titles">
  108. <div class="th col-2 left"><%:Package name%></div>
  109. <div class="th col-2 left version"><%:Version%></div>
  110. <div class="th col-1 center size"><%:Size (.ipk)%></div>
  111. <div class="th col-10 left"><%:Description%></div>
  112. <div class="th right">&#160;</div>
  113. </div>
  114. </div>
  115. <script type="text/javascript" src="<%=resource%>/view/opkg.js"></script>
  116. <%+footer%>