mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Fix various issues with v2.5 UI (#390)
* Fix navbar collapse breakpoint * Fix list filter colors and height * Make styling similar to v2 * Fix scene card zoom and orientation * Keep p tag even without details * Fix custom css * Default settings tab to tasks * Fix flickering progress bar. Fix percentage. * Fix unsetting studio * Fix scene gallery select * Don't hide edit on small devices * Fix log dropdown style * Use monospace for custom css input
This commit is contained in:
@@ -11,23 +11,32 @@ export class StashService {
|
||||
public static client: ApolloClient<NormalizedCacheObject>;
|
||||
private static cache: InMemoryCache;
|
||||
|
||||
public static initialize() {
|
||||
public static getPlatformURL(ws? : boolean) {
|
||||
const platformUrl = new URL(window.location.origin);
|
||||
const wsPlatformUrl = new URL(window.location.origin);
|
||||
wsPlatformUrl.protocol = "ws:";
|
||||
|
||||
if (!process.env.NODE_ENV || process.env.NODE_ENV === "development") {
|
||||
platformUrl.port = "9999"; // TODO: Hack. Development expects port 9999
|
||||
wsPlatformUrl.port = "9999";
|
||||
|
||||
if (process.env.REACT_APP_HTTPS === "true") {
|
||||
platformUrl.protocol = "https:";
|
||||
}
|
||||
}
|
||||
|
||||
if (ws) {
|
||||
platformUrl.protocol = "ws:";
|
||||
}
|
||||
|
||||
return platformUrl;
|
||||
}
|
||||
|
||||
public static initialize() {
|
||||
const platformUrl = StashService.getPlatformURL();
|
||||
const wsPlatformUrl = StashService.getPlatformURL(true);
|
||||
|
||||
if (platformUrl.protocol === "https:") {
|
||||
wsPlatformUrl.protocol = "wss:";
|
||||
}
|
||||
|
||||
const url = `${platformUrl.toString().slice(0, -1)}/graphql`;
|
||||
const wsUrl = `${wsPlatformUrl.toString().slice(0, -1)}/graphql`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user