mirror of
https://github.com/haiwen/seahub.git
synced 2025-10-20 10:20:42 +00:00
fix shared txt file line wrap
This commit is contained in:
@@ -19,10 +19,11 @@ const FileContent = ({ lineWrapping }) => {
|
||||
};
|
||||
|
||||
const SharedFileViewText = () => {
|
||||
let [lineWrapping, setLineWrapping] = useState(localStorage.getItem('sf_txt_file_line_wrapping') === 'true' || true);
|
||||
let [lineWrapping, setLineWrapping] = useState(localStorage.getItem('sf_txt_file_line_wrapping') !== 'false');
|
||||
|
||||
const updateLineWrapping = (newLineWrapping) => {
|
||||
setLineWrapping(newLineWrapping);
|
||||
localStorage.setItem('sf_txt_file_line_wrapping', newLineWrapping);
|
||||
};
|
||||
|
||||
return (
|
||||
|
@@ -49,7 +49,7 @@ class ViewFileText extends React.Component {
|
||||
needSave: false,
|
||||
isSaving: false,
|
||||
participants: [],
|
||||
lineWrapping: localStorage.getItem('sf_txt_file_line_wrapping') === 'true' || true,
|
||||
lineWrapping: localStorage.getItem('sf_txt_file_line_wrapping') !== 'false',
|
||||
};
|
||||
this.onSave = this.onSave.bind(this);
|
||||
this.isParticipant = false;
|
||||
|
Reference in New Issue
Block a user