mirror of
https://github.com/hrfee/jfa-go.git
synced 2025-01-03 23:10:11 +00:00
Compare commits
3 Commits
d47afe05f4
...
aedea1bea6
Author | SHA1 | Date | |
---|---|---|---|
aedea1bea6 | |||
535a100314 | |||
360c25d084 |
@ -537,3 +537,11 @@ div.card:contains(section.banner.footer) {
|
||||
.card.sectioned .section {
|
||||
padding: var(--spacing-4, 1rem);
|
||||
}
|
||||
|
||||
.button.discord.\!normal {
|
||||
background-color: rgba(88, 101, 242,60%);
|
||||
}
|
||||
|
||||
.button.discord.\!normal:not(.lang-link) {
|
||||
color: rgba(38, 51, 192, 90%);
|
||||
}
|
||||
|
12
go.mod
12
go.mod
@ -32,12 +32,12 @@ require (
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/gomarkdown/markdown v0.0.0-20211212230626-5af6ad2f47df
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/hrfee/jfa-go/common v0.0.0-20211221140424-942792cdfa98
|
||||
github.com/hrfee/jfa-go/docs v0.0.0-20211221140424-942792cdfa98
|
||||
github.com/hrfee/jfa-go/linecache v0.0.0-20211221140424-942792cdfa98
|
||||
github.com/hrfee/jfa-go/logger v0.0.0-20211221140424-942792cdfa98
|
||||
github.com/hrfee/jfa-go/ombi v0.0.0-20211221140424-942792cdfa98
|
||||
github.com/hrfee/mediabrowser v0.3.7
|
||||
github.com/hrfee/jfa-go/common v0.0.0-20211222231100-d47afe05f49c
|
||||
github.com/hrfee/jfa-go/docs v0.0.0-20211222231100-d47afe05f49c
|
||||
github.com/hrfee/jfa-go/linecache v0.0.0-20211222231100-d47afe05f49c
|
||||
github.com/hrfee/jfa-go/logger v0.0.0-20211222231100-d47afe05f49c
|
||||
github.com/hrfee/jfa-go/ombi v0.0.0-20211222231100-d47afe05f49c
|
||||
github.com/hrfee/mediabrowser v0.3.8
|
||||
github.com/itchyny/timefmt-go v0.1.3
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/lithammer/shortuuid/v3 v3.0.7
|
||||
|
7
go.sum
7
go.sum
@ -22,6 +22,7 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE
|
||||
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
|
||||
github.com/bwmarrin/discordgo v0.23.2 h1:BzrtTktixGHIu9Tt7dEE6diysEF9HWnXeHuoJEt2fH4=
|
||||
github.com/bwmarrin/discordgo v0.23.2/go.mod h1:c1WtWUGN6nREDmzIpyTp/iD3VYt4Fpx+bVyfBG7JE+M=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@ -60,6 +61,7 @@ github.com/getlantern/ops v0.0.0-20200403153110-8476b16edcd6 h1:QthAQCekS1YOeYWS
|
||||
github.com/getlantern/ops v0.0.0-20200403153110-8476b16edcd6/go.mod h1:D5ao98qkA6pxftxoqzibIBBrLSUli+kYnJqrgBf9cIA=
|
||||
github.com/getlantern/systray v1.1.0 h1:U0wCEqseLi2ok1fE6b88gJklzriavPJixZysZPkZd/Y=
|
||||
github.com/getlantern/systray v1.1.0/go.mod h1:AecygODWIsBquJCJFop8MEQcJbWFfw/1yWbVabNgpCM=
|
||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/gin-contrib/gzip v0.0.1/go.mod h1:fGBJBCdt6qCZuCAOwWuFhBB4OOq9EFqlo5dEaFhhu5w=
|
||||
github.com/gin-contrib/gzip v0.0.3 h1:etUaeesHhEORpZMp18zoOhepboiWnFtXrBZxszWUn4k=
|
||||
@ -145,6 +147,8 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/hrfee/mediabrowser v0.3.7 h1:F57Cmwst4fOfhPuOlanKiOuek9zCVcXm78/zP/1WB2s=
|
||||
github.com/hrfee/mediabrowser v0.3.7/go.mod h1:PnHZbdxmbv1wCVdAQyM7nwPwpVj9fdKx2EcET7sAk+U=
|
||||
github.com/hrfee/mediabrowser v0.3.8 h1:y0iBCb6jE3QKcsiCJSYva2fFPHRn4UA+sGRzoPuJ/Dk=
|
||||
github.com/hrfee/mediabrowser v0.3.8/go.mod h1:PnHZbdxmbv1wCVdAQyM7nwPwpVj9fdKx2EcET7sAk+U=
|
||||
github.com/itchyny/timefmt-go v0.1.3 h1:7M3LGVDsqcd0VZH2U+x393obrzZisp7C0uEe921iRkU=
|
||||
github.com/itchyny/timefmt-go v0.1.3/go.mod h1:0osSSCQSASBJMsIZnhAaF1C2fCBTJZXrnj37mG8/c+A=
|
||||
github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
@ -224,6 +228,7 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE
|
||||
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
|
||||
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||
@ -273,8 +278,10 @@ github.com/ugorji/go/codec v1.1.5-pre/go.mod h1:tULtS6Gy1AE1yCENaw4Vb//HLH5njI2t
|
||||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
||||
github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ=
|
||||
github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw=
|
||||
github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw=
|
||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
|
||||
github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M=
|
||||
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
|
||||
github.com/writeas/go-strip-markdown v2.0.1+incompatible h1:IIqxTM5Jr7RzhigcL6FkrCNfXkvbR+Nbu1ls48pXYcw=
|
||||
github.com/writeas/go-strip-markdown v2.0.1+incompatible/go.mod h1:Rsyu10ZhbEK9pXdk8V6MVnZmTzRG0alMNLMwa0J01fE=
|
||||
|
@ -46,21 +46,26 @@
|
||||
<div class="modal-content content card">
|
||||
<img src="{{ .urlBase }}/banner.svg" class="banner header" alt="jfa-go banner">
|
||||
<span class="heading"><span class="modal-close">×</span></span>
|
||||
<p><i class="icon ri-github-fill"></i><a href="https://github.com/hrfee/jfa-go">jfa-go</a></p>
|
||||
<p>{{ .strings.version }} <span class="code monospace">{{ .version }}</span></p>
|
||||
<p>{{ .strings.commitNoun }} <span class="code monospace">{{ .commit }}</span></p>
|
||||
<div class="dropdown" tabindex="0">
|
||||
<span class="button ~info dropdown-button">
|
||||
<i class="ri-hand-heart-line mr-half"></i>
|
||||
{{ .strings.donate }}
|
||||
<span class="ml-1 chev"></span>
|
||||
</span>
|
||||
<div class="dropdown-display">
|
||||
<div class="card ~neutral !low">
|
||||
<a href="https://github.com/sponsors/hrfee" target="_blank" class="button input ~neutral field mb-half lang-link">GitHub</a>
|
||||
<a href="https://ko-fi.com/hrfee" target="_blank" class="button input ~neutral field mb-half lang-link">Ko-fi</a>
|
||||
<div class="row col flex">
|
||||
<a class="button ~neutral mr-half mt-1 mb-1 lang-link" href="https://github.com/hrfee/jfa-go"><i class="ri-github-line mr-half"></i>github</a>
|
||||
<a class="button ~urge mt-1 mb-1 mr-half lang-link" href="https://wiki.jfa-go.com">wiki/docs</a>
|
||||
<a class="button ~positive mt-1 mb-1 mr-half lang-link" href="https://weblate.jfa-go.com">translation</a>
|
||||
<div class="dropdown mr-half" tabindex="0">
|
||||
<a href="https://github.com/sponsors/hrfee" target="_blank" class="button ~info mt-1 mb-1 dropdown-button lang-link">
|
||||
<i class="ri-hand-heart-line mr-half"></i>
|
||||
donate
|
||||
<span class="ml-1 chev"></span>
|
||||
</a>
|
||||
<div class="dropdown-display">
|
||||
<div class="card ~info !low">
|
||||
<a href="https://github.com/sponsors/hrfee" target="_blank" class="button input ~neutral field mb-half lang-link">GitHub</a>
|
||||
<a href="https://ko-fi.com/hrfee" target="_blank" class="button input ~neutral field mb-half lang-link">Ko-fi</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="button ~urge mt-1 mb-1 !normal discord lang-link" href="https://discord.com/invite/MrtvuQmyhP" target="_blank"><i class="ri-discord-line mr-half"></i>discord</a>
|
||||
</div>
|
||||
<p><a href="https://github.com/hrfee/jfa-go/blob/main/LICENSE">Available under the MIT License.</a></p>
|
||||
<pre class="monospace">{{ .license }}</pre>
|
||||
@ -403,6 +408,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
<span class="button ~warning" alt="{{ .strings.theme }}" id="button-theme"><i class="ri-sun-line"></i></span>
|
||||
<div class="page-container">
|
||||
<div class="mb-1">
|
||||
<header class="flex flex-wrap items-center justify-between">
|
||||
@ -416,7 +422,6 @@
|
||||
<div class="mb-1">
|
||||
<div class="text-neutral-700">
|
||||
<span class="button ~critical !normal mb-1 unfocused" id="logout-button">{{ .strings.logout }}</span>
|
||||
<span id="button-theme" class="button ~neutral !normal mb-1">{{ .strings.theme }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-invites">
|
||||
@ -590,7 +595,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="col sm button ~info !normal center mb-half" id="accounts-send-pwr">{{ .strings.sendPWR }}</span>
|
||||
<span class="col sm button ~info !normal center mb-half unfocused" id="accounts-send-pwr">{{ .strings.sendPWR }}</span>
|
||||
<span class="col sm button ~critical !normal center mb-half" id="accounts-delete-user">{{ .quantityStrings.deleteUser.Singular }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -11,8 +11,3 @@ body {
|
||||
background: #AA5CC3;
|
||||
background: linear-gradient(90deg, #AA5CC3 0%, #00A4DC 100%) !important;
|
||||
}
|
||||
|
||||
.button.discord.\!normal {
|
||||
background-color: rgba(88, 101, 242,60%);
|
||||
color: rgba(38, 51, 192, 90%);
|
||||
}
|
||||
|
24
ts/admin.ts
24
ts/admin.ts
@ -10,7 +10,29 @@ import { _get, _post, notificationBox, whichAnimationEvent, toggleLoader } from
|
||||
import { Updater } from "./modules/update.js";
|
||||
|
||||
loadTheme();
|
||||
(document.getElementById('button-theme') as HTMLSpanElement).onclick = toggleTheme;
|
||||
const themeButton = document.getElementById('button-theme') as HTMLSpanElement;
|
||||
const switchThemeIcon = () => {
|
||||
const icon = themeButton.childNodes[0] as HTMLElement;
|
||||
if (document.documentElement.classList.contains("dark-theme")) {
|
||||
icon.classList.add("ri-sun-line");
|
||||
icon.classList.remove("ri-moon-line");
|
||||
themeButton.classList.add("~warning");
|
||||
themeButton.classList.remove("~neutral");
|
||||
themeButton.classList.remove("!high");
|
||||
} else {
|
||||
icon.classList.add("ri-moon-line");
|
||||
icon.classList.remove("ri-sun-line");
|
||||
themeButton.classList.add("!high");
|
||||
themeButton.classList.add("~neutral");
|
||||
themeButton.classList.remove("~warning");
|
||||
}
|
||||
};
|
||||
themeButton.onclick = () => {
|
||||
toggleTheme();
|
||||
switchThemeIcon();
|
||||
}
|
||||
switchThemeIcon();
|
||||
|
||||
|
||||
window.lang = new lang(window.langFile as LangFile);
|
||||
loadLangSelector("admin");
|
||||
|
@ -748,7 +748,7 @@ export class accountsList {
|
||||
// Only show "Send PWR" if a maximum of 1 user selected doesn't have a contact method
|
||||
if (noContactCount > 1) {
|
||||
this._sendPWR.classList.add("unfocused");
|
||||
} else {
|
||||
} else if (window.linkResetEnabled) {
|
||||
this._sendPWR.classList.remove("unfocused");
|
||||
}
|
||||
if (showDisableEnable) {
|
||||
@ -1102,17 +1102,22 @@ export class accountsList {
|
||||
message += " " + window.lang.strings("sendPWRValidFor");
|
||||
messageBox.textContent = message;
|
||||
let linkButton = document.getElementById("send-pwr-link") as HTMLSpanElement;
|
||||
linkButton.onclick = () => {
|
||||
toClipboard(link);
|
||||
linkButton.textContent = window.lang.strings("copied");
|
||||
linkButton.classList.add("~positive");
|
||||
linkButton.classList.remove("~urge");
|
||||
setTimeout(() => {
|
||||
linkButton.textContent = window.lang.strings("copy");
|
||||
linkButton.classList.add("~urge");
|
||||
linkButton.classList.remove("~positive");
|
||||
}, 800);
|
||||
};
|
||||
if (link) {
|
||||
linkButton.classList.remove("unfocused");
|
||||
linkButton.onclick = () => {
|
||||
toClipboard(link);
|
||||
linkButton.textContent = window.lang.strings("copied");
|
||||
linkButton.classList.add("~positive");
|
||||
linkButton.classList.remove("~urge");
|
||||
setTimeout(() => {
|
||||
linkButton.textContent = window.lang.strings("copy");
|
||||
linkButton.classList.add("~urge");
|
||||
linkButton.classList.remove("~positive");
|
||||
}, 800);
|
||||
};
|
||||
} else {
|
||||
linkButton.classList.add("unfocused");
|
||||
}
|
||||
window.modals.sendPWR.show();
|
||||
}, true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user