Fix Added patch note notification
This commit is contained in:
@@ -17,7 +17,10 @@ export const patchNote = {
|
|||||||
|
|
||||||
export function getPatchNote(version: string){
|
export function getPatchNote(version: string){
|
||||||
if(patchNote.version.split(".")[1] === version.split(".")[1] && patchNote.version.split(".")[0] === version.split(".")[0]){
|
if(patchNote.version.split(".")[1] === version.split(".")[1] && patchNote.version.split(".")[0] === version.split(".")[0]){
|
||||||
return patchNote.content
|
return patchNote
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
version: version.split(".")[0] + "." + version.split(".")[1],
|
||||||
|
content: ""
|
||||||
}
|
}
|
||||||
return ''
|
|
||||||
}
|
}
|
||||||
@@ -25,13 +25,21 @@
|
|||||||
<h3 class="text-textcolor2 mt-1">Version {appVer}</h3>
|
<h3 class="text-textcolor2 mt-1">Version {appVer}</h3>
|
||||||
{/if}
|
{/if}
|
||||||
<GithubStars />
|
<GithubStars />
|
||||||
{#if patch}
|
{#if patch.content}
|
||||||
<div class="w-full max-w-4xl pl-4 pr-4 pt-4">
|
<div class="w-full max-w-4xl pl-4 pr-4 pt-4 relative">
|
||||||
|
{#if patch.version !== $DataBase.lastPatchNoteCheckVersion}
|
||||||
|
<div class="absolute inline-flex items-center justify-center p-1 text-sm font-bold text-white bg-red-500 border-2 border-red-600 rounded-full top-2 start-2 ">
|
||||||
|
Update
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
<div class="bg-darkbg rounded-md p-6 flex flex-col transition-shadow overflow-y-hidden shadow-inner"
|
<div class="bg-darkbg rounded-md p-6 flex flex-col transition-shadow overflow-y-hidden shadow-inner"
|
||||||
on:click={() => {patchNodeHidden = false}}
|
on:click={() => {
|
||||||
|
patchNodeHidden = false
|
||||||
|
$DataBase.lastPatchNoteCheckVersion = patch.version
|
||||||
|
}}
|
||||||
class:max-h-40={patchNodeHidden}>
|
class:max-h-40={patchNodeHidden}>
|
||||||
<div class="prose prose-invert">
|
<div class="prose prose-invert">
|
||||||
{@html parseMarkdownSafe(patch)}
|
{@html parseMarkdownSafe(patch.content)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -592,6 +592,7 @@ export interface Database{
|
|||||||
},
|
},
|
||||||
top_k:number
|
top_k:number
|
||||||
claudeAws:boolean
|
claudeAws:boolean
|
||||||
|
lastPatchNoteCheckVersion?:string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface customscript{
|
export interface customscript{
|
||||||
|
|||||||
Reference in New Issue
Block a user