Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
components: icon button adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
liushuyu committed Jul 24, 2022
1 parent 74626c5 commit 13e6734
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 32 deletions.
Binary file modified public/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions src/assets/audio-volume-muted.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/drive-harddisk-root-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,22 @@ select:focus {
outline: none;
}

.select::after {
content: " ";
display: block;
height: 0.625em;
margin-top: -1.6em;
pointer-events: none;
right: 0.725em;
position: absolute;
border: 2px solid #fff;
border-right: 0;
border-top: 0;
width: 0.625em;
transform: rotate(-45deg);
transform-origin: center;
}

.button {
appearance: none;
border: 0;
Expand Down
1 change: 1 addition & 0 deletions src/assets/web-browser-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 14 additions & 8 deletions src/components/DKFilterSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,16 @@ export default {

<template>
<div class="dropdown-content">
<input
:name="input_name"
type="text"
v-model="user_input"
:style="show_dropdown ? '' : 'text-align: center'"
placeholder="Start typing to search..."
@focus="edit_selection"
/>
<div class="select">
<input
:name="input_name"
type="text"
v-model="user_input"
:style="show_dropdown ? '' : 'text-align: center'"
placeholder="Start typing to search..."
@focus="edit_selection"
/>
</div>
<div class="dropdown-gutter" v-if="show_dropdown">
<a
v-for="(opt, index) in filtered_options"
Expand All @@ -61,6 +63,10 @@ export default {
</template>

<style scoped>
div.select::after {
margin-top: -1.2em;
}
.dropdown-content a {
padding: 12px 16px;
text-decoration: none;
Expand Down
13 changes: 5 additions & 8 deletions src/components/DKIconButton.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script>
export default {
props: {
icon: String,
title: String,
explain: String,
},
Expand All @@ -11,11 +10,7 @@ export default {
<template>
<button class="button" style="height: 100%">
<div class="icon-container">
<img
class="icon"
src="@/assets/drive-harddisk-root-symbolic.svg"
height="36"
/>
<slot />
<div class="text-box">
<span style="font-size: 1rem">{{ explain }}</span>
<h2 style="font-size: 1.5rem">{{ title }}</h2>
Expand All @@ -24,11 +19,13 @@ export default {
</button>
</template>

<style scoped>
.icon {
<style>
.icon-container img {
margin: 0 0.5rem 0 0;
}
</style>

<style scoped>
.text-box {
line-height: 0.9;
margin-top: 0rem;
Expand Down
Empty file added src/locales/en.json
Empty file.
8 changes: 6 additions & 2 deletions src/views/InstallView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ export default {
</article>
</div>
<p style="display: flex; column-gap: 0.5rem">
<DKIconButton title="Firefox" explain="Web Browser" />
<DKIconButton title="BGM" explain="Mute" />
<DKIconButton title="Firefox" explain="Web Browser">
<img src="@/assets/web-browser-symbolic.svg" height="36" />
</DKIconButton>
<DKIconButton title="BGM" explain="Mute">
<img src="@/assets/audio-volume-muted.svg" height="36" />
</DKIconButton>
</p>
</template>

Expand Down
15 changes: 10 additions & 5 deletions src/views/LocaleView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,16 @@ export default {
<p class="error-msg"></p>
<form class="form-layout">
<label for="timezone">Timezone</label>
<select name="timezone"></select>
<p class="select">
<select name="timezone"></select>
</p>
<label for="rtc">RTC Timezone</label>
<select name="rtc">
<option value="0">UTC (Recommended)</option>
<option value="1">Local time (like Windows)</option>
</select>
<p class="select">
<select name="rtc">
<option value="0">UTC (Recommended)</option>
<option value="1">Local time (like Windows)</option>
</select>
</p>
</form>
</div>
</template>
Expand All @@ -59,5 +63,6 @@ export default {
input,
select {
margin-bottom: 0.5em;
width: 100%;
}
</style>
4 changes: 3 additions & 1 deletion src/views/PartitionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ export default {

<section>
<p style="display: flex">
<DKIconButton title="GParted" explain="Manange Partitions" />
<DKIconButton title="GParted" explain="Manange Partitions">
<img src="@/assets/drive-harddisk-root-symbolic.svg" height="36" />
</DKIconButton>
</p>
</section>
</div>
Expand Down
17 changes: 10 additions & 7 deletions src/views/SwapFileView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ export default {
<form>
<section class="form-layout">
<label for="swap">Swapfile</label>
<select name="swap" v-model="type">
<option :value="0">Automatic</option>
<option :value="1">Custom</option>
<option :value="2">Disabled</option>
</select>
<p class="select">
<select name="swap" v-model="type">
<option :value="0">Automatic</option>
<option :value="1">Custom</option>
<option :value="2">Disabled</option>
</select>
</p>
<div></div>
<p class="error-msg" v-if="type === 2">
<i>
Expand All @@ -58,13 +60,13 @@ export default {
<p>{{ rec_size * 2 }}GiB</p>
</div>
</section>
<span style="float: right; width: 25%; margin-left: 2.4rem">
<span style="float: right; width: 25%; margin-left: 2rem">
<input
type="number"
:max="rec_size * 2"
min="0"
step="0.5"
style="width: 70%"
style="width: 67%"
v-model="size"
required
/>
Expand Down Expand Up @@ -105,6 +107,7 @@ input.dk-slider {
input,
select {
margin-bottom: 0.5em;
width: 100%;
}
.dk-slider::-webkit-slider-thumb {
Expand Down

0 comments on commit 13e6734

Please sign in to comment.