Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scientia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zhige Yu
scientia
Commits
25f9dd1c
Commit
25f9dd1c
authored
4 years ago
by
danieldeng2
Browse files
Options
Downloads
Patches
Plain Diff
Added option for users to set the interface size
parent
b0bb2223
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/public/index.html
+7
-1
7 additions, 1 deletion
frontend/public/index.html
frontend/src/components/App.tsx
+8
-1
8 additions, 1 deletion
frontend/src/components/App.tsx
with
15 additions
and
2 deletions
frontend/public/index.html
+
7
−
1
View file @
25f9dd1c
...
...
@@ -40,6 +40,12 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/holder/2.9.7/holder.js"
></script>
<script>
/* functions to set user settings in console*/
function
setInterfaceSize
(
size
)
{
document
.
documentElement
.
style
.
fontSize
=
`
${
size
}
%`
;
localStorage
.
setItem
(
"
interfaceSize
"
,
size
);
}
</script>
</body>
</html>
This diff is collapsed.
Click to expand it.
frontend/src/components/App.tsx
+
8
−
1
View file @
25f9dd1c
...
...
@@ -19,7 +19,14 @@ class App extends React.Component<{}, AppState> {
constructor
(
props
:
{})
{
super
(
props
);
this
.
state
=
{
toggledLeft
:
false
,
toggledRight
:
false
};
}
}
componentDidMount
(){
let
interfaceSize
=
localStorage
.
getItem
(
"
interfaceSize
"
);
if
(
interfaceSize
){
document
.
documentElement
.
style
.
fontSize
=
`
${
interfaceSize
}
%`
;
}
}
toggleLeftBar
()
{
this
.
setState
((
state
)
=>
({
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment