Skip to content

Commit 2857180

Browse files
committed
Use const for store URL
1 parent fe0d8f0 commit 2857180

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

src/components/About.vue

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,12 @@
1414
>
1515
<label class="about-label"
1616
>{{ t('question.message') }}
17-
<a
18-
href="https://chrome.google.com/webstore/detail/web-activity-time-tracker/hhfnghjdeddcfegfekjeihfmbjenlomm/support"
19-
target="_blank"
20-
>{{ t('supportForm.message') }}</a
17+
<a :href="CHROME_STORE_SUPPORT_URL" target="_blank">{{ t('supportForm.message') }}</a
2118
>.</label
2219
>
2320
<label class="about-label"
2421
>{{ t('doYouEnjoy.message') }}
25-
<a
26-
href="https://chrome.google.com/webstore/detail/web-activity-time-tracker/hhfnghjdeddcfegfekjeihfmbjenlomm/reviews"
27-
target="_blank"
28-
>{{ t('review.message') }}</a
29-
></label
22+
<a :href="CHROME_STORE_REVIEW_URL" target="_blank">{{ t('review.message') }}</a></label
3023
>
3124
</div>
3225
</template>
@@ -39,6 +32,7 @@ export default {
3932

4033
<script lang="ts" setup>
4134
import { useI18n } from 'vue-i18n';
35+
import { CHROME_STORE_SUPPORT_URL, CHROME_STORE_REVIEW_URL } from '../utils/chrome-url';
4236
const { t } = useI18n();
4337
</script>
4438

src/components/Review.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ import { injecStorage } from '../storage/inject-storage';
1919
import { StorageParams } from '../storage/storage-params';
2020
import { addDays, startOfToday } from 'date-fns';
2121
import { addHours } from 'date-fns/esm';
22+
import { CHROME_STORE_REVIEW_URL } from '../utils/chrome-url';
2223
2324
const { t } = useI18n();
2425
2526
const settingsStorage = injecStorage();
2627
const PROMPT_AT_TIME_OF_DAY = 12;
2728
const ADD_DAYS_FIRST = 2;
2829
const ADD_DAYS_NEXT = 5;
29-
const CHROME_STORE_URL = `https://chromewebstore.google.com/detail/web-activity-time-tracker/${__APP_ID__}/reviews`;
3030
3131
const showReview = ref<boolean>();
3232
@@ -59,7 +59,7 @@ async function closeBlock() {
5959
}
6060
6161
async function openStore() {
62-
window.open(CHROME_STORE_URL, '_blank');
62+
window.open(CHROME_STORE_REVIEW_URL, '_blank');
6363
await settingsStorage.saveValue(StorageParams.REVIEW_DATE, new Date().toString());
6464
}
6565
</script>

src/utils/chrome-url.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const CHROME_STORE_REVIEW_URL = `https://chrome.google.com/webstore/detail/web-activity-time-tracker/${__APP_ID__}/reviews`;
2+
export const CHROME_STORE_SUPPORT_URL = `https://chrome.google.com/webstore/detail/web-activity-time-tracker/${__APP_ID__}/support`;
3+
export const CHROME_STORE_CLEAR_YOUTUBE_URL =
4+
'https://chrome.google.com/webstore/detail/kalhfjomailhflienkfajocjodgjipie';

0 commit comments

Comments
 (0)