Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
58fa0007
Unverified
Commit
58fa0007
authored
Apr 16, 2023
by
boojack
Committed by
GitHub
Apr 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update version to `0.12.2` (#1538)
parent
3060dafb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
version.go
server/version/version.go
+2
-2
HomeSidebar.tsx
web/src/components/HomeSidebar.tsx
+13
-4
No files found.
server/version/version.go
View file @
58fa0007
...
@@ -9,10 +9,10 @@ import (
...
@@ -9,10 +9,10 @@ import (
// Version is the service current released version.
// Version is the service current released version.
// Semantic versioning: https://semver.org/
// Semantic versioning: https://semver.org/
var
Version
=
"0.12.
1
"
var
Version
=
"0.12.
2
"
// DevVersion is the service current development version.
// DevVersion is the service current development version.
var
DevVersion
=
"0.12.
1
"
var
DevVersion
=
"0.12.
2
"
func
GetCurrentVersion
(
mode
string
)
string
{
func
GetCurrentVersion
(
mode
string
)
string
{
if
mode
==
"dev"
||
mode
==
"demo"
{
if
mode
==
"dev"
||
mode
==
"demo"
{
...
...
web/src/components/HomeSidebar.tsx
View file @
58fa0007
import
{
useEffect
}
from
"react"
;
import
{
useEffect
}
from
"react"
;
import
{
useLocation
}
from
"react-router-dom"
;
import
{
resolution
}
from
"../utils/layout"
;
import
{
resolution
}
from
"../utils/layout"
;
import
{
useLayoutStore
,
useUserStore
}
from
"../store/module"
;
import
{
useLayoutStore
,
useUserStore
}
from
"../store/module"
;
import
ShortcutList
from
"./ShortcutList"
;
import
ShortcutList
from
"./ShortcutList"
;
...
@@ -8,19 +7,29 @@ import SearchBar from "./SearchBar";
...
@@ -8,19 +7,29 @@ import SearchBar from "./SearchBar";
import
UsageHeatMap
from
"./UsageHeatMap"
;
import
UsageHeatMap
from
"./UsageHeatMap"
;
const
HomeSidebar
=
()
=>
{
const
HomeSidebar
=
()
=>
{
const
location
=
useLocation
();
const
layoutStore
=
useLayoutStore
();
const
layoutStore
=
useLayoutStore
();
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
();
const
showHomeSidebar
=
layoutStore
.
state
.
showHomeSidebar
;
const
showHomeSidebar
=
layoutStore
.
state
.
showHomeSidebar
;
useEffect
(()
=>
{
useEffect
(()
=>
{
let
initialized
=
false
;
let
lastStatus
=
layoutStore
.
state
.
showHomeSidebar
;
let
lastStatus
=
layoutStore
.
state
.
showHomeSidebar
;
const
handleWindowResize
=
()
=>
{
const
handleWindowResize
=
()
=>
{
cons
t
nextStatus
=
window
.
innerWidth
<
resolution
.
md
;
le
t
nextStatus
=
window
.
innerWidth
<
resolution
.
md
;
if
(
lastStatus
!==
nextStatus
)
{
if
(
lastStatus
!==
nextStatus
)
{
if
(
!
initialized
&&
nextStatus
)
{
// Don't show sidebar on first load in mobile view.
nextStatus
=
false
;
}
layoutStore
.
setHomeSidebarStatus
(
nextStatus
);
layoutStore
.
setHomeSidebarStatus
(
nextStatus
);
lastStatus
=
nextStatus
;
lastStatus
=
nextStatus
;
}
}
if
(
!
initialized
)
{
initialized
=
true
;
return
;
}
};
};
window
.
addEventListener
(
"resize"
,
handleWindowResize
);
window
.
addEventListener
(
"resize"
,
handleWindowResize
);
...
@@ -29,7 +38,7 @@ const HomeSidebar = () => {
...
@@ -29,7 +38,7 @@ const HomeSidebar = () => {
return
()
=>
{
return
()
=>
{
window
.
removeEventListener
(
"resize"
,
handleWindowResize
);
window
.
removeEventListener
(
"resize"
,
handleWindowResize
);
};
};
},
[
location
]);
},
[]);
return
(
return
(
<
div
<
div
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment