bug fix
This commit is contained in:
parent
15d4c69c3a
commit
8730afbbbe
13
index.html
13
index.html
@ -1010,7 +1010,7 @@
|
|||||||
if (firstLoad || params.articleID !== pagesData.params.articleID) {
|
if (firstLoad || params.articleID !== pagesData.params.articleID) {
|
||||||
if (!params.articleID) {
|
if (!params.articleID) {
|
||||||
// if no articleID is provided, get a random article from work-in-progress
|
// if no articleID is provided, get a random article from work-in-progress
|
||||||
const randomArticle = floCrypto.randInt(0, floGlobals.appObjects.cc.wipArticles.length - 1)
|
const randomArticle = floCrypto.randInt(0, floGlobals.appObjects.cc.wipArticles.filter(v => v).length - 1)
|
||||||
params['articleID'] = floGlobals.appObjects.cc.wipArticles[randomArticle]
|
params['articleID'] = floGlobals.appObjects.cc.wipArticles[randomArticle]
|
||||||
}
|
}
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
@ -1345,7 +1345,7 @@
|
|||||||
getConfirmation('Mark as WIP article?').then(res => {
|
getConfirmation('Mark as WIP article?').then(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
if (!floGlobals.appObjects.cc.wipArticles.includes(floGlobals.currentArticle.id)) {
|
if (!floGlobals.appObjects.cc.wipArticles.includes(floGlobals.currentArticle.id)) {
|
||||||
floGlobals.appObjects.cc.wipArticles.push(floGlobals.currentArticle.id)
|
floGlobals.appObjects.cc.wipArticles.filter(v => v).push(floGlobals.currentArticle.id)
|
||||||
floCloudAPI.updateObjectData('cc')
|
floCloudAPI.updateObjectData('cc')
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
notify('Marked current article as WIP', 'success')
|
notify('Marked current article as WIP', 'success')
|
||||||
@ -1726,7 +1726,7 @@
|
|||||||
const render = {
|
const render = {
|
||||||
article(id, focusMode) {
|
article(id, focusMode) {
|
||||||
floGlobals.currentArticle.id = id
|
floGlobals.currentArticle.id = id
|
||||||
parseArticleData()
|
parseArticleData(id)
|
||||||
const { title } = floGlobals.appObjects.cc.articleList[id]
|
const { title } = floGlobals.appObjects.cc.articleList[id]
|
||||||
const { writer, sections } = floGlobals.currentArticle
|
const { writer, sections } = floGlobals.currentArticle
|
||||||
let assignedSection = localStorage.getItem(`${id}_assigned_section_${myFloID}`)
|
let assignedSection = localStorage.getItem(`${id}_assigned_section_${myFloID}`)
|
||||||
@ -1895,9 +1895,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseArticleData() {
|
function parseArticleData(articleID) {
|
||||||
const { sections, editors, public } = floGlobals.appObjects[floGlobals.currentArticle.id]
|
console.log('Parsing article data...', articleID)
|
||||||
const generalData = floGlobals.generalData[`${floGlobals.currentArticle.id}_gd|${floGlobals.adminID}|${floGlobals.application}`]
|
const { sections, editors, public } = floGlobals.appObjects[articleID]
|
||||||
|
const generalData = floGlobals.generalData[`${articleID}_gd|${floGlobals.adminID}|${floGlobals.application}`]
|
||||||
floGlobals.currentArticle['sections'] = {}
|
floGlobals.currentArticle['sections'] = {}
|
||||||
sections.forEach(({ id, title }) => {
|
sections.forEach(({ id, title }) => {
|
||||||
floGlobals.currentArticle['sections'][id] = {
|
floGlobals.currentArticle['sections'][id] = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user