JustArchiNET / ArchiSteamFarm

C# application with primary purpose of farming Steam cards from multiple accounts simultaneously.
Apache License 2.0
11.23k stars 1.05k forks source link

IPC GUI todo #773

Closed MrBurrBurr closed 6 years ago

MrBurrBurr commented 6 years ago

IPC GUI source code is available here. Feel free to make appropriate modifications and send a PR.

Bugs

ToDos

Suggestions

Final Steps

  1. Implement style guide and coding conventions
  2. Check nightmode support
  3. Optimize and clean code
  4. Check for input/output sanitation
  5. Minimize all files

FAQ

Error 1006 when viewing Log page This is getting caused by one of the following points:

  1. Adblocker - Add IPC GUI to whitelist
  2. Windows 7 - Websockets are not supported on win7
  3. nginx - Check websocket proxying

When using nightmode and swiching between pages, lightmode is visible for a short moment Sadly I cant change that.

JustArchi commented 6 years ago

Random suggestion - it'd be nice if BGR keys importer offered also a switch that would change order from name<delimiter>key into key<delimiter>name. Even better if it could automatically detect that based on regex (so "order" dropbox with 3 options - auto-detect, key-name and name-key, default to auto).

JustArchi commented 6 years ago

BTW, #799 should also solve lack of websockets on Windows 7 - runtime uses managed implementation in this case 🙂.

Tristar7 commented 6 years ago

Hopefully here is the correct place to report this bug:

IPC GUI is unable to send commands to bots containing a # in their name

Sending (any) command to bots containing a # in their name fails with bot not found error. For example bot name 'x#y' The # and everything past it gets cut off in the parsing somewhere. I suppose the issue is html/http replacing symbols like # and some others to %-codes. Escaping them when sending might solve that.

Botan626 commented 6 years ago

Re Error 1006.

Using ASF on local machine on Win10 with AdBlock installed on Chrome, Firefox and Opera: only on Firefox this error occurs.

Abrynos commented 6 years ago

i got the error both on chrome and firefox. i think it depends on the settings you have in your adblocker (the block-lists you chose)

Botan626 commented 6 years ago

Pressing "-" won't minimize the window, the "-" will turn into a "+" only.

image

user777888999 commented 6 years ago

I changed code of drop-down menu, cuz old was uncomfortable. I know, it's not best code, but it's simple and working.

.scrollable-menu { height: auto; max-height: 220px; overflow-x: hidden; }

.scrollable-menu { height: auto; max-height: 300px; overflow-x: hidden; top:-300px }

ASF\www\css\app.css

before 487

after 486

Abrynos commented 6 years ago

@user777888999 as you where told now several times, both on discord and github in the issue you opened: you should rather open a pull-request than copying your message from one text-box to another in hope someone does those 10 lines of work for you.

Tristar7 commented 6 years ago

I've opened a pull request #820 to fix the issue I reported above.

Abrynos commented 6 years ago

IPC-GUI PRs take their time @Tristar7

as you can see mine is now open for 18 days, as the people behind it also have something else to do 😉

blackzafiqz commented 6 years ago

Hi I got this error when I click save. I didnt put any character in the #web proxy column. image

{"Message":"OK","Result":{"GlobalConfig":{"AutoRestart":true,"BackgroundGCPeriod":0,"Blacklist":[],"CommandPrefix":null,"ConfirmationsLimiterDelay":10,"ConnectionTimeout":60,"CurrentCulture":null,"Debug":false,"FarmingDelay":15,"GiftsLimiterDelay":1,"Headless":false,"IdleFarmingPeriod":8,"InventoryLimiterDelay":3,"IPC":true,"IPCPassword":"**REMOVED**","IPCPrefixes":["http://*:1242/"],"LoginLimiterDelay":10,"MaxFarmingTime":10,"MaxTradeHoldDuration":15,"OptimizationMode":0,"Statistics":false,"UpdateChannel":0,"UpdatePeriod":24,"WebLimiterDelay":200,"SteamOwnerID":76561198404611632,"SteamProtocols":3,"WebProxyUsername":null,"s_SteamOwnerID":"76561198404611632","WebProxy":null},"MemoryUsage":17602,"ProcessStartTime":"2018-06-24T03:25:04.59+00:00","Version":{"Major":3,"Minor":2,"Build":0,"Revision":2,"MajorRevision":0,"MinorRevision":2}},"Success":true}

