Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add max upload size setting to UI & UI improvements #1646

Merged

Conversation

lincolnthalles
Copy link
Contributor

  • feat: add max upload size setting to UI

  • feat: max upload size setting is checked on UI during upload, but also enforced by back-end.

  • feat: add HelpButton component with some links to official docs were appropriate

  • remove LearnMore component in favor of the much more versatile HelpButton (can show tooltips, links or a dialog)

  • fix: overflowing mobile layout for Create SSO, Create Storage and other Settings dialogs

  • refactor (back-end): change some if/else to switch statements

  • refactor (back-end): inline some err == nil checks

! Existing databases without the new setting 'max-upload-size-mib' will show an upload error, but this can be user-fixed by simply setting the value on system settings UI.

Unfortunately this conflicts with #1640, but I think it's a better approach to edit the upload limit on UI rather than command line.
image

Closes #1577

development and production environments.

Default profile.Data will be set to "C:\ProgramData\memos" on Windows.
Folder will be created if it does not exist, as this behavior is
expected for Windows applications.

System service installation can be achieved with third-party tools,
explained in docs/windows-service.md.

Not sure if it's worth using https://github.com/kardianos/service
to make service support built-in.

This could be a nice addition alongside usememos#1583 (add Windows artifacts)
- Fix local file storage path handling on Windows

- Improve Windows dev script
- feat: add max upload size setting to UI

- feat: max upload size setting is checked on UI during upload,
but also enforced by the server

- fix: overflowing mobile layout for Create SSO, Create Storage
and other Settings dialogs

- feat: add HelpButton component with some links to docs were appropriate

- remove LearnMore component in favor of HelpButton

- refactor: change some if/else to switch statements

- refactor: inline some err == nil checks

! Existing databases without the new setting 'max-upload-size-mib'
will show an upload error, but this can be user-fixed by simply
setting the value on system settings UI.
@github-actions
Copy link

github-actions bot commented May 9, 2023

Uffizzi Preview deployment-24721 was deleted.

@Zeng1998
Copy link
Contributor

@boojack

#1640 (comment)

As for the question of whether to put this configuration to command args or system settings, I prefer to follow the previous thought that without too many unimportant items in the setting.

Of course, it's also acceptable to place it in the system settings.

Copy link
Collaborator

@boojack boojack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, otherwise

server/system.go Show resolved Hide resolved
store/system_setting.go Outdated Show resolved Hide resolved
Copy link
Contributor

@CorrectRoadH CorrectRoadH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@boojack
Copy link
Collaborator

boojack commented May 12, 2023

And please update the icon into a normal size. It's a bit too big.

image

Copy link
Collaborator

@boojack boojack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution.

@boojack boojack merged commit 96021e5 into usememos:main May 13, 2023
11 checks passed
@lincolnthalles lincolnthalles deleted the feat--add-max-upload-size-setting-to-UI branch May 13, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

overload max size: 32MB
4 participants