소스 검색

Merge pull request #249 from ollama-webui/overlay-message

fix: better error message for connection issue
Timothy Jaeryang Baek 1 년 전
부모
커밋
e59aecb532
1개의 변경된 파일33개의 추가작업 그리고 30개의 파일을 삭제
  1. 33 30
      src/routes/(app)/+layout.svelte

+ 33 - 30
src/routes/(app)/+layout.svelte

@@ -236,36 +236,39 @@
 				<div
 					class="absolute rounded-xl w-full h-full backdrop-blur bg-gray-900/60 flex justify-center"
 				>
-					<div class="m-auto pb-44">
-						<div class="text-center dark:text-white text-2xl font-medium z-50">
-							Ollama Update Required
-						</div>
-
-						<div class=" mt-4 text-center max-w-md text-sm dark:text-gray-200">
-							Oops! It seems like your Ollama needs a little attention. <br
-								class=" hidden sm:flex"
-							/>
-							We encountered a connection issue or noticed that you're running an outdated version. Please
-							update to
-							<span class=" dark:text-white font-medium">{requiredOllamaVersion} or above</span>.
-						</div>
-
-						<div class=" mt-6 mx-auto relative group w-fit">
-							<button
-								class="relative z-20 flex px-5 py-2 rounded-full bg-gray-100 hover:bg-gray-200 transition font-medium text-sm"
-								on:click={async () => {
-									await setOllamaVersion(await getOllamaVersion());
-								}}
-							>
-								Check Again
-							</button>
-
-							<button
-								class="text-xs text-center w-full mt-2 text-gray-400 underline"
-								on:click={async () => {
-									await setOllamaVersion(requiredOllamaVersion);
-								}}>Close</button
-							>
+					<div class="m-auto pb-44 flex flex-col justify-center">
+						<div class="max-w-md">
+							<div class="text-center dark:text-white text-2xl font-medium z-50">
+								Connection Issue or Update Needed
+							</div>
+
+							<div class=" mt-4 text-center text-sm dark:text-gray-200 w-full">
+								Oops! It seems like your Ollama needs a little attention. <br
+									class=" hidden sm:flex"
+								/>We've detected either a connection hiccup or observed that you're using an older
+								version. Ensure you're on the latest Ollama version
+								<br class=" hidden sm:flex" />(version
+								<span class=" dark:text-white font-medium">{requiredOllamaVersion} or higher</span>)
+								or check your connection.
+							</div>
+
+							<div class=" mt-6 mx-auto relative group w-fit">
+								<button
+									class="relative z-20 flex px-5 py-2 rounded-full bg-gray-100 hover:bg-gray-200 transition font-medium text-sm"
+									on:click={async () => {
+										await setOllamaVersion(await getOllamaVersion());
+									}}
+								>
+									Check Again
+								</button>
+
+								<button
+									class="text-xs text-center w-full mt-2 text-gray-400 underline"
+									on:click={async () => {
+										await setOllamaVersion(requiredOllamaVersion);
+									}}>Close</button
+								>
+							</div>
 						</div>
 					</div>
 				</div>