Skip to content

Commit c8f618b

Browse files
committed
feat: added about page
1 parent 27332ff commit c8f618b

File tree

11 files changed

+634
-4
lines changed

11 files changed

+634
-4
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ jobs:
3030
}
3131
if ($p) { $_ }
3232
}
33-
Add-Content -Path $env:GITHUB_ENV -Value "changelog<<EOF"
34-
Add-Content -Path $env:GITHUB_ENV -Value "$CHANGELOG"
35-
Add-Content -Path $env:GITHUB_ENV -Value "EOF"
3633
echo "::set-output name=changelog::$CHANGELOG"
34+
echo "changelog=$CHANGELOG" >> $GITHUB_ENV
3735
3836
- name: Run build script
3937
run: |

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to VRCNotify will be documented in this file.
44

5+
## v3.0.2
6+
*Released on 2024-02-12*
7+
8+
### Added
9+
- Added about page.
10+
- Implemented version check function.
11+
512
## v3.0.1
613
*Released on 2024-01-24*
714

app.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import requests
1313

1414
# ------- CONSTANTS -------
15-
VERSION = "3.0.1"
15+
VERSION = "3.0.2"
1616
STATES = ["waiting for log", "notify ready", "paused notify", "error", "webhook setup", "sending webhook"]
1717
COLORS = {
1818
"waiting for log": "rgba(0, 100, 255, 0.7)",
@@ -117,6 +117,33 @@ def handle_input(now_state, input_value):
117117
state.update_state("waiting for log")
118118
state.update_latest_activity("Config file written.")
119119

120+
@eel.expose
121+
def get_current_version():
122+
return VERSION
123+
124+
@eel.expose
125+
def get_latest_version():
126+
# GitHub API를 통해 최신 버전 확인
127+
try:
128+
response = requests.get("https://api.github.com/repos/soumt-r/VRCNotify/releases/latest")
129+
if response.status_code == 200:
130+
return response.json()["tag_name"].replace('v', '')
131+
return "Unknown"
132+
except:
133+
return "Unknown"
134+
135+
@eel.expose
136+
def get_changelog():
137+
# GitHub API를 통해 CHANGELOG.md 내용 가져오기
138+
try:
139+
response = requests.get("https://api.github.com/repos/soumt-r/VRCNotify/contents/CHANGELOG.md")
140+
if response.status_code == 200:
141+
import base64
142+
return base64.b64decode(response.json()["content"]).decode("utf-8")
143+
return "Failed to load changelog."
144+
except:
145+
return "Failed to load changelog."
146+
120147
# ------- STATE MANAGEMENT -------
121148
class VRCNotifyState:
122149
# Singleton

0 commit comments

Comments
 (0)