Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.83 KB | None | 0 0
  1. <template>
  2.     <div class="givemoney">
  3.         <div class="head">
  4.             <div style="display: grid; grid-template-columns: repeat(2, 1fr);">
  5.                 <h3>Geld geben</h3>
  6.                 <i v-on:click="terminate" class="fas fa-times"></i>
  7.             </div>
  8.         </div>
  9.         <div class="content">
  10.             <input class="secondary" placeholder="Geldbetrag" type="number" v-model="money" autofocus /><br>
  11.             <button class="btn primary" :disabled="(money == null || money == 0)" v-on:click="handle">Bestätigen</button>
  12.         </div>
  13.     </div>
  14. </template>
  15.  
  16. <script>
  17.     import Windows from "../windows"
  18.  
  19.     export default Windows.register({
  20.         name: "GiveMoney",
  21.         props: {
  22.             data: String
  23.         },
  24.         data() {
  25.             return {
  26.                 moneyData: JSON.parse(this.data),
  27.                 money: null
  28.             }
  29.         },
  30.         methods: {
  31.             dismiss() {
  32.                 this.dismiss()
  33.             },
  34.             handle() {
  35.                 if (this.money == null) return
  36.                 this.triggerServer("GivePlayerMoney", this.moneyData.name, this.money)
  37.                 this.dismiss()
  38.             },
  39.             terminate() {
  40.                 this.dismiss()
  41.             }
  42.         }
  43.     })
  44. </script>
  45.  
  46. <style lang="scss" scoped>
  47.     .givemoney {
  48.         margin-top: 37.3vh;
  49.         border-radius: 1vh;
  50.         box-shadow: 5px 1px 10px -1px rgba(0, 0, 0, 0.4);
  51.         margin-left: auto;
  52.         margin-right: auto;
  53.         width: 41vh;
  54.         height: 25.7vh;
  55.         background-color: #eee;
  56.         .head
  57.  
  58.     {
  59.         border-top-right-radius: 1vh;
  60.         border-top-left-radius: 1vh;
  61.         border-top: 2vh solid #FF9800;
  62.         border-bottom: 0.5vh solid #FF9800;
  63.         h3
  64.  
  65.     {
  66.         margin-top: 1.5vh;
  67.         margin-bottom: 1.5vh;
  68.         font-size: 3vh;
  69.         color: #37474F;
  70.         font-weight: 400;
  71.         margin-left: 3vh;
  72.         text-align: left;
  73.     }
  74.  
  75.     i {
  76.         font-size: 3.5vh;
  77.         color: #37474F;
  78.         text-align: right;
  79.         margin-right: 2.5vh;
  80.         margin-top: 1.5vh;
  81.     }
  82.  
  83.         i:hover {
  84.             color: #263238;
  85.             transition: color 0.5s;
  86.         }
  87.  
  88.     }
  89.  
  90.     .content {
  91.         input
  92.  
  93.     {
  94.         margin-top: 2.5vh;
  95.         margin-left: 3vh;
  96.         margin-right: 3vh;
  97.         width: 35vh;
  98.         height: 5vh;
  99.         font-size: 2vh;
  100.         color: #37474F;
  101.     }
  102.  
  103.     input:active, input:focus {
  104.         border-color: #FF9800;
  105.     }
  106.  
  107.     button {
  108.         font-size: 1.5vh;
  109.         margin-left: 3vh;
  110.         height: 4vh;
  111.         &.btn
  112.  
  113.    {
  114.        border-radius: 0.5vh;
  115.         padding: 2vh;
  116.         line-height: 0;
  117.         margin-top: 2vh;
  118.     }
  119.  
  120.     }
  121.     }
  122.     }
  123. </style>
  124. <!-- components.Windows.show("GiveMoney") -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement