Skip to content

Commit

Permalink
Merge pull request #10 from skoro/8-feat-link-to-github-project
Browse files Browse the repository at this point in the history
#8 link to homepage
  • Loading branch information
skoro authored Aug 11, 2024
2 parents 2594564 + 3fd58eb commit 2f5c7f3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"productName": "Pasted",
"version": "0.4.0",
"description": "Yet another clipboard manager",
"homepage": "https://github.com/skoro/pasted",
"main": ".vite/build/main.js",
"scripts": {
"start": "electron-forge start",
Expand Down
14 changes: 12 additions & 2 deletions src/renderer/components/pages/PreferencesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ToolButton from '../forms/ToolButton.vue';
import CheckboxElem from '../forms/CheckboxElement.vue';
import { usePreferencesStore } from '../../stores/usePreferencesStore';
import { keyboard, bindEscKey } from '../../keyshortcuts';
import { version as appVersion } from '../../../../package.json';
import { version as appVersion, homepage } from '../../../../package.json';
const emit = defineEmits(['close-page']);
Expand All @@ -17,6 +17,13 @@ function closePage() {
emit('close-page');
}
/**
* @param {string} url
*/
function openUrl(url) {
window.electronAPI.openUrl(url);
}
onMounted(() => {
bindEscKey(closePage);
});
Expand Down Expand Up @@ -72,7 +79,10 @@ onUnmounted(() => {
</div>

<div class="text-sm text-slate-400 mt-4 pt-2">
Version: <span class="font-medium">{{ appVersion }}</span>
<div>Version: <span class="font-medium">{{ appVersion }}</span></div>
<div>
Project home: <a href="#" @click.prevent="openUrl(homepage)">{{ homepage }}</a>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 2f5c7f3

Please sign in to comment.