Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Creak
funkwhale
Commits
d92d75f8
Verified
Commit
d92d75f8
authored
3 years ago
by
Georg Krause
Browse files
Options
Downloads
Patches
Plain Diff
Fix linting of App.vue
parent
60c6a193
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
front/src/App.vue
+8
-30
8 additions, 30 deletions
front/src/App.vue
with
8 additions
and
30 deletions
front/src/App.vue
+
8
−
30
View file @
d92d75f8
...
...
@@ -3,7 +3,7 @@
id=
"app"
:key=
"String($store.state.instance.instanceUrl)"
:class=
"[$store.state.ui.queueFocused ? 'queue-focused' : '',
{'has-bottom-player': $store.state.queue.tracks.length > 0}]"
{'has-bottom-player': $store.state.queue.tracks.length > 0}]"
>
<!-- here, we display custom stylesheets, if any -->
<link
...
...
@@ -47,7 +47,6 @@
</
template
>
<
script
>
import
Vue
from
'
vue
'
import
axios
from
'
axios
'
import
_
from
'
@/lodash
'
import
{
mapState
,
mapGetters
}
from
'
vuex
'
...
...
@@ -59,11 +58,11 @@ import { getClientOnlyRadio } from '@/radios'
import
Player
from
'
@/components/audio/Player.vue
'
import
Queue
from
'
@/components/Queue.vue
'
import
PlaylistModal
from
'
@/components/playlists/PlaylistModal.vue
'
import
UploadModal
from
'
@/components/channels/UploadModal.vue
'
import
Channel
UploadModal
from
'
@/components/channels/UploadModal.vue
'
import
Sidebar
from
'
@/components/Sidebar.vue
'
import
ServiceMessages
from
'
@/components/ServiceMessages.vue
'
import
SetInstanceModal
from
'
@/components/SetInstanceModal.vue
'
import
ShortcutsMod
e
l
from
'
@/components/ShortcutsModal.vue
'
import
ShortcutsMod
a
l
from
'
@/components/ShortcutsModal.vue
'
import
FilterModal
from
'
@/components/moderation/FilterModal.vue
'
import
ReportModal
from
'
@/components/moderation/ReportModal.vue
'
...
...
@@ -191,26 +190,6 @@ export default {
self
.
$language
.
current
=
newValue
return
self
.
$store
.
commit
(
'
ui/momentLocale
'
,
'
en
'
)
}
import
(
'
./translations/en_GB.json
'
).
then
((
response
)
=>
{
Vue
.
$translations
[
newValue
]
=
response
.
default
[
newValue
]
}).
finally
(()
=>
{
// set current language twice, otherwise we seem to have a cache somewhere
// and rendering does not happen
self
.
$language
.
current
=
'
noop
'
self
.
$language
.
current
=
newValue
})
const
momentLocale
=
newValue
.
replace
(
'
_
'
,
'
-
'
).
toLowerCase
()
import
(
'
moment/locale/en-gb.js
'
).
then
(()
=>
{
self
.
$store
.
commit
(
'
ui/momentLocale
'
,
momentLocale
)
}).
catch
(()
=>
{
console
.
log
(
'
No momentjs locale available for
'
,
momentLocale
)
const
shortLocale
=
momentLocale
.
split
(
'
-
'
)[
0
]
import
(
'
moment/locale/en-gb.js
'
).
then
(()
=>
{
self
.
$store
.
commit
(
'
ui/momentLocale
'
,
shortLocale
)
}).
catch
(()
=>
{
console
.
log
(
'
No momentjs locale available for
'
,
shortLocale
)
})
})
}
},
currentTrack
:
{
...
...
@@ -293,7 +272,7 @@ export default {
// 3. use the current url
const
defaultInstanceUrl
=
this
.
$store
.
state
.
instance
.
frontSettings
.
defaultServerUrl
||
import
.
meta
.
env
.
VUE_APP_INSTANCE_URL
||
this
.
$store
.
getters
[
'
instance/defaultUrl
'
]()
process
.
env
.
VUE_APP_INSTANCE_URL
||
this
.
$store
.
getters
[
'
instance/defaultUrl
'
]()
this
.
$store
.
commit
(
'
instance/instanceUrl
'
,
defaultInstanceUrl
)
}
else
{
// needed to trigger initialization of axios / service worker
...
...
@@ -434,11 +413,10 @@ export default {
this
.
disconnect
()
const
self
=
this
const
token
=
this
.
$store
.
state
.
auth
.
token
// let token = 'test'
const
bridge
=
new
WebSocketBridge
()
this
.
bridge
=
bridge
let
url
=
this
.
$store
.
getters
[
'
instance/absoluteUrl
'
](
'
api/v1/activity?token=${token}
'
)
this
.
$store
.
getters
[
'
instance/absoluteUrl
'
](
`
api/v1/activity?token=
${
token
}
`
)
url
=
url
.
replace
(
'
http://
'
,
'
ws://
'
)
url
=
url
.
replace
(
'
https://
'
,
'
wss://
'
)
bridge
.
connect
(
...
...
@@ -457,7 +435,7 @@ export default {
const
albumArtist
=
(
track
.
album
)
?
track
.
album
.
artist
.
name
:
null
const
artistName
=
(
(
track
.
artist
)
?
track
.
artist
.
name
:
albumArtist
)
const
text
=
'
♫ ${trackTitle} – ${artistName} ♫
'
const
text
=
`
♫
${
trackTitle
}
–
${
artistName
}
♫
`
return
text
},
updateDocumentTitle
()
{
...
...
@@ -489,8 +467,8 @@ export default {
},
setTheme
(
theme
)
{
const
oldTheme
=
(
theme
===
'
light
'
)
?
'
dark
'
:
'
light
'
document
.
body
.
classList
.
remove
(
'
theme-${oldTheme}
'
)
document
.
body
.
classList
.
add
(
'
theme-${theme}
'
)
document
.
body
.
classList
.
remove
(
`
theme-
${
oldTheme
}
`
)
document
.
body
.
classList
.
add
(
`
theme-
${
theme
}
`
)
}
}
}
...
...
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