rejetto forum

a new beginning...

rejetto · 84 · 33262

0 Members and 1 Guest are viewing this topic.

Offline NaitLee

  • Tireless poster
  • ****
    • Posts: 203
  • Computer-brain boy
    • View Profile
The middleware plugin feature is completely well... ;)

... But before I success I encountered a bug:
The function deleteModule in plugins.js is recursive,
but when a plugin have requires to Node/HFS native modules, a infinite recurse occurs.
Code: [Select]
plugin error importing test.js RangeError: Maximum call stack size exceeded
To reproduce, a single "require" to HFS native module in a valid plugin can trigger this.
So, only do recurse if it's a real "plugin" (or really need be deleted) and not deleted before.
(found this after debugging for half an hour :()

And, consider a event-driven plugin structure? We can do almost everything with dom addEventListener, and also event.preventDefault :)
Don't forget the old "event script", too :)
"Computation is not forbidden magic."
Takeback Template | PHFS


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
thanks for the bug report. I will work on it.
What was you exactly thinking for the events? Would loading your js in the page be enough for your purpose?


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i just published the "download counter" feature in form of plugin (disabled in config file)


Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
Because somebody probably will use this on Gigabit,

I'd like a rights flag "SimpleView"
so that if "SimpleView" is assigned to a user, they would see a view that looks 'easier' like Stripes.tpl
. . . because not many users need to manage the server. . .  The majority just wanted files/content.
P.S. 
A "SimpleView" flag assigned to a folder or guest, could be very useful for public content.   
Not only for appearance, but also because a simple view can be ~5x more robust for high traffic.
P.P.S.
Additional request:  WatchDog feature included (to restart the server app, just in case it went unresponsive for x minutes).


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
hi Danny, do you mean gigabit as speed of your connection? if positive, i'm using a gigabit, but i don't see how it is related. Normally it's people with slow connections who has special needs.

i don't know if you saw the new template, but is very similar to the one of hfs 2.4 . Is that simple enough?
if negative, could you tell me what you would like to see removed ?
per-folder template could be a nice feature.
per-user template could be as well, but it means you first have to login, and that means you'd do it with another template. Sounds bad.
a good watchdog should not be in the server, but outside of it. I guess a good watchdog has already been made, and will work with hfs with minimal configuration.


Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
i don't know if you saw the new template, but is very similar to the one of hfs 2.4 . Is that simple enough? if negative, could you tell me what you would like to see removed?
Not simple enough for file server.  Because most users don't need to see server management menu. 
So, not really stuff to remove; but, there is stuff to Hide (to clear/clean the view, for the majority of users). 
 
The need is for a switchable view: 
Simple-Grandma mode (like Stripes), in light colors
Server-Manager mode (like hfs2.4),  in dark colors
. . . and default public/guest to use simple-grandma mode (it is right to use the Login button for mode/view switch). 

Per circa 1999 Orangebook and in regard to the Zenworks security module, the original background-color view switch was lightblue for basic users, darkblue for printer/backup manager, darkred for Administrator and lightgreen for inspector (business owner could see all but not accidentally disable the server). . . At login, the desktop icons as well as the program menu options would populate (or de-populate) to fit the user's access/experience level. 
Today, I think that can be translated into lightblue (colors like twitter, facebook, openmediavault, Stripes.tpl) for basic users, and then a dark theme for server managers. 

An example of menu for simple-grandma mode: 
HFS File Server
[sort][................................searchbox.............................][login]
A small thin menu, so that basic users (especially guest/public) are more likely to notice the file-listing/content, primarily. 


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
can you tell me what is "server management menu" that you want to hide? i still fail to see


Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
can you tell me what is "server management menu" that you want to hide? i still fail to see

Just need a simple/grandma view, with much smaller-size simpler menu for guest/public.
Would also be good if 'simpleview' could be a user/folder rights flag option (and the default for guest/public). 

