File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858 <!-- Hero Section -->
5959 < header class ="hero " id ="hero ">
6060 < div class ="hero-content ">
61- < div class ="hero-badge "> Open Source • Free Forever</ div >
61+ < div class ="hero-badge "> Open Source • Free Forever • < span id =" app-version " > v0.0.5 </ span > </ div >
6262 < h1 class ="hero-title ">
6363 Your Desktop.< br />
6464 < span class ="gradient-text "> Your Weather.</ span >
Original file line number Diff line number Diff line change 7171 }
7272 } ) ;
7373 } ) ;
74+
75+ // --- Fetch current version ---
76+ const versionUrl = "https://raw.githubusercontent.com/gcclinux/WeatherWidget/refs/heads/main/release" ;
77+ const versionElement = document . getElementById ( "app-version" ) ;
78+ if ( versionElement ) {
79+ fetch ( versionUrl )
80+ . then ( response => response . text ( ) )
81+ . then ( version => {
82+ if ( version ) {
83+ versionElement . textContent = `v${ version . trim ( ) } ` ;
84+ }
85+ } )
86+ . catch ( err => {
87+ console . error ( "Failed to fetch version:" , err ) ;
88+ } ) ;
89+ }
7490} ) ( ) ;
You can’t perform that action at this time.
0 commit comments