TrAnn3l commented 6 years ago

It would be nice when one could retrieve the keys.used and keys.unused files over the webinterface.

Abrynos commented 6 years ago

as of now there is no API endpoint for this but if archi approves of this idea i'd be happy to implement the backend for this feature

JustArchi commented 6 years ago

It could be done as part of GET /Api/GamesToRedeemInBackground/{BotName} and DELETE /Api/GamesToRedeemInBackground/{BotName}, both should return/delete used and unused keys files. You can send a PR if you want to.

blackzafiqz commented 6 years ago

@MrBurrBurr welcome!

Abrynos commented 6 years ago

TBH I don't know if the endpoint should return the raw-file or the data in form of a list of json-objects like following:

{
    "Message": "string",
    "Result": {
        "AAAAA-BBBBB-CCCCC": {
            "Name": "Profit",
            "Result": "NoDetail",
            "Game": "Edepth Angel: Pinocchio's Murder VN",
            "ID": 226106
        },
        "CCCCC-BBBBB-AAAAA": {
            "Name": "Profit",
            "Result": "NoDetail",
            "Game": "Edepth Angel: Pinocchio's Murder VN",
            "ID": 226106
        }
    },
    "Success": true
}

which of course would be a whole lot more of work :3

JustArchi commented 6 years ago

You should return 2 objects of Dictionary<string, string> - one for unused keys and one for used ones.

Abrynos commented 6 years ago

ok. i would've made two endpoints 😅 e.g. /Api/GamesToRedeemInBackground/{BotName}/used and /Api/GamesToRedeemInBackground/{BotName}/unused

JustArchi commented 6 years ago

IMHO no need to explicitly divide it, user will want to get/delete both files 100% of time.

Abrynos commented 6 years ago

Then i'm the exception 😂

TrAnn3l commented 6 years ago

Maybe by using tabs? 42850180-c6b4caf6-8a26-11e8-9cb5-9d85e31bfcbf

Or use tabs directly over the textbox? Whats easier to implement for you?

@Abrynos Thank you for your implementation! I way also trying to implement it, but i would have never been so fast :)

TrAnn3l commented 6 years ago

@MrBurrBurr or you make it similar to the config editor/generator by adding a small link in the upper right corner like this:

42850180-c6b4caf6-8a26-11e8-9cb5-9d85e31bfcbf 1

Abrynos commented 6 years ago

maybe show the data as a table and have a small button below that's like "copy raw data" that copies the text to your clipboard that you would put into an new .keys-file...

JustArchi commented 6 years ago

Personally I like @TrAnn3l suggestion but I leave it up to you, I'm awful at designing any type of GUIs.

JustArchi commented 6 years ago

@MrBurrBurr Can you check BGR after your changes to IPC GUI? I'm wondering whether this is some cache issue or code issue.

Uncaught ReferenceError: currentdelimiter is not defined
    at Object.doneFunction (bots.html:689)
    at h (sweetalert.min.js:1)
    at g (sweetalert.min.js:1)
    at HTMLButtonElement.u (sweetalert.min.js:1)
TrAnn3l commented 6 years ago

@MrBurrBurr Looks great!

Abrynos commented 6 years ago

View keys only has one problem: which ones are the used ones and which ones are unused? because i can only see one box for the data 😉

Abrynos commented 6 years ago

Feature request for IPC-GUI: would it be possible to use some sort of auto-jump in the commands dropdown menus? like i open the dropdown menu for the command and then press the R key on my keybord. then the selection of the dropdown jumps down to redeem and if i press enter it automatically fills out the text-box. same with bot-names maybe.

kingcatdaan commented 6 years ago

Feature request for IPC-GUI: i think this belongs here, please add a feature to keep the process running even if all the bots are offline so you can still access the GUI.

Abrynos commented 6 years ago

@kingcatdaan this is not a request for IPC-GUI as the GUI can't modify the programs behaviour in that way. you may wanna check the wiki for the "feature" you just requested

Yur0K commented 6 years ago

Hi @MrBurrBurr . I've noticed that "lightmode" is visible for a moment when navigating through pages if Nightmode is enabled.

Abrynos commented 6 years ago

if it works it's ok for me 😉

thanks already

MrBurrBurr commented 6 years ago

New Issue here: #869