Updates.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <div class="card">
  3. <div class="card-header border-transparent">
  4. <h3 class="card-title">Notable Project Updates</h3>
  5. <div class="card-tools">
  6. <button type="button" class="btn btn-tool" data-card-widget="collapse">
  7. <i class="fas fa-minus"></i>
  8. </button>
  9. <button type="button" class="btn btn-tool" data-card-widget="remove">
  10. <i class="fas fa-times"></i>
  11. </button>
  12. </div>
  13. </div>
  14. <div class="card-body p-0">
  15. <div class="table-responsive">
  16. <table class="table m-0">
  17. <thead>
  18. <tr>
  19. <th>Commit #</th>
  20. <th>Project Name</th>
  21. <th class="text-center">Build Status</th>
  22. <th class="text-center">Activity</th>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. <tr v-for="update of updates" v-bind:key="update.hashId">
  27. <td>
  28. <a :href="update.url" target="_blank">{{update.hashId}}</a>
  29. </td>
  30. <td>
  31. {{update.title}}
  32. <div class="description">{{update.description}}</div>
  33. </td>
  34. <td class="text-center">
  35. <span class="badge" :class="update.badge">{{update.status}}</span>
  36. </td>
  37. <td class="text-center">
  38. <div class="sparkline line-colours-green">{{update.sparkline}}</div>
  39. </td>
  40. </tr>
  41. </tbody>
  42. </table>
  43. </div>
  44. </div>
  45. <div class="card-footer clearfix">
  46. <div class="row">
  47. <div class="col-7">
  48. <form action="javascript://" method="post">
  49. <div class="input-group">
  50. <input type="text" name="message" placeholder="What ru looking for?" class="form-control">
  51. <span class="input-group-append">
  52. <button type="button" class="btn btn-warning">Search</button>
  53. </span>
  54. </div>
  55. </form>
  56. </div>
  57. <div class="col-5">
  58. <a href="javascript://" class="btn btn-sm btn-info float-right">
  59. View ALL Recent Updates
  60. </a>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </template>
  66. <script>
  67. export default {
  68. data: () => {
  69. return {
  70. updates: [],
  71. }
  72. },
  73. computed: {
  74. //
  75. },
  76. created: function () {
  77. // this.updates.push({
  78. // hashId: '9627b660',
  79. // url: 'https://gitlab.com/bitcoin-cash-node/bitcoin-cash-node/-/commit/9627b66018a73ccef7419f964fb3b646e03a71d1',
  80. // title: 'Bitcoin Cash Node',
  81. // description: `Merge branch 'rebrand_useragent_and_config' into 'master'`,
  82. // status: 'Errors',
  83. // badge: 'badge-danger',
  84. // sparkline: '6, 4, 10, 19, 16, 5, 18, 13, 20, 17, 8, 2, 12, 3, 9',
  85. // })
  86. // this.updates.push({
  87. // hashId: '581d205e',
  88. // url: 'https://github.com/BitcoinUnlimited/BitcoinUnlimited/commit/581d205e4e254be4a9f3f80c95e140447002e458',
  89. // title: 'BitcoinUnlimited',
  90. // description: `Merge pull request #2015 from sickpig/fix-build-icon`,
  91. // status: 'Building',
  92. // badge: 'badge-success',
  93. // sparkline: '8, 12, 10, 9, 16, 19, 1, 4, 5, 14, 6, 7, 18, 13, 11',
  94. // })
  95. // this.updates.push({
  96. // hashId: '1507ec53',
  97. // url: 'https://gitlab.com/pokkst/crescentcash/-/commit/1507ec53347117185100af1bd21539ad74a06a9c',
  98. // title: 'Crescent Cash',
  99. // description: `Update build.gradle`,
  100. // status: 'Building',
  101. // badge: 'badge-success',
  102. // sparkline: '1, 15, 9, 12, 8, 20, 19, 5, 4, 13, 3, 6, 16, 14, 11',
  103. // })
  104. // this.updates.push({
  105. // hashId: 'e4a7f10e',
  106. // url: 'https://gitlab.com/cashid/protocol-specification/-/commit/e4a7f10efe1da1efc2f7a5a84029c142c3ab11f8',
  107. // title: 'CashID Protocol Specification',
  108. // status: 'Pending',
  109. // description: `Update name for the known MITM risk.`,
  110. // badge: 'badge-warning',
  111. // sparkline: '15, 19, 10, 14, 4, 12, 8, 17, 3, 6, 2, 11, 1, 16, 20',
  112. // })
  113. // this.updates.push({
  114. // hashId: '5158a5bc',
  115. // url: 'https://gitlab.com/GeneralProtocols/electrum-cash/-/commit/5158a5bcf7218cd39f6c08e0069fa1434756b9f6',
  116. // title: 'electrum-cash',
  117. // description: `Fix linting.`,
  118. // status: 'Pending',
  119. // badge: 'badge-warning',
  120. // sparkline: '12, 17, 15, 2, 16, 5, 18, 9, 1, 6, 7, 3, 4, 20, 14',
  121. // })
  122. },
  123. mounted: function () {
  124. /* Set JQuery. */
  125. // const $ = window.$
  126. /* Wait a tick for DOM to initialize. */
  127. // setTimeout(() => {
  128. // $(".line-colours-red").peity("line", {
  129. // fill: ['red']
  130. // })
  131. // $(".line-colours-green").peity("line", {
  132. // fill: ['green']
  133. // })
  134. // $(".line-colours-blue").peity("line", {
  135. // fill: ['blue']
  136. // })
  137. // $('.sparkline').peity('line', {
  138. // width: '100'
  139. // })
  140. // }, 10)
  141. },
  142. }
  143. </script>
  144. <style scoped>
  145. .description {
  146. font-size: 0.7em;
  147. color: rgba(30, 30, 30, 0.5);
  148. width: 250px;
  149. white-space: nowrap;
  150. overflow: hidden;
  151. text-overflow: ellipsis;
  152. margin-bottom: -10px;
  153. }
  154. </style>