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

Refactoring #34

Merged
merged 51 commits into from
Feb 2, 2024
Merged

Refactoring #34

merged 51 commits into from
Feb 2, 2024

Conversation

n1crack
Copy link
Owner

@n1crack n1crack commented Jan 30, 2024

  • new: add 3rd theme option: "System" // (Light - Dark - System)
  • bug: download button not working as expected, most browsers doesn't support force download for a couple of reason, so we should give a link to users and tell them "you can download it by right click and save as". before, i did it in a hacky way, but it doesn't work if the file doesn't have "Content-Disposition" headers.
  • drag&drop on folders at address bar
  • Fix search input zoom issue
  • update "move" modal
  • Instead loading locales async, we should copy the locale files to dist folder without hash codes, and include them in the setup.. In this way, only the selected languages will be evaluated in the final.
  • refactor the code related item selection
  • Refactor Upload Code

@n1crack
Copy link
Owner Author

n1crack commented Jan 30, 2024

@DreamlandOwO we should refactor uppy codes. Before it was less than 140lines, now it is almost 500 lines of code.
I'm gonna leave it to you 😆 I have no idea whats going on there..

@n1crack
Copy link
Owner Author

n1crack commented Feb 2, 2024

Ok, big update related to localization part. Multi language will not be loaded automatically, you need to import the language files yourself when registering the component.

so registering the Vuefinder like this:

app.use(VueFinder)

as a result, lang dropdown will be hidden, and english will be the main language :

image

The localization files are under the "dist/locales" folder.

Normally, you would like to import the locales from the package, the only thing, just be sure the locale keys matches the filename..

app.use(VueFinder,
   {
       i18n: {   
           en: async () => await import ("vuefinder/dist/locales/en.js"),
           // add many as you like, they will be added to dropdown in the vuefinder's settings modal.
       }
   }
)

if you dont want to import async, you can import the locales like this.

//..
 import en from "vuefinder/dist/locales/en.js"
 import fr from "vuefinder/dist/locales/fr.js"
 // other langs..
//..
app.use(VueFinder, 
  {
       i18n: { en, fr }
   }
)

this should be added the documentation ofc.

@n1crack
Copy link
Owner Author

n1crack commented Feb 2, 2024

I had to put i18n insiide computed object, it wasn't updated as expected. i18n functionality should be refactored later.

const i18n = computed(() => useI18n(storage, props.locale, emitter, supportedLocales));

I think we are close to finishing this PR. Maybe we should make another PR for the last 2 todo items.

@n1crack n1crack merged commit 9ef86a2 into master Feb 2, 2024
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.

2 participants