Fix placement of Modrinth App promo and add toggle for the primary nav promos (#1315)
This commit is contained in:
parent
cfbf08dbf5
commit
12543be913
@ -17,6 +17,7 @@ export const useCosmetics = () =>
|
|||||||
externalLinksNewTab: true,
|
externalLinksNewTab: true,
|
||||||
developerMode: false,
|
developerMode: false,
|
||||||
notUsingBlockers: false,
|
notUsingBlockers: false,
|
||||||
|
hideModrinthAppPromos: false,
|
||||||
searchDisplayMode: {
|
searchDisplayMode: {
|
||||||
mod: 'list',
|
mod: 'list',
|
||||||
plugin: 'list',
|
plugin: 'list',
|
||||||
|
|||||||
@ -94,10 +94,6 @@
|
|||||||
<SettingsIcon class="icon" />
|
<SettingsIcon class="icon" />
|
||||||
<span class="title">Settings</span>
|
<span class="title">Settings</span>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
<NuxtLink class="item button-transparent get-the-app" to="/app">
|
|
||||||
<DownloadIcon class="icon" />
|
|
||||||
<span class="title">Get Modrinth App</span>
|
|
||||||
</NuxtLink>
|
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
v-if="tags.staffRoles.includes(auth.user.role)"
|
v-if="tags.staffRoles.includes(auth.user.role)"
|
||||||
class="item button-transparent"
|
class="item button-transparent"
|
||||||
@ -106,6 +102,14 @@
|
|||||||
<ModerationIcon class="icon" />
|
<ModerationIcon class="icon" />
|
||||||
<span class="title">Moderation</span>
|
<span class="title">Moderation</span>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
|
<NuxtLink
|
||||||
|
v-if="!cosmetics.hideModrinthAppPromos"
|
||||||
|
class="item button-transparent primary-color"
|
||||||
|
to="/app"
|
||||||
|
>
|
||||||
|
<DownloadIcon class="icon" />
|
||||||
|
<span class="title">Get Modrinth App</span>
|
||||||
|
</NuxtLink>
|
||||||
<hr class="divider" />
|
<hr class="divider" />
|
||||||
<button class="item button-transparent" @click="logoutUser()">
|
<button class="item button-transparent" @click="logoutUser()">
|
||||||
<LogOutIcon class="icon" />
|
<LogOutIcon class="icon" />
|
||||||
@ -118,7 +122,7 @@
|
|||||||
<LogInIcon /> Sign in
|
<LogInIcon /> Sign in
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
<nuxt-link
|
<nuxt-link
|
||||||
v-if="$route.path !== '/app'"
|
v-if="$route.path !== '/app' && !cosmetics.hideModrinthAppPromos"
|
||||||
class="btn btn-outline btn-primary"
|
class="btn btn-outline btn-primary"
|
||||||
to="/app"
|
to="/app"
|
||||||
>
|
>
|
||||||
@ -750,7 +754,7 @@ export default defineNuxtComponent({
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem 0.75rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
@ -762,6 +766,15 @@ export default defineNuxtComponent({
|
|||||||
&.router-link-exact-active {
|
&.router-link-exact-active {
|
||||||
color: var(--color-button-text-active);
|
color: var(--color-button-text-active);
|
||||||
background-color: var(--color-button-bg);
|
background-color: var(--color-button-bg);
|
||||||
|
|
||||||
|
&.primary-color {
|
||||||
|
color: var(--color-button-text-active);
|
||||||
|
background-color: var(--color-brand-highlight);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.primary-color {
|
||||||
|
color: var(--color-brand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1161,9 +1174,5 @@ export default defineNuxtComponent({
|
|||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
padding: 0.5rem 1rem;
|
padding: 0.5rem 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.get-the-app {
|
|
||||||
color: var(--color-brand) !important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
<style src="vue-multiselect/dist/vue-multiselect.css"></style>
|
<style src="vue-multiselect/dist/vue-multiselect.css"></style>
|
||||||
|
|||||||
@ -130,6 +130,22 @@
|
|||||||
@change="saveCosmetics"
|
@change="saveCosmetics"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="adjacent-input small">
|
||||||
|
<label for="modrinth-app-promos">
|
||||||
|
<span class="label__title">Hide Modrinth App promotions</span>
|
||||||
|
<span class="label__description">
|
||||||
|
Hides the "Get Modrinth App" buttons from primary navigation. The Modrinth App page can
|
||||||
|
still be found on the landing page or in the footer.
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
id="modrinth-app-promos"
|
||||||
|
v-model="cosmetics.hideModrinthAppPromos"
|
||||||
|
class="switch stylized-toggle"
|
||||||
|
type="checkbox"
|
||||||
|
@change="saveCosmetics"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user