Skip to content

Commit

Permalink
Small cleanup, move new setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Senexis committed May 9, 2024
1 parent ae30951 commit 257cfc4
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 19 deletions.
32 changes: 20 additions & 12 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ function handleDismissTunablesDisclaimer() {
settings.tunablesDisclaimer = false;
} catch (error) {
const eventId = Sentry.captureException(error);
emit('error', 'An unknown error occurred.', eventId);
showErrorModal('An unknown error occurred.', eventId);
console.error(error);
}
}
Expand Down Expand Up @@ -1567,7 +1567,9 @@ function showErrorModal(body, eventId = null) {
<template #description>
Select the platform to compare tunables for.
<template v-if="settings.platform !== platform">
<button @click.stop="settings.platform = platform" class="text-primary-600 hover:text-primary-400">Set as your default platform</button>
<button @click.stop="settings.platform = platform" class="text-primary-600 hover:text-primary-400">
Set as your default platform
</button>
</template>
<template v-else>This is set as your default platform.</template>
</template>
Expand Down Expand Up @@ -1626,6 +1628,18 @@ function showErrorModal(body, eventId = null) {
<h3 class="font-lg font-semibold pb-2 border-b-2 border-secondary-200 dark:border-secondary-600">Tunables Panel</h3>
<div class="divide-y divide-secondary-200 dark:divide-secondary-600 mb-4">
<SettingsModalToggle v-model="settings.tunablesDisclaimer" :isVisibilityToggle="true">
<template #title>Tunables Disclaimer</template>
<template #description> Whether to show the tunables disclaimer banner.</template>
</SettingsModalToggle>
<div class="flex items-center justify-between gap-2 py-2">
<p class="text-xs text-secondary-500">
The following options control the visibility of all tunables in the panel. You can use these to reduce the amount of tunables you
see.
</p>
</div>
<SettingsModalToggle v-model="settings.added" :isVisibilityToggle="true">
<template #title>Added</template>
<template #description>Whether to show tunables that have been added.</template>
Expand Down Expand Up @@ -1719,7 +1733,10 @@ function showErrorModal(body, eventId = null) {
<template #title>Verbose</template>
<template #description>
Whether to show tunables that are
<button @click.stop="settingsModal.verboseDetail = !settingsModal.verboseDetail" class="text-primary-600 hover:text-primary-400">
<button
@click.stop="settingsModal.verboseDetail = !settingsModal.verboseDetail"
class="text-primary-600 hover:text-primary-400"
>
verbose</button
>.
</template>
Expand Down Expand Up @@ -1781,11 +1798,6 @@ function showErrorModal(body, eventId = null) {
</p>
</div>
<SettingsModalToggle v-model="settings.tunablesDisclaimer" :isVisibilityToggle="true">
<template #title>Tunables Disclaimer</template>
<template #description> Whether to show the tunables disclaimer banner.</template>
</SettingsModalToggle>
<SettingsModalToggle v-model="settings.goToWeek" :isVisibilityToggle="true">
<template #title>"Go to week" banner</template>
<template #description>Whether to show the banner that allows you to quickly jump to the weekly changes.</template>
Expand Down Expand Up @@ -1847,7 +1859,3 @@ function showErrorModal(body, eventId = null) {
</div>
</SettingsModal>
</template>
<style>
</style>
4 changes: 3 additions & 1 deletion src/components/Modals/AttributionModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ const props = defineProps({
</p>
</div>
</div>
<div class="bg-secondary-50 dark:bg-secondary-800 text-secondary-900 dark:text-secondary-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6">
<div
class="bg-secondary-50 dark:bg-secondary-800 text-secondary-900 dark:text-secondary-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6"
>
<div class="flex gap-3">
<button
type="button"
Expand Down
4 changes: 3 additions & 1 deletion src/components/Modals/DownloadModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ const props = defineProps({
<h3 class="font-lg font-semibold pb-2 mb-4 border-b-2 border-secondary-200 dark:border-secondary-600">Download tunables</h3>
<DownloadModalFiles :files="files" />
</div>
<div class="bg-secondary-50 dark:bg-secondary-800 text-secondary-900 dark:text-secondary-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6">
<div
class="bg-secondary-50 dark:bg-secondary-800 text-secondary-900 dark:text-secondary-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6"
>
<div class="flex gap-3">
<button
type="button"
Expand Down
4 changes: 3 additions & 1 deletion src/components/Modals/LicenseModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ const props = defineProps({
</p>
</div>
</div>
<div class="bg-secondary-50 dark:bg-secondary-800 text-secondary-900 dark:text-secondary-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6">
<div
class="bg-secondary-50 dark:bg-secondary-800 text-secondary-900 dark:text-secondary-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6"
>
<div class="flex gap-3">
<button
type="button"
Expand Down
4 changes: 3 additions & 1 deletion src/components/Modals/SettingsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ const props = defineProps({
</p>
</div>
</div>
<div class="bg-secondary-50 dark:bg-secondary-800 text-secondary-900 dark:text-secondary-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6">
<div
class="bg-secondary-50 dark:bg-secondary-800 text-secondary-900 dark:text-secondary-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6"
>
<div class="flex gap-3">
<button
type="button"
Expand Down
9 changes: 7 additions & 2 deletions src/components/Modals/SettingsModalSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,19 @@ const selected = computed({
>
<li
:class="[
active ? 'text-secondary-700 dark:text-secondary-300 bg-secondary-50 dark:bg-secondary-700' : 'text-secondary-900 dark:text-secondary-200',
active
? 'text-secondary-700 dark:text-secondary-300 bg-secondary-50 dark:bg-secondary-700'
: 'text-secondary-900 dark:text-secondary-200',
option.disabled ? 'opacity-50' : '',
'relative cursor-pointer select-none py-2 pl-3 pr-9',
]"
>
<span :class="[selected ? 'font-medium' : 'font-normal', 'block truncate']">{{ option.label }}</span>

<span v-if="selected" class="text-secondary-900 dark:text-secondary-200 absolute inset-y-0 right-0 flex items-center pr-4">
<span
v-if="selected"
class="text-secondary-900 dark:text-secondary-200 absolute inset-y-0 right-0 flex items-center pr-4"
>
<CheckIcon class="h-5 w-5" aria-hidden="true" />
</span>
</li>
Expand Down
4 changes: 3 additions & 1 deletion src/components/QuickView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,9 @@ const rdoStamps = computed(() => getRdoStamps());
<template v-else>
<template v-for="n in 5" :key="n">
<div class="flex items-center justify-between text-sm px-3 py-2 w-full select-none">
<div class="rounded-sm bg-secondary-300 dark:bg-secondary-600 animate-pulse" :style="{ width: random(4, 20) + 'em' }">&nbsp;</div>
<div class="rounded-sm bg-secondary-300 dark:bg-secondary-600 animate-pulse" :style="{ width: random(4, 20) + 'em' }">
&nbsp;
</div>
</div>
</template>
</template>
Expand Down

0 comments on commit 257cfc4

Please sign in to comment.