Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
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
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
Pleroma
pleroma-fe
Commits
2691579a
There was a problem fetching the pipeline summary.
Commit
2691579a
authored
7 years ago
by
Roger Braun
Browse files
Options
Downloads
Patches
Plain Diff
Make default path configurable.
parent
118d60b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!173
Feature/configurable default path
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main.js
+36
-35
36 additions, 35 deletions
src/main.js
static/config.json
+2
-1
2 additions, 1 deletion
static/config.json
with
38 additions
and
36 deletions
src/main.js
+
36
−
35
View file @
2691579a
...
...
@@ -63,54 +63,55 @@ const store = new Vuex.Store({
strict
:
process
.
env
.
NODE_ENV
!==
'
production
'
})
const
routes
=
[
{
name
:
'
root
'
,
path
:
'
/
'
,
redirect
:
'
/main/all
'
},
{
path
:
'
/main/all
'
,
component
:
PublicAndExternalTimeline
},
{
path
:
'
/main/public
'
,
component
:
PublicTimeline
},
{
path
:
'
/main/friends
'
,
component
:
FriendsTimeline
},
{
path
:
'
/tag/:tag
'
,
component
:
TagTimeline
},
{
name
:
'
conversation
'
,
path
:
'
/notice/:id
'
,
component
:
ConversationPage
,
meta
:
{
dontScroll
:
true
}
},
{
name
:
'
user-profile
'
,
path
:
'
/users/:id
'
,
component
:
UserProfile
},
{
name
:
'
mentions
'
,
path
:
'
/:username/mentions
'
,
component
:
Mentions
},
{
name
:
'
settings
'
,
path
:
'
/settings
'
,
component
:
Settings
},
{
name
:
'
registration
'
,
path
:
'
/registration
'
,
component
:
Registration
},
{
name
:
'
user-settings
'
,
path
:
'
/user-settings
'
,
component
:
UserSettings
}
]
const
router
=
new
VueRouter
({
mode
:
'
history
'
,
routes
,
scrollBehavior
:
(
to
,
from
,
savedPosition
)
=>
{
if
(
to
.
matched
.
some
(
m
=>
m
.
meta
.
dontScroll
))
{
return
false
}
return
savedPosition
||
{
x
:
0
,
y
:
0
}
}
})
const
i18n
=
new
VueI18n
({
locale
:
currentLocale
,
fallbackLocale
:
'
en
'
,
messages
})
/* eslint-disable no-new */
new
Vue
({
router
,
store
,
i18n
,
el
:
'
#app
'
,
render
:
h
=>
h
(
App
)
})
window
.
fetch
(
'
/static/config.json
'
)
.
then
((
res
)
=>
res
.
json
())
.
then
(({
name
,
theme
,
background
,
logo
,
registrationOpen
})
=>
{
.
then
((
data
)
=>
{
const
{
name
,
theme
,
background
,
logo
,
registrationOpen
}
=
data
store
.
dispatch
(
'
setOption
'
,
{
name
:
'
name
'
,
value
:
name
})
store
.
dispatch
(
'
setOption
'
,
{
name
:
'
theme
'
,
value
:
theme
})
store
.
dispatch
(
'
setOption
'
,
{
name
:
'
background
'
,
value
:
background
})
store
.
dispatch
(
'
setOption
'
,
{
name
:
'
logo
'
,
value
:
logo
})
store
.
dispatch
(
'
setOption
'
,
{
name
:
'
registrationOpen
'
,
value
:
registrationOpen
})
const
routes
=
[
{
name
:
'
root
'
,
path
:
'
/
'
,
redirect
:
data
[
'
defaultPath
'
]
||
'
/main/all
'
},
{
path
:
'
/main/all
'
,
component
:
PublicAndExternalTimeline
},
{
path
:
'
/main/public
'
,
component
:
PublicTimeline
},
{
path
:
'
/main/friends
'
,
component
:
FriendsTimeline
},
{
path
:
'
/tag/:tag
'
,
component
:
TagTimeline
},
{
name
:
'
conversation
'
,
path
:
'
/notice/:id
'
,
component
:
ConversationPage
,
meta
:
{
dontScroll
:
true
}
},
{
name
:
'
user-profile
'
,
path
:
'
/users/:id
'
,
component
:
UserProfile
},
{
name
:
'
mentions
'
,
path
:
'
/:username/mentions
'
,
component
:
Mentions
},
{
name
:
'
settings
'
,
path
:
'
/settings
'
,
component
:
Settings
},
{
name
:
'
registration
'
,
path
:
'
/registration
'
,
component
:
Registration
},
{
name
:
'
user-settings
'
,
path
:
'
/user-settings
'
,
component
:
UserSettings
}
]
const
router
=
new
VueRouter
({
mode
:
'
history
'
,
routes
,
scrollBehavior
:
(
to
,
from
,
savedPosition
)
=>
{
if
(
to
.
matched
.
some
(
m
=>
m
.
meta
.
dontScroll
))
{
return
false
}
return
savedPosition
||
{
x
:
0
,
y
:
0
}
}
})
/* eslint-disable no-new */
new
Vue
({
router
,
store
,
i18n
,
el
:
'
#app
'
,
render
:
h
=>
h
(
App
)
})
})
window
.
fetch
(
'
/static/terms-of-service.html
'
)
...
...
This diff is collapsed.
Click to expand it.
static/config.json
+
2
−
1
View file @
2691579a
...
...
@@ -3,5 +3,6 @@
"theme"
:
"pleroma-dark"
,
"background"
:
"/static/bg.jpg"
,
"logo"
:
"/static/logo.png"
,
"registrationOpen"
:
false
"registrationOpen"
:
false
,
"defaultPath"
:
"/main/all"
}
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