mirror of
				https://github.com/smartfrigde/armcord.git
				synced 2024-08-14 23:56:58 +00:00 
			
		
		
		
	add start anyway button
This commit is contained in:
		
							parent
							
								
									a3665a5b6e
								
							
						
					
					
						commit
						2d2181fae2
					
				
					 3 changed files with 39 additions and 22 deletions
				
			
		|  | @ -38,14 +38,11 @@ html, | ||||||
| body { | body { | ||||||
|     -webkit-app-region: drag; |     -webkit-app-region: drag; | ||||||
|     overflow: hidden; |     overflow: hidden; | ||||||
| 
 |  | ||||||
|     margin: 0; |     margin: 0; | ||||||
|     padding: 0; |     padding: 0; | ||||||
|     width: 100%; |     width: 100%; | ||||||
|     height: 100%; |     height: 100%; | ||||||
| 
 |  | ||||||
|     background: var(--background-primary); |     background: var(--background-primary); | ||||||
| 
 |  | ||||||
|     display: flex; |     display: flex; | ||||||
|     flex-direction: column; |     flex-direction: column; | ||||||
|     justify-content: center; |     justify-content: center; | ||||||
|  | @ -54,29 +51,27 @@ body { | ||||||
| 
 | 
 | ||||||
| * { | * { | ||||||
|     font-family: "Whitney", sans-serif; |     font-family: "Whitney", sans-serif; | ||||||
| 
 |  | ||||||
|     box-sizing: border-box; |     box-sizing: border-box; | ||||||
|     -webkit-user-select: none; |     -webkit-user-select: none; | ||||||
|     cursor: default; |     cursor: default; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| video { | video { | ||||||
|  |     display: block; | ||||||
|     width: 200px; |     width: 200px; | ||||||
|     height: 150px; |     height: 150px; | ||||||
|     object-fit: cover; |     object-fit: cover; | ||||||
|  |     margin: 0 auto; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #text-splashscreen { | #text-splashscreen { | ||||||
|     font-size: 7vw; |     font-size: 7vw; | ||||||
|     text-align: center; |     text-align: center; | ||||||
| 
 |  | ||||||
|     color: var(--header-primary); |     color: var(--header-primary); | ||||||
|     font-weight: 400; |     font-weight: 400; | ||||||
|     font-style: italic; |     font-style: italic; | ||||||
|     font-size: 16px; |     font-size: 16px; | ||||||
| 
 |  | ||||||
|     text-transform: uppercase; |     text-transform: uppercase; | ||||||
| 
 |  | ||||||
|     width: 100%; |     width: 100%; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -84,15 +79,12 @@ video { | ||||||
| #bar-fill { | #bar-fill { | ||||||
|     width: 180px; |     width: 180px; | ||||||
|     height: 8px; |     height: 8px; | ||||||
| 
 |  | ||||||
|     border-radius: 4px; |     border-radius: 4px; | ||||||
| 
 |  | ||||||
|     visibility: hidden; |     visibility: hidden; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #bar-container { | #bar-container { | ||||||
|     background-color: var(--background-secondary); |     background-color: var(--background-secondary); | ||||||
| 
 |  | ||||||
|     position: relative; |     position: relative; | ||||||
|     margin-top: 12px; |     margin-top: 12px; | ||||||
| } | } | ||||||
|  | @ -106,7 +98,6 @@ video { | ||||||
|     position: absolute; |     position: absolute; | ||||||
|     bottom: 6px; |     bottom: 6px; | ||||||
|     right: 6px; |     right: 6px; | ||||||
| 
 |  | ||||||
|     text-align: right; |     text-align: right; | ||||||
|     font-size: 10px; |     font-size: 10px; | ||||||
|     color: var(--text-muted); |     color: var(--text-muted); | ||||||
|  | @ -116,3 +107,22 @@ video { | ||||||
| img.logo { | img.logo { | ||||||
|     width: 272px; |     width: 272px; | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | button { | ||||||
|  |     background: var(--brand-experiment); | ||||||
|  |     color: var(--header-primary); | ||||||
|  |     outline: none; | ||||||
|  |     border: none; | ||||||
|  |     border-radius: 5px; | ||||||
|  |     padding: 8px; | ||||||
|  |     -webkit-user-select: all !important; | ||||||
|  |     user-select: all !important; | ||||||
|  |     margin-top: 10px; | ||||||
|  |     -webkit-app-region: no-drag; | ||||||
|  |     transition: 0.17s ease; | ||||||
|  |     display: none; | ||||||
|  |     margin: 0 auto; | ||||||
|  | } | ||||||
|  | button:hover { | ||||||
|  |     cursor: grab !important; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @ -21,13 +21,18 @@ | ||||||
|                 <source src="https://armcord.app/discord_loading.webm" type="video/webm" /> |                 <source src="https://armcord.app/discord_loading.webm" type="video/webm" /> | ||||||
|             </video> |             </video> | ||||||
|             <p id="text-splashscreen"></p> |             <p id="text-splashscreen"></p> | ||||||
|  |             <button id="ignore">Start anyway</button> | ||||||
|         </div> |         </div> | ||||||
|     </body> |     </body> | ||||||
|     <script> |     <script> | ||||||
|         async function loadLang() { |         async function loadLang() { | ||||||
|             const text = document.getElementById("text-splashscreen"); |             const text = document.getElementById("text-splashscreen"); | ||||||
|             if (window.navigator.onLine === false) { |             if (window.navigator.onLine === true) { | ||||||
|                 text.innerHTML = await internal.getLang("loading_screen_offline"); |                 text.innerHTML = await internal.getLang("loading_screen_offline"); | ||||||
|  |                 document.getElementById("ignore").style.display = "block"; | ||||||
|  |                 document.getElementById("ignore").onclick = () => { | ||||||
|  |                     window.internal.splashEnd(); | ||||||
|  |                 }; | ||||||
|             } else { |             } else { | ||||||
|                 text.innerHTML = await internal.getLang("loading_screen_start"); |                 text.innerHTML = await internal.getLang("loading_screen_start"); | ||||||
|                 if (window.internal.version === "3.3.0") { |                 if (window.internal.version === "3.3.0") { | ||||||
|  |  | ||||||
							
								
								
									
										14
									
								
								src/utils.ts
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								src/utils.ts
									
										
									
									
									
								
							|  | @ -404,8 +404,7 @@ export function updateModInstallState() { | ||||||
|     modInstallState = "done"; |     modInstallState = "done"; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export async function installModLoader(): Promise<void>  | export async function installModLoader(): Promise<void> { | ||||||
| { |  | ||||||
|     if ((await getConfig("mods")) == "none") { |     if ((await getConfig("mods")) == "none") { | ||||||
|         modInstallState = "none"; |         modInstallState = "none"; | ||||||
|         fs.rmSync(`${app.getPath("userData")}/plugins/loader`, {recursive: true, force: true}); |         fs.rmSync(`${app.getPath("userData")}/plugins/loader`, {recursive: true, force: true}); | ||||||
|  | @ -434,17 +433,20 @@ export async function installModLoader(): Promise<void> | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         // Add more of these later if needed!
 |         // Add more of these later if needed!
 | ||||||
|         let URLs = ['https://armcord.app/loader.zip', 'https://armcord.vercel.app/loader.zip', 'https://raw.githubusercontent.com/ArmCord/website/new/public/loader.zip']; |         let URLs = [ | ||||||
|  |             "https://armcord.app/loader.zip", | ||||||
|  |             "https://armcord.vercel.app/loader.zip", | ||||||
|  |             "https://raw.githubusercontent.com/ArmCord/website/new/public/loader.zip" | ||||||
|  |         ]; | ||||||
|         let loaderZip: any; |         let loaderZip: any; | ||||||
| 
 | 
 | ||||||
|         while (true) { |         while (true) { | ||||||
|             if(URLs.length <= 0) |             if (URLs.length <= 0) throw new Error(`unexpected response ${loaderZip.statusText}`); | ||||||
|                 throw new Error(`unexpected response ${loaderZip.statusText}`); |  | ||||||
| 
 | 
 | ||||||
|             try { |             try { | ||||||
|                 loaderZip = await fetch(URLs[0]); |                 loaderZip = await fetch(URLs[0]); | ||||||
|             } catch (err) { |             } catch (err) { | ||||||
|                 console.log('[Mod loader] Failed to download. Links left to try: ' + (URLs.length - 1)); |                 console.log("[Mod loader] Failed to download. Links left to try: " + (URLs.length - 1)); | ||||||
|                 URLs.splice(0, 1); |                 URLs.splice(0, 1); | ||||||
| 
 | 
 | ||||||
|                 continue; |                 continue; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue