Merge pull request #2696 from overleaf/ns-default-font-family-line-height

Set default options for font family and line height

GitOrigin-RevId: 7c5a29134e75e3545e508021c305fa6d6e0d04c1
This commit is contained in:
Eric Mc Sween 2020-03-24 09:05:55 -04:00 committed by Copybot
parent 0ca191c947
commit 5cf06bbb4d
5 changed files with 6 additions and 12 deletions

View file

@ -806,8 +806,8 @@ const ProjectController = {
autoPairDelimiters: user.ace.autoPairDelimiters,
pdfViewer: user.ace.pdfViewer,
syntaxValidation: user.ace.syntaxValidation,
fontFamily: user.ace.fontFamily,
lineHeight: user.ace.lineHeight,
fontFamily: user.ace.fontFamily || 'lucida',
lineHeight: user.ace.lineHeight || 'normal',
overallTheme: user.ace.overallTheme
},
trackChangesState: project.track_changes,

View file

@ -321,9 +321,7 @@ module.exports = function(webRouter, privateApiRouter, publicApiRouter) {
chatMessageBorderSaturation: '85%',
chatMessageBorderLightness: '40%',
chatMessageBgSaturation: '85%',
chatMessageBgLightness: '40%',
defaultFontFamily: 'lucida',
defaultLineHeight: 'normal'
chatMessageBgLightness: '40%'
}
next()
})

View file

@ -77,8 +77,8 @@ div.full-size(
track-changes= "editor.trackChanges",
doc-id="editor.open_doc_id"
renderer-data="reviewPanel.rendererData"
font-family="settings.fontFamily || ui.defaultFontFamily"
line-height="settings.lineHeight || ui.defaultLineHeight"
font-family="settings.fontFamily"
line-height="settings.lineHeight"
)
if !isRestrictedTokenMember

View file

@ -169,7 +169,6 @@ aside#left-menu.full-size(
name="fontFamily"
ng-model="settings.fontFamily"
)
option(value="", disabled) #{translate("default")}
each fontFamily in ['monaco', 'lucida']
option(value=fontFamily) #{capitalize(fontFamily)}
@ -179,7 +178,6 @@ aside#left-menu.full-size(
name="lineHeight"
ng-model="settings.lineHeight"
)
option(value="", disabled) #{translate("default")}
each lineHeight in ['compact', 'normal', 'wide']
option(value=lineHeight) #{translate(lineHeight)}

View file

@ -117,9 +117,7 @@ define([
reviewPanelOpen: localStorage(`ui.reviewPanelOpen.${window.project_id}`),
miniReviewPanelVisible: false,
chatResizerSizeOpen: window.uiConfig.chatResizerSizeOpen,
chatResizerSizeClosed: window.uiConfig.chatResizerSizeClosed,
defaultFontFamily: window.uiConfig.defaultFontFamily,
defaultLineHeight: window.uiConfig.defaultLineHeight
chatResizerSizeClosed: window.uiConfig.chatResizerSizeClosed
}
$scope.user = window.user