Skip to content

Commit 3710f78

Browse files
authored
Merge pull request #60 from Gitification-App/main
Release v1.3.0
2 parents a1aed59 + fb82ce4 commit 3710f78

22 files changed

+337
-84
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 1.3.0
2+
- Updated Wowerlay to 1.1.0 to fix some bugs.
3+
- Added select language option to settings page (en and tr for now).
4+
15
### 1.2.0
26
- Added right click menu to repository titles.
37
- Refactored ugly spaghetti code to a maintainable good looking code.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
<img width="256px" height="256px" src="src-tauri/icons/128x128%402x.png" />
33
</div>
44

5+
<div align="center">
6+
7+
[Download page](https://gitification.app/)
8+
9+
</div>
10+
11+
512
# Gitification (Beta)
613
An app to view your notifications easily on your menubar.
714

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gitification",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"type": "module",
55
"scripts": {
66
"dev": "run-p vite:dev devtools",
@@ -24,7 +24,7 @@
2424
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
2525
"vue": "^3.3.4",
2626
"vue-selectable-items": "^1.0.1",
27-
"wowerlay": "1.0.2"
27+
"wowerlay": "1.1.0"
2828
},
2929
"files": [
3030
"README.md",

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"package": {
1010
"productName": "Gitification",
11-
"version": "1.2.0"
11+
"version": "1.3.0"
1212
},
1313
"tauri": {
1414
"systemTray": {

src/components/AppSidebar.vue

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { useStore } from '../stores/store'
77
import { AppStorage } from '../storage'
88
import { useKey } from '../composables/useKey'
99
import { Page, useRoute } from '../stores/route'
10+
import { useI18n } from '../composables/useI18n'
1011
import { Icons } from './Icons'
1112
import SidebarButton from './SidebarButton.vue'
1213
import Popover from './Popover.vue'
@@ -17,6 +18,7 @@ import PopoverContentInstallUpdate from './PopoverContentInstallUpdate.vue'
1718
1819
const store = useStore()
1920
const route = useRoute()
21+
const { t } = useI18n()
2022
2123
function openCurrentReleaseChangelog() {
2224
open(`${REPO_LINK}/blob/main/CHANGELOG.md#${__APP_VERSION__.replace(/\./g, '')}`)
@@ -25,22 +27,22 @@ function openCurrentReleaseChangelog() {
2527
const moreItems = computed(() => [
2628
menuItem({
2729
key: 'changelog',
28-
meta: { text: 'Changelog', icon: Icons.Info16 },
30+
meta: { text: t.changelog, icon: Icons.Info16 },
2931
onSelect: openCurrentReleaseChangelog,
3032
}),
3133
menuItem({
3234
key: 'settings',
33-
meta: { text: 'Settings', icon: Icons.Gear16 },
35+
meta: { text: t.settings, icon: Icons.Gear16 },
3436
onSelect: () => route.go(Page.Settings),
3537
}),
3638
AppStorage.get('user') != null && menuItem({
3739
key: 'logout',
38-
meta: { text: 'Log out', icon: Icons.SignOut16 },
40+
meta: { text: t.logOut, icon: Icons.SignOut16 },
3941
onSelect: store.logout,
4042
}),
4143
menuItem({
4244
key: 'exit',
43-
meta: { text: 'Exit app', icon: Icons.X },
45+
meta: { text: t.exitApp, icon: Icons.X },
4446
onSelect: () => exit(0),
4547
}),
4648
])
@@ -70,7 +72,7 @@ useKey('r', () => {
7072
<Tooltip
7173
:target="el"
7274
position="right"
73-
text="Navigate to repository"
75+
:text="t.navigateToRepository"
7476
/>
7577
</template>
7678
</SlotRef>
@@ -88,7 +90,7 @@ useKey('r', () => {
8890
<Tooltip
8991
:target="el"
9092
position="right"
91-
text="A new version is available"
93+
:text="t.aNewVersionIsAvailable"
9294
/>
9395

9496
<Popover
@@ -118,7 +120,7 @@ useKey('r', () => {
118120
<Tooltip
119121
:target="el"
120122
position="right"
121-
text="Reload notifications (R)"
123+
:text="t.reloadNotifications('R')"
122124
/>
123125
</template>
124126
</SlotRef>
@@ -134,7 +136,7 @@ useKey('r', () => {
134136
<Tooltip
135137
position="right"
136138
:target="el"
137-
text="More"
139+
:text="t.more"
138140
/>
139141

140142
<Popover

src/components/NotificationItem.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<script lang="ts" setup>
2-
import dayjs from 'dayjs'
32
import type { MinimalRepository, Thread } from '../api/notifications'
43
import type { NotificationList } from '../types'
5-
import { formatReason, isRepository, isThread, notificationSubjectIcon } from '../utils/notification'
4+
import { isRepository, isThread, notificationSubjectIcon } from '../utils/notification'
5+
import { useI18n } from '../composables/useI18n'
6+
import { fromNow } from '../utils/date'
67
import Separator from './Separator.vue'
78
89
interface Props {
@@ -25,6 +26,7 @@ const props = withDefaults(defineProps<Props>(), {
2526
checkable: false,
2627
})
2728
const emit = defineEmits<Emits>()
29+
const { t } = useI18n()
2830
2931
function isInteractedCheckbox(e: MouseEvent | KeyboardEvent) {
3032
return e.target instanceof HTMLElement && e.target.closest('.notification-checkbox') != null
@@ -121,9 +123,9 @@ function handleRepoClick(repo: MinimalRepository, event: MouseEvent | KeyboardEv
121123
</div>
122124

123125
<div class="notification-item-content-subtitle">
124-
{{ formatReason(value.reason) }}
126+
{{ t.reason[value.reason] }}
125127
-
126-
{{ dayjs(value.updated_at).fromNow() }}
128+
{{ fromNow(value.updated_at) }}
127129
</div>
128130
</div>
129131

src/components/Popover.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ const transformOriginMap: Record<AlignedPlacement | Side, string> = {
3434
'top': 'center bottom',
3535
}
3636
37-
const handleTransition: WowerlayTransitionFn = (type, element, done) => {
38-
const placement = element.getAttribute('data-popover-placement') as AlignedPlacement | Side
37+
const handleTransition: WowerlayTransitionFn = (type, { popover }, done) => {
38+
const placement = popover.getAttribute('data-popover-placement') as AlignedPlacement | Side
3939
const side = placement.split('-')[0] as Side
4040
4141
const vertical = side === 'top' || side === 'bottom'
@@ -51,25 +51,25 @@ const handleTransition: WowerlayTransitionFn = (type, element, done) => {
5151
opacity: 1,
5252
}
5353
54-
const oldTransformOrigin = element.style.transformOrigin
55-
element.style.transformOrigin = transformOriginMap[placement]
54+
const oldTransformOrigin = popover.style.transformOrigin
55+
popover.style.transformOrigin = transformOriginMap[placement]
5656
5757
if (type === 'leave') {
58-
const background = element.parentElement
58+
const background = popover.parentElement
5959
if (background) {
6060
background.style.setProperty('pointer-events', 'none')
61-
element.style.setProperty('pointer-events', 'auto')
61+
popover.style.setProperty('pointer-events', 'auto')
6262
}
6363
}
6464
65-
const animation = element.animate(type === 'enter' ? [from, to] : [to, from], {
65+
const animation = popover.animate(type === 'enter' ? [from, to] : [to, from], {
6666
duration: 200,
6767
easing: 'ease',
6868
})
6969
7070
animation.onfinish = () => {
7171
if (type === 'enter')
72-
element.style.transformOrigin = oldTransformOrigin
72+
popover.style.transformOrigin = oldTransformOrigin
7373
7474
done()
7575
}
@@ -192,7 +192,7 @@ useEventListener(
192192
flex-direction: column;
193193
padding: 4px;
194194
195-
> * + * {
195+
>*+* {
196196
margin-top: 2px;
197197
}
198198
}

src/components/PopoverContentInstallUpdate.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts" setup>
22
import type { UpdateManifest } from '@tauri-apps/api/updater'
3+
import { useI18n } from '../composables/useI18n'
34
import AppButton from './AppButton.vue'
45
import EmptyState from './EmptyState.vue'
56
@@ -9,15 +10,15 @@ interface Props {
910
}
1011
1112
defineProps<Props>()
12-
1313
defineEmits<{ (e: 'install'): void }>()
1414
15+
const { t } = useI18n()
1516
const appVersion = __APP_VERSION__
1617
</script>
1718

1819
<template>
1920
<div class="install-update">
20-
<EmptyState :description="`Gitification ${manifest.version} is available!`">
21+
<EmptyState :description="t.gitificationVersionIsAvailable(manifest.version)">
2122
<template #icon>
2223
<img
2324
style="border-radius: 50%;"
@@ -30,14 +31,14 @@ const appVersion = __APP_VERSION__
3031

3132
<template #footer>
3233
<p class="pharagraph">
33-
Current version is <b>{{ appVersion }}</b>
34+
<component :is="t.currentVersionIs(appVersion)" />
3435
</p>
3536

3637
<AppButton
3738
:loading="loading"
3839
@click="$emit('install')"
3940
>
40-
Install
41+
{{ t.install }}
4142
</AppButton>
4243
</template>
4344
</EmptyState>

src/components/Tooltip.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ interface Props {
1111
target?: HTMLElement | null
1212
}
1313
14-
const handleTransition: WowerlayTransitionFn = (type, element, done) => {
15-
const placement = element.getAttribute('data-popover-placement')!.split('-')[0]
14+
const handleTransition: WowerlayTransitionFn = (type, { popover }, done) => {
15+
const placement = popover.getAttribute('data-popover-placement')!.split('-')[0]
1616
1717
const vertical = placement === 'top' || placement === 'bottom'
1818
const transformFunction = vertical ? 'translateY' : 'translateX'
@@ -27,7 +27,7 @@ const handleTransition: WowerlayTransitionFn = (type, element, done) => {
2727
opacity: 1,
2828
}
2929
30-
const animation = element.animate(type === 'enter' ? [from, to] : [to, from], {
30+
const animation = popover.animate(type === 'enter' ? [from, to] : [to, from], {
3131
duration: 200,
3232
easing: 'ease',
3333
})

0 commit comments

Comments
 (0)