rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - NaitLee

Pages: 1 2 3 4 5 ... 14
31
HFS ~ HTTP File Server / Re: a new beginning...
« on: January 08, 2022, 09:04:15 AM »
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 :)

32
HFS ~ HTTP File Server / Re: a new beginning...
« on: January 04, 2022, 02:32:02 PM »
thanks for reporting the quick*.js problem. I reuploaded the release so that it's fixed.
Can you tell me why you removed the icons file ?

The lower-cased "quick" is found in 0.4.0. Also fix that :)
Oh right, all google services are banned in my locale, including the search engine, its resource api/cdn, and captcha...

For those that need HEAVY customization, totally replacing the "frontend" folder will be an option.
Anyway, that should be the last option. Let's try to focus on customizing the default frontend without touching it.
Tell me what you would like to customize exactly.

Yeah, this inspires me to go deeper... ::)
My goal is to make "old" templates (of HFS2) to be able to be used in this brand new version.
Because this project will develop in time, but the Delphi version will still have audience for a long time.
Why don't just cover them both :D
I don't like the so-called "compatibility" either. But this time it's not "compatible" but "universal", right ::)

So here it comes: the "Tradit-TPL" plan, it aims to add a layer to this new version to support legacy templates.
In attachment there's a WIP version that can do sections & few symbols. Of course macros are on-the-way.
It uses some concepts from PHFS. So we can just walk toward :D
Read the readme in archive and follow it to try.
If have no interest in it, just let the community take the job. :D

PS. Dynamic page and Ajax have different pros & cons. Selection is by one's preference.
PPS. I personally want to renew the development of my template but keep one codebase and some traditions of Throwback.



While making above work, I've found a possible bug in `frontEndApis.file_list`:

Argument `sse` is directly from url query, so it's string. Even when we pass `?sse=0` it is still true.
So may convert it to number along with `offset` and `limit`.

Cheers~

33
HFS ~ HTTP File Server / Re: a new beginning...
« on: January 01, 2022, 04:20:27 PM »
Few obstacles here in testing, but overall great ;)

OS: Manjaro
Environment: Node.js v17.2.0
Browsers: Firefox 96.0b3, Chromium 96.0.4664.93

Since exe is not needed here, I just take the hfs0.3.0.zip from release.

First node complains cannot find module './QuickZipStream'.
Seeking around, and found there's a quickZipStream.js in root folder.
So in filesystems like ext4 filenames are case-sensitive. Be aware of that :D

By correcting the letter-case and specifying a port (other than 80), it started successfully.

Then a google stuff stalking around:
Code: [Select]
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Outlined" rel="stylesheet" id="iconsFile">
By blocking the request, the list loads blazing fast.
And, seems there's missing a CSS rule: #root { margin: auto; } ::)

By adding home folder to config.yaml, it is listed. There are many items, but listing is still that fast.

Without icons loaded it looks silly (for the long alt duplicate strings). Wish there can be a better (local) approach.

By the way, it is almost impossible for a normal user to edit the 244kb minified javascript to fit normal/special needs. Starting from source is tough.
... Yes I'm thinking about template again ::) no need to think too much, just go with our own pace :D

34
HFS ~ HTTP File Server / Re: a new beginning...
« on: January 01, 2022, 06:50:37 AM »
Wow, great... :D

I don't interested in Node for some reasons. But I wonder if there will be a template engine, just like the old classic HFS2.

I kinda like the Lisp-ish syntax, hacking around it makes fun. But others may don't think so...

Making a template engine based on other stuffs is well acceptable, as well as the community develops :)

If this is the case, please open some API or Plugin interfaces (at any time), thus we can make an interpreter for old templates...

Cheers~

35
Bug reports / Re: How to delete files.
« on: November 17, 2021, 05:14:49 AM »
It's just another problem of HFS 2.4 default template, and the direct fix is stated in a GitHub issue/forum report. (see below)
Also, switching to another template (with working "delete" function) can help.

Choices are Takeback and Mobil-light. You can find them in Template sub-board :)

I think @NaitLee or @Danny already reported a similar this error (I can't remember).

... I think it's dj found this bug first ::)
The GitHub issue: https://github.com/rejetto/hfs2/issues/10
There is maybe one/some report(s) in Beta sub-board too :D
(ps. see dj's post here. this post is a bit later than that, but started editing before that)

Also, rejetto... For this whole year, the only time he speaks here is to celebrate my birthday... :'(
Now the cake is in his profile now... :D 🎶 Happy birthday to you 🎵, rejetto :D

36
so changing system code page will not solve this.

Yes, this only works with "common" encodings, such as Chinese & Japanese, but not Thai.
Use HFS 2.4 if possible ;)



In my test, after changing code page to Thai, a folder named "อรุณสวัสดิ์" can be put into HFS 2.3, but the URL Encode result (which should to UTF-8) is incorrect.

According to further test, these are the conversion steps of HFS 2.3 (or Delphi without Unicode):
- Windows think this program cannot understand UTF-16 (the filename encoding of NTFS) and converts that to ANSI Thai "code page": TIS-620
- HFS 2.3 regarded this TIS-620 raw data as GB2312 encoded
- Then convert the raw data to UTF-8 with GB2312 map
which will succeed the action but get wrong data :P

So this problem cannot be solved in 2.3 unless we have a hack in the old Delphi, add the TIS-620-to-UTF-8 map, be sure it will be correctly used, then re-compile...
Too complex then just upgrade to HFS 2.4 :D

Ps. encoding test can be done with Notepad++ on Windows, or any good editor on GNU/Linux. Also the command-line utility "hexdump" can show you the true raw data of a file.

37
HTML & templates / Re: The "Takeback" template - A different & modern taste
« on: November 10, 2021, 12:43:18 PM »
I sent you a PM with more details :)

