Sync branch magefile with main #104308

Merged
Sybren A. Stüvel merged 85 commits from abelli/flamenco:magefile into magefile 2024-05-13 16:26:32 +02:00
4 changed files with 38 additions and 10 deletions
Showing only changes of commit 7b31eba8d7 - Show all commits

View File

@ -1,5 +1,5 @@
<template> <template>
<header> <header class="mainmenu">
<router-link :to="{ name: 'index' }" class="navbar-brand">{{ flamencoName }}</router-link> <router-link :to="{ name: 'index' }" class="navbar-brand">{{ flamencoName }}</router-link>
<nav> <nav>
<ul> <ul>
@ -17,7 +17,11 @@
</li> </li>
</ul> </ul>
</nav> </nav>
<farm-status v-if="socketIOConnected" :status="farmStatus.status()" /> </header>
<header class="farmstatus">
<farm-status :status="farmStatus.status()" />
</header>
<header class="links">
<api-spinner /> <api-spinner />
<span class="app-version"> <span class="app-version">
<a :href="backendURL('/flamenco-addon.zip')">add-on</a> <a :href="backendURL('/flamenco-addon.zip')">add-on</a>
@ -51,7 +55,6 @@ export default {
flamencoVersion: DEFAULT_FLAMENCO_VERSION, flamencoVersion: DEFAULT_FLAMENCO_VERSION,
backendURL: backendURL, backendURL: backendURL,
farmStatus: useFarmStatus(), farmStatus: useFarmStatus(),
socketIOConnected: false,
}), }),
mounted() { mounted() {
window.app = this; window.app = this;
@ -62,7 +65,6 @@ export default {
this.$watch( this.$watch(
() => sockStatus.isConnected, () => sockStatus.isConnected,
(isConnected) => { (isConnected) => {
this.socketIOConnected = isConnected;
if (!isConnected) return; if (!isConnected) return;
if (!sockStatus.wasEverDisconnected) return; if (!sockStatus.wasEverDisconnected) return;
this.socketIOReconnect(); this.socketIOReconnect();

View File

@ -111,7 +111,7 @@ body {
display: grid; display: grid;
grid-gap: var(--grid-gap); grid-gap: var(--grid-gap);
grid-template-areas: grid-template-areas:
"header header header" "header-L header-M header-R"
"col-1 col-2 col-3" "col-1 col-2 col-3"
"footer footer footer"; "footer footer footer";
grid-template-columns: 1fr 1fr 1fr; grid-template-columns: 1fr 1fr 1fr;
@ -124,7 +124,7 @@ body {
body.is-two-columns #app { body.is-two-columns #app {
grid-template-areas: grid-template-areas:
"header header" "header-L header-R"
"col-1 col-2" "col-1 col-2"
"footer footer"; "footer footer";
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
@ -134,7 +134,7 @@ body.is-two-columns #app {
@media (max-width: 1280px) { @media (max-width: 1280px) {
#app { #app {
grid-template-areas: grid-template-areas:
"header header" "header-L header-R"
"col-1 col-2" "col-1 col-2"
"col-3 col-3" "col-3 col-3"
"footer footer"; "footer footer";
@ -206,10 +206,37 @@ header {
align-items: center; align-items: center;
color: var(--color-text-muted); color: var(--color-text-muted);
display: flex; display: flex;
grid-area: header;
padding: 0 var(--spacer-sm); padding: 0 var(--spacer-sm);
} }
header.mainmenu {
grid-area: header-L;
}
header.farmstatus {
grid-area: header-M;
margin-left: auto;
margin-right: auto;
}
@media (max-width: 1280px) {
header.farmstatus {
grid-area: header-L;
margin-right: 0;
}
}
@media (max-width: 1070px) {
header.farmstatus {
/* No more space to show it in the header. */
display: none;
}
}
body.is-two-columns header.farmstatus {
grid-area: header-L;
margin-right: 0;
}
header.links {
grid-area: header-R;
}
header nav { header nav {
margin-right: auto; margin-right: auto;
} }

View File

@ -23,7 +23,7 @@ span {
transition-delay: 250ms; transition-delay: 250ms;
transition-duration: 500ms; transition-duration: 500ms;
font-weight: bold; font-weight: bold;
margin-right: 2rem; margin-right: auto;
position: relative; position: relative;
} }

View File

@ -26,7 +26,6 @@ const explanation = computed(() => {
<style> <style>
span#farmstatus { span#farmstatus {
margin: 0 auto;
cursor: default; cursor: default;
} }
span#farmstatus span { span#farmstatus span {