Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Layoric committed Oct 31, 2024
2 parents 69e2ae8 + 29da06a commit 3b6f878
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
8 changes: 5 additions & 3 deletions AiServer/wwwroot/Ui.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export default {
</button>
</div>
<div v-if="showUserMenu" class="absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button" tabindex="-1">
<a href="/auth/logout?redirect=/" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-2">Sign out</a>
<a v-if="hasRole('Admin')" href="/admin" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1">Admin</a>
<a href="/auth/logout?redirect=/" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1">Sign out</a>
</div>
</div>
<div v-else>
Expand Down Expand Up @@ -119,6 +120,7 @@ export default {
</div>
</div>
<div class="mt-3 space-y-1">
<a v-if="hasRole('Admin')" href="/admin" class="block px-4 py-2 text-base font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-800">Admin</a>
<a href="/auth/logout?redirect=/" class="block px-4 py-2 text-base font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-800">Sign out</a>
</div>
</div>
Expand All @@ -140,7 +142,7 @@ export default {

const client = useClient()
const routes = inject('routes')
const { user, signIn, signOut } = useAuth()
const { user, hasRole, signIn, signOut } = useAuth()
const profileUrl = ref(localStorage.getItem('profileUrl') || user.value?.profileUrl)
const refreshKey = ref(1)
const showUserMenu = ref(false)
Expand Down Expand Up @@ -198,7 +200,7 @@ export default {
activeSection.value = sections.find(x => x.id === routes.admin) || HomeSection)
})

return { routes, user, sections, activeSection, profileUrl, refreshKey, showUserMenu,
return { routes, user, hasRole, sections, activeSection, profileUrl, refreshKey, showUserMenu,
icons, navTo,
}
}
Expand Down
24 changes: 6 additions & 18 deletions AiServer/wwwroot/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -922,8 +922,8 @@ select{
bottom: 0px;
}

.bottom-4 {
bottom: 1rem;
.bottom-10 {
bottom: 2.5rem;
}

.bottom-full {
Expand Down Expand Up @@ -990,14 +990,6 @@ select{
top: 2rem;
}

.bottom-12 {
bottom: 3rem;
}

.bottom-10 {
bottom: 2.5rem;
}

.z-0 {
z-index: 0;
}
Expand All @@ -1014,10 +1006,6 @@ select{
z-index: 40;
}

.z-50 {
z-index: 50;
}

.col-span-12 {
grid-column: span 12 / span 12;
}
Expand Down Expand Up @@ -1124,6 +1112,10 @@ select{
margin-left: -0.75rem;
}

.-ml-4 {
margin-left: -1rem;
}

.-ml-px {
margin-left: -1px;
}
Expand Down Expand Up @@ -1312,10 +1304,6 @@ select{
margin-top: auto;
}

.-ml-4 {
margin-left: -1rem;
}

.block {
display: block;
}
Expand Down
3 changes: 3 additions & 0 deletions AiServer/wwwroot/lib/data/media-models.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"sampler": "dpmpp_2m",
"width": 1024,
"height": 1024,
"type": "sd3",
"url": "https://huggingface.co/stabilityai/stable-diffusion-3.5-large",
"downloadUrl": "https://huggingface.co/stabilityai/stable-diffusion-3.5-large/resolve/main/sd3.5_large.safetensors?download=true"
},
Expand All @@ -107,6 +108,7 @@
"sampler": "dpmpp_2m",
"width": 1024,
"height": 1024,
"type": "sd3",
"url": "https://huggingface.co/stabilityai/stable-diffusion-3.5-large-turbo",
"downloadUrl": "https://huggingface.co/stabilityai/stable-diffusion-3.5-large-turbo/resolve/main/sd3.5_large_turbo.safetensors?download=true"
},
Expand All @@ -129,6 +131,7 @@
"sampler": "euler",
"width": 1024,
"height": 1024,
"type": "sd3",
"url": "https://huggingface.co/Comfy-Org/stable-diffusion-3.5-fp8",
"downloadUrl": "https://huggingface.co/Comfy-Org/stable-diffusion-3.5-fp8/resolve/main/sd3.5_large_fp8_scaled.safetensors?download=true"
},
Expand Down

0 comments on commit 3b6f878

Please sign in to comment.