My SMM panel
 
 
 
 
 
 

83 lines
2.7 KiB

  1. <template>
  2. <div>
  3. <div class="services-menu">
  4. <button class="selected">Services</button>
  5. <button>Credits</button>
  6. <div class="menu-slider">
  7. <div></div></div>
  8. </div>
  9. <div class="services-legend"><h5>Name</h5>
  10. <h5>Credits per 1000</h5><h5>Min Qt.</h5><h5>Max Qt.</h5></div>
  11. <ServicePane :site="'youtube'" :services="services" @select="select"></ServicePane>
  12. <ServicePane :site="'instagram'" :services="services" @select="select"></ServicePane>
  13. <ServicePane :site="'twitter'" :services="services" @select="select"></ServicePane>
  14. <ServicePane :site="'tiktok'" :services="services" @select="select"></ServicePane>
  15. <div id="overlay" v-if="selected">
  16. <div class="overlay-item">
  17. <img @click="selected = null" class="cancel icon" src="../../images/cancel-icon2.svg" alt=""/>
  18. <img v-if="selected.site == 'youtube'" class="icon" src="../../images/youtube-icon.svg" alt="">
  19. <img v-if="selected.site == 'instagram'" class="icon" src="../../images/instagram-icon.svg" alt="">
  20. <img v-if="selected.site == 'twitter'" class="icon" src="../../images/twitter.svg" alt="">
  21. <img v-if="selected.site == 'tiktok'" class="icon" src="../../images/tik-tok.svg" alt="">
  22. <h3>{{selected.name}}</h3>
  23. <h4>Cost: {{cost.toLocaleString('en')}}</h4>
  24. <h4>Quantity</h4>
  25. <div><input required :min="selected.minimum" :max="selected.maximum" type="number" v-model="amount" id="selQty"><span> / {{selected.maximum.toLocaleString('en')}}</span></div>
  26. <template v-if="selected.modifier == 'location'">
  27. <h4>Location</h4>
  28. <div><select required id="country" name="">
  29. <option value="usa">USA</option>
  30. <option value="canada">Canada</option>
  31. <option value="uk">United Kingdom</option>
  32. <option value="germany">Germany</option>
  33. <option value="france">France</option>
  34. </select></div>
  35. </template>
  36. <h4>URL</h4>
  37. <div><input required type="url" id="url"></div>
  38. <button @click="buyService" :disabled="paying">Submit<loading v-if="paying"></loading></button>
  39. <p></p>
  40. </div>
  41. </div>
  42. </div>
  43. </template>
  44. <script>
  45. import ServicePane from './service-pane.vue'
  46. import Loading from '../icons/loading.vue'
  47. function select(service) {
  48. this.selected = service
  49. }
  50. function cost() {
  51. return Math.ceil(this.selected.price * this.amount / 1000)
  52. }
  53. function buyService() {
  54. this.paying = true
  55. return
  56. }
  57. export default {
  58. data() {
  59. return {servicePane: true, services: null, selected: null, amount: 0,
  60. paying: false }
  61. },
  62. components: {ServicePane, Loading},
  63. props: ['token'],
  64. created() {
  65. fetch("/panel/services", {
  66. method: 'GET',
  67. headers: {'Content-Type': 'application/json',
  68. 'Accept': 'application/json',
  69. 'X-XSRF-TOKEN': this.token}
  70. }).then(response => {
  71. response.json().then(data => {this.services = data})
  72. })
  73. },
  74. methods: {select, buyService},
  75. computed: {cost}
  76. }
  77. </script>