Now it's obvious... :D So I should explain the two "Archive"s again

"Archive" is not "Download". While they both give users files, archive means to bundle all/selected files together, while download usually means only one file.

Also, have a look again at my previous message, especially the explanation after the 2nd quote.
Now you know there's 2 different "Archive"s, and the second one is which you need. It appears after selecting items, on the preview panel, as underlined brown text.

So you shall modify the note for users, say that they need to "download" selections with "Archive" on the preview panel ;)
... Or for a better approach, put this in HTML/CSS:
Code: [Select]
<style>
#preview > div:nth-child(3) > a:nth-child(5) > span:nth-child(1) { color: cyan; }
.part2 > p:nth-child(1) { display: none; }
</style>
These CSS highlights the correct "Archive" and removes the incorrect one.
( be sure to modify anything to fit exact needs )

38
HTML & templates / Re: The "Takeback" template - A different & modern taste
« on: November 10, 2021, 11:09:28 AM »
I have a small problem with this
I share albums and if i try to download a single track from an album it then downloads the whole album
Love the layout though
Any help would be appreciated
Thank You

Glad to hear feedback :)

Please give more info of that problem, such as:
- What action did you do for downloading? Maybe it's the cyan "Download", the "Archive" at page bottom, or the brown "Archive" after several selection...
- What is the form of an album and tracks? Are they appear as files inside a folder, or just one file, or a .m3u(8) file?
- ...

Good luck :D

Except, when you click "Archive", you will get a "*.tar" file containing only files shown in the list, but not folders.

It's about the "?recursive" parameter in the url ("urlvar"). When it is there, the sub-folders will be included, and will not otherwise.

In the case of Takeback (and also Throwback), this parameter is not included in the "Archive" at page bottom.
Rather, in Takeback, it's included in "Archive" action when doing multiple selection of files/folders. So, if you select all items and do "Archive" in the preview pad, the archive will be full :)

Yes, it's not easy to discover. May choose an alternative method in future.

39
Firstly, your Windows system language is English, which means that the "code page" is maybe also English-only.
As HFS 2.3 is non-Unicode, you should change the system code page to Thai (or relative) -compatible, then the problem may be solved.

Here's a related link, all answers inside are helpful.

After changing, please re-launch Windows & HFS and put the folders again.

( many terminologies here  ::) search the web for more information )

Then, if above didn't work, may try HFS version 2.4, which supports Unicode. Find its development/download link in "Beta" sub-board.


Last note: HFS 2.3e is an insecure & vulnerable version. Switch to 2.3m or above if possible ;)

40
中文 - Chinese / Re: 在找 HFS 的中文资源吗?在这里哦 ;)
« on: October 25, 2021, 01:35:44 AM »
还是有一些位置是英文的
HFS 2.3 里的好多字符串都是写死在代码里的,不能通过翻译文件更改。
HFS 2.4 很好地修正了这个问题。
如果需要完整的翻译,建议使用 HFS 2.4 版本:https://github.com/rejetto/hfs2/releases
它还在 RC 阶段,不是很稳定。可能需要在这里找找更多的资源和帮助。
…… 这里好多有意义的资源都是英文的 ::) 有不懂可以随时在这里问 ;)

41
Everything else / My new avatar
« on: August 29, 2021, 03:46:03 PM »
I costed some money online and got a new avatar picture. As cute as the original! But will be better to be used somewhere like a introduction image/slideshow/video etc...

In attachment there's a smaller & watermark version of the avatar. I want to reserve my copyright since I want to use it far later.

Enjoy the cuteness ;)

42
The results show that the "Takeback" template works well until RC4. This problem only occurs in versions RC4 and above. What's more, in RC7 (the latest version currently), this problem occurs even when I'm using the default template, and this time you will get a page of javascript from the server.

My test conclusion:

- The default template of RC7 is doing the wrong thing: post selection data to a javascript data section, so the server did nothing other than sending javascript.
  - Please wait for rejetto to fix this :)

- My template have a bug, the helper.getFilename() function returns an empty string for folder names (which ends with a slash /, not considered ::)), and after that sends an empty selection to server, then server think it should do nothing
  - This will be my another job ;)

Thank you for doing a lot of work testing 🎉

43
Hey man. I really enjoy your amazing template! And THX for your translating here, that's nice!~

Oh thank you!

For the "fixed size" problem, it's when I "inheriting" the star field css and forgot to delete them, also forgot to test.

I'll fix them :)

44
Everything else / Re: Today is my 18th birthday :)
« on: August 19, 2021, 04:18:28 AM »
Thank you everyone! 🥰🥰🥰

45
HFS ~ HTTP File Server / Re: Is HFS 32bit or 64bit software
« on: August 19, 2021, 04:07:06 AM »
Original HFS is 32 bit application. You can check in Task Manager with hfs.exe opened, there will be "hfs (32 bit)" in the list.

@Rapid have customized version of HFS that is available in 64 bit binary.

By the way, what does it exactly main by "requirement"? Introduce it more will be better for us to help you :)

Pages: 1 2 3 4 5 ... 14