1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 17:10:10 +00:00

Merge branch 'main' of github.com:hrfee/jfa-go

This commit is contained in:
Harvey Tindall 2024-07-14 00:32:25 +01:00
commit 9339992693
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
2 changed files with 15 additions and 8 deletions

View File

@ -85,7 +85,7 @@ steps:
commands: commands:
- curl -sL https://git.io/goreleaser > goreleaser - curl -sL https://git.io/goreleaser > goreleaser
- chmod +x goreleaser - chmod +x goreleaser
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --clean - ./scripts/version.sh ./goreleaser --snapshot --skip=publish --clean
- wget https://builds.hrfee.pw/upload.py - wget https://builds.hrfee.pw/upload.py
- pip3 install requests - pip3 install requests
- bash -c 'sftp -i /id_rsa2 -o StrictHostKeyChecking=no root@161.97.102.153:/mnt/redoc <<< $"put docs/swagger.json jfa-go.json"' - bash -c 'sftp -i /id_rsa2 -o StrictHostKeyChecking=no root@161.97.102.153:/mnt/redoc <<< $"put docs/swagger.json jfa-go.json"'
@ -164,7 +164,7 @@ steps:
commands: commands:
- curl -sL https://git.io/goreleaser > goreleaser - curl -sL https://git.io/goreleaser > goreleaser
- chmod +x goreleaser - chmod +x goreleaser
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --clean - ./scripts/version.sh ./goreleaser --snapshot --skip=publish --clean
trigger: trigger:
event: event:

View File

@ -266,13 +266,20 @@ class ReferralCard {
get code(): string { return this._code; } get code(): string { return this._code; }
set code(c: string) { set code(c: string) {
this._code = c; this._code = c;
let url = window.location.href;
for (let split of ["#", "?", "account", "my"]) { let u = new URL(window.location.href);
url = url.split(split)[0]; let path = u.pathname;
for (let split of ["account", "my"]) {
path = path.split(split)[0];
} }
if (url.slice(-1) != "/") { url += "/"; } if (path.slice(-1) != "/") { path += "/"; }
url = url + "invite/" + this._code; path = path + "invite/" + this._code;
this._url = url;
u.pathname = path;
u.hash = "";
u.search = "";
this._url = u.toString();
} }
get remaining_uses(): number { return this._remainingUses; } get remaining_uses(): number { return this._remainingUses; }