feat: complete remediation phase 3
Some checks failed
Automated Container Build / build-and-push (push) Failing after 15s
Some checks failed
Automated Container Build / build-and-push (push) Failing after 15s
This commit is contained in:
parent
0221e277a6
commit
6772ba8c43
10 changed files with 63 additions and 20 deletions
|
|
@ -6,7 +6,8 @@
|
|||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
"lint": "next lint",
|
||||
"postinstall": "node -e \"require('fs').copyFileSync('node_modules/pdfjs-dist/build/pdf.worker.min.mjs', 'public/pdf.worker.min.mjs')\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@onlyoffice/document-editor-react": "^2.2.0",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import 'react-pdf/dist/Page/AnnotationLayer.css';
|
|||
import 'react-pdf/dist/Page/TextLayer.css';
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`;
|
||||
pdfjs.GlobalWorkerOptions.workerSrc = `/pdf.worker.min.mjs`;
|
||||
}
|
||||
|
||||
export default function PdfViewer({ url }: { url: string }) {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,14 @@ export default function SettingsPage({ onLogout }: SettingsPageProps) {
|
|||
setSuccess(false);
|
||||
|
||||
try {
|
||||
await api.updateSettings(settings);
|
||||
const existing = await api.getSettings();
|
||||
const merged = {
|
||||
...(existing?.settings || existing || {}),
|
||||
theme: settings.theme,
|
||||
grid_size: settings.grid_size,
|
||||
trash_auto_purge_days: settings.trash_auto_purge_days,
|
||||
};
|
||||
await api.updateSettings(merged);
|
||||
setSuccess(true);
|
||||
setTimeout(() => setSuccess(false), 3000);
|
||||
applyTheme(settings.theme);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,8 @@ export default function ShareModal({ filePath, onClose }: ShareModalProps) {
|
|||
<Shield className="w-4 h-4" /> Password (Optional)
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
type="password"
|
||||
autoComplete="new-password"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
placeholder="Leave blank for no password"
|
||||
|
|
|
|||
Reference in a new issue