The default template has what I want to see; however, it may confuse my grandma/son/brother/guests too, because they don't own servers.  It is because of the purpose-difference:  I might like to manage the server; however, they might just want files/content.   So, there is 2 different purposes and thus need of 2 different views.
« Last Edit: January 13, 2022, 09:23:57 PM by danny »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
you can hide stuff and change the look to some degree with css.
If you can't get what you want this way we can talk about it, but it must be more specific than "simple".
Of course completely replacing the frontend is an option, but I want to consider more customization possibilities.
Those who want to stick with the "template" concept at the moment have no luck, but maybe in the future you'll have NaitLee plugin :)
of course we are talking about HFS 3 here...


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
Also, I think standard template needs to go on a weight-reduction diet on scale of 3x~5x smaller and easier to work on. 

the size is acceptable at this stage where we are still missing important features.
Once I activate gzip transmission (doing it these days) it is 100KB + 150KB font-icons.
It loads in 3.5 seconds on a 3G connection and 1 second on my phone.
After first time it doesn't need to load anymore because it will just load the pure list of files without any html attached.
Every folder change is likely to be 5KB.
I don't see anything critical in the size. Anyway, in the future I (or other people) may spend time in trying to reduce the size, it's just not a priority.
Working on the icons size may be the best next move, i guess.
After that, maybe trying to switch from react to preact. That may save up to 27KB (gzipped).

It's not even a problem of "it's hard to edit it" because you almost CAN'T do it. You are not supposed to, because it's against the kind of technology used there. That's why I'm trying to do the job through plugins.
Editing the template was a big plus of HFS2, but also a huge problem: once people customize their template for the sake of customizing a simple word/color/icon they are lost (almost always), they don't get updates in the default template anymore, they go out of sync with consequences on functionality but also on security. Default template (hfs2) had nasty security bugs in the past, because it contains also dangerous commands, like delete.

Quote
Howabout a new thread for HFS3x user interface contest?  Fun! 

you are free to do it, but mind we are still in a experimental phase and things can change a lot.

No body is going to delete HFS 2, it is there for those who like it that way.
HFS 3 is actually a new software with very similar goals. I also considered rebranding it, and I don't exclude doing it in the future.
Think of the leap between windows3 and windows95.
« Last Edit: January 14, 2022, 09:57:01 AM by rejetto »


Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
...It's not even a problem of "it's hard to edit it" because you almost CAN'T do it. You are not supposed to, because it's against the kind of technology used there. That's why I'm trying to do the job through plugins.
Editing the template was a big plus of HFS2, but also a huge problem...with consequences on functionality...
I think that the plugins method in HFS3 is a great improvement.

Comparison, I think:
HFS2x standalone templates = get the new feature you wanted but lose 3 more, or
HFS3x plugins = get the new feature you wanted, without losing other features. 

That is a lot different.  Thanks!!



Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
yeah, of course we have a long road ahead to understand what's needed, for plugins, to be able to do their job.
and it's cool that someone may make a plugin to work with old templates, nonetheless.
« Last Edit: January 14, 2022, 03:19:21 PM by rejetto »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
https://github.com/rejetto/hfs/releases/tag/v0.6.0-alpha

I'm still producing "releases" that probably need some extra care, but invite the braver of you interested in following progress to use unzip this dynamic archive of my sources:
https://github.com/rejetto/hfs/archive/refs/heads/main.zip
but using git is also a nice option

i hope the exe file works good, but it's not the option i personally love


Offline dj

  • Tireless poster
  • ****
    • Posts: 291
  • 👣 🐾
    • View Profile
    • PWAs
a new plugin: fileicons
(possibly obsolete with v0.6 )


Modified:
I did something wrong with v0.6 (screenshot)

Modified2:
copy dist folder one folder up to work
but plugins don't work (you need to enable plugin in config.yaml)


Modified3:
the audioplayer from the bundle also works with hfs3(v0.6) default template
« Last Edit: January 17, 2022, 11:36:31 AM by dj »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
maybe there's a problem with the folders structure.
The new arrangement is that config files are outside of 'dist', and from outside you should run 'node dist'.
also plugins is outside of dist.
i tried the zip on a linux (WSL) and it worked just as it was, but i have overlooked something.
If you can't find how to solve you can contact me privately and I will try to help you.
LMK