1
0
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:
Michael An
2025-10-10 16:11:58 +08:00
parent af919ebeb5
commit 85e7455092
2 changed files with 3 additions and 2 deletions

View File

@@ -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 (

View File

@@ -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;