Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
funkwhale
funkwhale
Commits
ba4cceb6
Commit
ba4cceb6
authored
Apr 18, 2022
by
Kasper Seweryn
🥞
Committed by
Kasper Seweryn
Jul 03, 2022
Browse files
Fix app rendering
parent
41edd42b
Changes
5
Hide whitespace changes
Inline
Side-by-side
front/index.html
View file @
ba4cceb6
...
...
@@ -59,7 +59,7 @@
</style>
</head>
<body
class=
"theme-light"
id=
"body"
>
<body
id=
"body"
>
<div
id=
"fake-app"
>
<div
id=
"fake-sidebar"
>
<div
id=
"orange-square"
></div>
...
...
front/src/components/Sidebar.vue
View file @
ba4cceb6
...
...
@@ -480,6 +480,7 @@ import Modal from '@/components/semantic/Modal.vue'
import
$
from
'
jquery
'
import
useThemeList
from
'
@/composables/useThemeList
'
import
useTheme
from
'
@/composables/useTheme
'
export
default
{
name
:
'
Sidebar
'
,
...
...
front/src/composables/useTheme.ts
View file @
ba4cceb6
import
{
useColorMode
}
from
'
@vueuse/core
'
import
{
watch
}
from
'
@vue/composition-api
'
const
theme
=
useColorMode
()
document
.
body
.
classList
.
add
(
`theme-
${
theme
.
value
}
`
)
watch
(
theme
,
(
newValue
,
oldValue
)
=>
{
document
.
body
.
classList
.
remove
(
`theme-
${
oldValue
}
`
)
document
.
body
.
classList
.
add
(
`theme-
${
newValue
}
`
)
const
theme
=
useColorMode
({
selector
:
'
body
'
,
modes
:
{
auto
:
''
,
light
:
'
theme-light
'
,
dark
:
'
theme-dark
'
}
})
export
default
()
=>
theme
front/src/main.ts
View file @
ba4cceb6
...
...
@@ -4,7 +4,9 @@ import VueLazyload from 'vue-lazyload'
import
store
from
'
~/store
'
import
{
sync
}
from
'
vuex-router-sync
'
import
VueCompositionAPI
,
{
createApp
}
from
'
@vue/composition-api
'
import
{
CreateElement
}
from
'
vue
'
import
Vue
,
{
CreateElement
}
from
'
vue
'
Vue
.
config
.
devtools
=
true
logger
.
default
.
info
(
'
Loading environment:
'
,
import
.
meta
.
env
.
MODE
)
logger
.
default
.
debug
(
'
Environment variables:
'
,
import
.
meta
.
env
)
...
...
@@ -14,13 +16,16 @@ sync(store, router)
const
app
=
createApp
({
store
,
router
,
components
:
{
App
:
()
=>
import
(
'
~/App.vue
'
)
},
data
:
()
=>
({
isMounted
:
false
}),
async
mounted
()
{
this
.
isMounted
=
true
},
render
(
h
:
CreateElement
)
{
if
(
this
.
isMounted
)
{
return
import
(
'
~/App.vue
'
)
return
h
(
'
app
'
)
}
// TODO (wvffle): Import fake app component
...
...
front/src/modules/locale.ts
View file @
ba4cceb6
...
...
@@ -58,7 +58,7 @@ export const install: AppModule = ({ store, app }) => {
document
.
documentElement
.
setAttribute
(
'
lang
'
,
htmlLocale
)
if
(
locale
===
'
en_US
'
)
{
Vue
.
prototype
.
$language
.
current
=
locale
Vue
.
config
.
language
=
locale
store
.
commit
(
'
ui/momentLocale
'
,
'
en
'
)
}
},
{
immediate
:
true
})
...
...
Write
Preview
Supports
Markdown
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