Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
10 changed files
with
184 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export default axios => ({ | ||
call: (mod, method, params = null, file = null) => { | ||
call: (mod, method, params = null, file = null, progress = true) => { | ||
let formData = new FormData(); | ||
if (params) formData.append('args', JSON.stringify(params)); | ||
if (file) formData.append('file', file); | ||
return axios.post(`/gateway/call/${mod}?method=${method}`, formData) | ||
return axios.post(`/gateway/call/${mod}?method=${method}`, formData, {progress: progress}) | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import {getToolByRoute} from "~/libs/common"; | ||
|
||
const preferences = { | ||
previousPath: '' | ||
} | ||
|
||
const regexps = { | ||
index: /^index/i, | ||
tools: /^tools/i, | ||
tag: /^tag/i, | ||
settings: /^settings/i, | ||
} | ||
|
||
export default function ({route, store, app}) { | ||
if (route.path !== preferences.previousPath) { | ||
if (regexps.index.test(route.name)) { | ||
store.commit('runtime/setCurrentTitle', '') | ||
} else if (regexps.tools.test(route.name)) { | ||
const universalPath = route.path.replace(/^\/[a-z]{2}\//i, '/') | ||
store.commit('runtime/setCurrentTitle', getToolByRoute(universalPath).title) | ||
} else if (regexps.tag.test(route.name)) { | ||
store.commit('runtime/setCurrentTitle', `tags.${route.params.tag}`) | ||
} else if (regexps.settings.test(route.name)) { | ||
store.commit('runtime/setCurrentTitle', 'page.settings.title') | ||
} | ||
|
||
store.commit('runtime/setShowMiniBar', regexps.tools.test(route.name)) | ||
} else { | ||
/* ignore */ | ||
} | ||
preferences.previousPath = route.path | ||
} |
Oops, something went wrong.
1a28d63
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
ctfever – ./
ctfever.vercel.app
ctfever-git-main-hoshino-suzumi.vercel.app
ctfever.uniiem.com
ctfever-hoshino-suzumi.vercel.app