automatic versioning on tags

This commit is contained in:
lowcarbdev
2025-11-22 17:03:01 -07:00
parent 4dcac1fdfb
commit b6d63fc2d2
7 changed files with 56 additions and 20 deletions
+14 -2
View File
@@ -28,6 +28,7 @@ function App() {
const [showUpload, setShowUpload] = useState(false)
const [showPasswordModal, setShowPasswordModal] = useState(false)
const [searchFilter, setSearchFilter] = useState('')
const [version, setVersion] = useState('...')
// Mobile sidebar state
const [showSidebar, setShowSidebar] = useState(true)
@@ -51,8 +52,19 @@ function App() {
useEffect(() => {
fetchDateRange()
fetchConversations()
fetchVersion()
}, [])
const fetchVersion = async () => {
try {
const response = await axios.get(`${API_BASE}/version`)
setVersion(response.data.version || 'unknown')
} catch (error) {
console.error('Failed to fetch version:', error)
setVersion('unknown')
}
}
useEffect(() => {
fetchConversations()
}, [startDate, endDate])
@@ -177,10 +189,10 @@ function App() {
</Dropdown.Toggle>
<Dropdown.Menu>
<Dropdown.ItemText className="fw-semibold">
User: {user?.username}
{user?.username}
</Dropdown.ItemText>
<Dropdown.ItemText className="small text-muted">
Version {__APP_VERSION__}
Version {version}
</Dropdown.ItemText>
<Dropdown.Divider />
<Dropdown.Item onClick={() => setShowPasswordModal(true)}>