Skip to content

Commit

Permalink
Move title to constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinovantes committed Apr 30, 2022
1 parent b1b59eb commit 7a20e21
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/Constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export const TITLE = `${DEFINE.PRODUCT_NAME} ${DEFINE.VERSION}`

export const KEY_STATE = 'KEY_STATE'

export const MAX_CHECKING_SELECTOR_ATTEMPTS = 5
Expand Down
5 changes: 3 additions & 2 deletions src/components/UserscriptApp.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { ref, defineComponent, onMounted, computed } from 'vue'
import { TITLE } from '@/Constants'
import { deleteWorkflowRuns } from '@/services/github/deleteWorkflowRuns'
import { useStore } from '@/store'
import { isOnWorkflowsPage } from '@/utils/isOnWorkflowsPage'
Expand Down Expand Up @@ -48,7 +49,7 @@ export default defineComponent({
})
return {
title: `${DEFINE.PRODUCT_NAME} ${DEFINE.VERSION}`,
TITLE,
isOpen: ref(false),
loadApp,
Expand Down Expand Up @@ -94,7 +95,7 @@ export default defineComponent({

<a
class="settings-btn"
:title="title"
:title="TITLE"
@click="isOpen = true"
>
Settings
Expand Down
5 changes: 3 additions & 2 deletions src/components/UserscriptAppSettings.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { defineComponent } from 'vue'
import { TITLE } from '@/Constants'
import { useStore } from '@/store'
export default defineComponent({
Expand All @@ -14,7 +15,7 @@ export default defineComponent({
}
return {
title: `${DEFINE.PRODUCT_NAME} ${DEFINE.VERSION}`,
TITLE,
projectUrl: DEFINE.REPO.url,
store,
save,
Expand All @@ -27,7 +28,7 @@ export default defineComponent({
<div class="settings">
<div class="group">
<h1>
{{ title }}
{{ TITLE }}
</h1>
<a :href="projectUrl" class="project-url">
{{ projectUrl }}
Expand Down

0 comments on commit 7a20e21

Please sign in to comment.