|
| 1 | +<template> |
| 2 | + <div class="main"> |
| 3 | + <p class="header">Welcome to Web Activity Time Tracker</p> |
| 4 | + <p class="description"> |
| 5 | + Web Activity Time Tracker is <span>open-sourse</span>, <span>free</span> and |
| 6 | + <span>no ads</span> extension, which can help you track the time you spent on browsing |
| 7 | + websites and the count of visit. |
| 8 | + </p> |
| 9 | + <img class="img" src="../assets/initial.jpg" height="250" /> |
| 10 | + <div class="steps"> |
| 11 | + <p class="header">Get started</p> |
| 12 | + <p class="description">You can quicly start using the extension in just 3 easy steps</p> |
| 13 | + <p class="step">1. Pin the icon</p> |
| 14 | + <p class="description"> |
| 15 | + To use this extension more conviently, you can pin the icon to toolbar. Click the icon |
| 16 | + <img src="../assets/icons/extension.svg" height="25" /> and then click the pin icon |
| 17 | + <img src="../assets/icons/pin.svg" height="25" /> |
| 18 | + </p> |
| 19 | + <img class="img" src="../assets/pin-tutorial.png" height="250" /> |
| 20 | + <p class="step">2. Browse any websites</p> |
| 21 | + <p class="description"> |
| 22 | + Browse any websites and you will see that time is beating on the icon, just like this |
| 23 | + <img src="../assets/icons/icon.png" height="35" /> |
| 24 | + </p> |
| 25 | + <p class="step">3. Read data in the popup page and on dashboard</p> |
| 26 | + <p class="description mt-20"> |
| 27 | + Click on the extension icon to open a popup page and you will be able to read the data |
| 28 | + visualized using a pie chart, for today, for all time, or by day. In the popup window, you |
| 29 | + can open the dashboard and it will show you today's time by hour. And you can set a daily |
| 30 | + time limit for any websites, notifications for websites, or export data to CSV. |
| 31 | + </p> |
| 32 | + <div class="btn-block"> |
| 33 | + <button class="close" @click="close()">Close</button> |
| 34 | + <button @click="openDashboard()">Use the extension</button> |
| 35 | + </div> |
| 36 | + </div> |
| 37 | + </div> |
| 38 | +</template> |
| 39 | + |
| 40 | +<script lang="ts" setup> |
| 41 | +import { useI18n } from 'vue-i18n'; |
| 42 | +import Browser from 'webextension-polyfill'; |
| 43 | +
|
| 44 | +async function close() { |
| 45 | + const currentTab = await Browser.tabs.getCurrent(); |
| 46 | + await Browser.tabs.remove(currentTab.id!); |
| 47 | +} |
| 48 | +
|
| 49 | +async function openDashboard() { |
| 50 | + const url = Browser.runtime.getURL('src/dashboard.html?tab=dashboard'); |
| 51 | + const tab = await Browser.tabs.query({ currentWindow: true, active: true }); |
| 52 | + Browser.tabs.update(tab[0].id, { url: url }); |
| 53 | +} |
| 54 | +</script> |
| 55 | + |
| 56 | +<style scoped> |
| 57 | +.main { |
| 58 | + margin: auto; |
| 59 | + text-align: center; |
| 60 | + margin-top: 20px; |
| 61 | + width: 80%; |
| 62 | + height: 100%; |
| 63 | +} |
| 64 | +
|
| 65 | +.header { |
| 66 | + font-size: 26px; |
| 67 | + font-weight: 600; |
| 68 | +} |
| 69 | +.img { |
| 70 | + margin: 20px 0 0 0; |
| 71 | +} |
| 72 | +.description { |
| 73 | + font-size: 18px; |
| 74 | +} |
| 75 | +.description span { |
| 76 | + font-weight: 600; |
| 77 | +} |
| 78 | +.description img { |
| 79 | + margin: 0 10px; |
| 80 | +} |
| 81 | +.steps .step { |
| 82 | + text-align: left; |
| 83 | + font-size: 24px; |
| 84 | + font-weight: 700; |
| 85 | +} |
| 86 | +.steps .step { |
| 87 | + margin: 30px; |
| 88 | +} |
| 89 | +
|
| 90 | +.steps .description { |
| 91 | + margin: 20px; |
| 92 | +} |
| 93 | +
|
| 94 | +button.close { |
| 95 | + background: #c5c5c5; |
| 96 | + color: rgb(0, 0, 0); |
| 97 | +} |
| 98 | +
|
| 99 | +button { |
| 100 | + display: inline-block; |
| 101 | + background: #428bff; |
| 102 | + color: #fff; |
| 103 | + border-radius: 5px; |
| 104 | + height: 36px; |
| 105 | + line-height: 35px; |
| 106 | + padding: 0 10px; |
| 107 | + border: 0; |
| 108 | + font-size: 14px; |
| 109 | + cursor: pointer; |
| 110 | + text-align: center; |
| 111 | + width: 200px; |
| 112 | + margin: 0 10px; |
| 113 | +} |
| 114 | +.btn-block { |
| 115 | + margin: 25px; |
| 116 | +} |
| 117 | +</style> |
0 commit comments