Skip to content

Commit

Permalink
fix: updated settings colours to match work hud
Browse files Browse the repository at this point in the history
  • Loading branch information
builder555 committed Mar 12, 2023
1 parent 1fcd0d5 commit 94985dc
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ui/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { computed, onMounted, onBeforeUnmount } from 'vue';
import TheWorkView from './components/WorkView.vue';
import TheWorkView from './components/TheWorkView.vue';
import TheSettings from './components/TheSettings.vue';
import TheOctocat from './components/TheOctocat.vue';
import TheNotification from './components/TheNotification.vue';
Expand Down
7 changes: 5 additions & 2 deletions ui/src/assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@

.tag {
width: 40px;
/* background-color: rgba(var(--secondary-color),0.7) !important; */
}
.bg-accent {
background-color: rgba(var(--accent-color),0.9) !important;
color:#fff !important;
}
.pointer {
cursor: pointer;
Expand Down Expand Up @@ -68,7 +71,7 @@ input[type='number'] {
}

.checkbox input:checked + label {
background: #55da8c;
background: rgb(var(--accent-color));
}

.checkbox input:checked + label:after {
Expand Down
47 changes: 46 additions & 1 deletion ui/src/components/SettingSlider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ watch(
:min="setting.component.min"
:max="setting.component.max"
:step="setting.component.step"
:style="{
backgroundSize: `${((setting.value - setting.component.min) / (setting.component.max - setting.component.min)) * 100}% 100%`,
}"
@mouseup="updateSetting(name, setting.value)"
@touchend="updateSetting(name, setting.value)"
@blur="updateSetting(name, setting.value)"
Expand All @@ -57,8 +60,50 @@ watch(
v-model="localValue"
/>
</div>
<div v-show="!isRawValueVisible" class="tag is-info" @click="() => (isRawValueVisible = !isRawValueVisible)">
<div v-show="!isRawValueVisible" class="tag bg-accent" @click="() => (isRawValueVisible = !isRawValueVisible)">
{{ (setting.component.display && setting.component.display(setting.value)) || setting.value }}
</div>
</div>
</template>
<style scoped>
input[type="range"] {
-webkit-appearance: none;
margin-top: 0.5rem;
height: 0.5rem;
background: rgba(255, 255, 255, 0.6);
border-radius: 5px;
background-color:#ddd;
background-image: linear-gradient(rgba(var(--secondary-color),1), rgba(var(--secondary-color),1));
background-repeat: no-repeat;
}
input[type="range"]::-webkit-slider-thumb
{
-webkit-appearance: none;
height: 18px;
width: 18px;
border:none;
border-radius: 50%;
background: rgb(var(--accent-color));
cursor: ew-resize;
box-shadow: 0 0 2px 0 #555;
transition: background .3s ease-in-out;
}
input[type="range"]::-moz-range-thumb
{
height: 18px;
width: 18px;
border:none;
border-radius: 50%;
background: rgb(var(--accent-color));
cursor: ew-resize;
box-shadow: 0 0 2px 0 #555;
transition: background .3s ease-in-out;
}
input[type=range]::-webkit-slider-runnable-track {
-webkit-appearance: none;
box-shadow: none;
border: none;
background: transparent;
}
</style>
4 changes: 2 additions & 2 deletions ui/src/components/TheOctocat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ defineProps(['version']);
top: 27px;
right: 23px;
padding: 0.5rem;
color: #aaa;
font-size: 0.8rem;
color: #999;
font-size: 0.85rem;
font-weight: bold;
z-index: 100;
transform: rotate(45deg);
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/TheSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ for (const group of groups.value) {
margin-bottom: 0.5rem;
}
.settings-header {
background: #eef5ff;
background-color: rgba(var(--secondary-color),0.1);
}
.no-shadow {
box-shadow: none;
Expand Down
File renamed without changes.

0 comments on commit 94985dc

Please sign in to comment.