modernize iconified-input
This commit is contained in:
parent
cce9d348a9
commit
39b80cb484
28
theseus_gui/src/assets/stylesheets/components.scss
Normal file
28
theseus_gui/src/assets/stylesheets/components.scss
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// Quick snippets stolen from knossos project to make omorphia components fit
|
||||||
|
|
||||||
|
.iconified-input {
|
||||||
|
align-items: center;
|
||||||
|
display: inline-flex;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
input {
|
||||||
|
padding-left: 2.25rem;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus-within svg {
|
||||||
|
color: var(--color-button-text-active);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
position: absolute;
|
||||||
|
left: 0.75rem;
|
||||||
|
height: 1.25rem;
|
||||||
|
width: 1.25rem;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
color: var(--color-button-text);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -246,7 +246,7 @@ const filteredResults = computed(() => {
|
|||||||
<div class="iconified-input">
|
<div class="iconified-input">
|
||||||
<SearchIcon />
|
<SearchIcon />
|
||||||
<input v-model="search" type="text" placeholder="Search" class="search-input" />
|
<input v-model="search" type="text" placeholder="Search" class="search-input" />
|
||||||
<Button @click="() => (search = '')">
|
<Button class="r-btn" @click="() => (search = '')">
|
||||||
<XIcon />
|
<XIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -83,6 +83,7 @@
|
|||||||
v-tooltip="'Open link'"
|
v-tooltip="'Open link'"
|
||||||
icon-only
|
icon-only
|
||||||
color="raised"
|
color="raised"
|
||||||
|
class="r-btn"
|
||||||
@click="() => clipboardWrite(loginUrl)"
|
@click="() => clipboardWrite(loginUrl)"
|
||||||
>
|
>
|
||||||
<GlobeIcon />
|
<GlobeIcon />
|
||||||
|
|||||||
@ -112,7 +112,7 @@ const exportPack = async () => {
|
|||||||
<div class="iconified-input">
|
<div class="iconified-input">
|
||||||
<PackageIcon />
|
<PackageIcon />
|
||||||
<input v-model="nameInput" type="text" placeholder="Modpack name" class="input" />
|
<input v-model="nameInput" type="text" placeholder="Modpack name" class="input" />
|
||||||
<Button @click="nameInput = ''">
|
<Button class="r-btn" @click="nameInput = ''">
|
||||||
<XIcon />
|
<XIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@ -122,7 +122,7 @@ const exportPack = async () => {
|
|||||||
<div class="iconified-input">
|
<div class="iconified-input">
|
||||||
<VersionIcon />
|
<VersionIcon />
|
||||||
<input v-model="versionInput" type="text" placeholder="1.0.0" class="input" />
|
<input v-model="versionInput" type="text" placeholder="1.0.0" class="input" />
|
||||||
<Button @click="versionInput = ''">
|
<Button class="r-btn" @click="versionInput = ''">
|
||||||
<XIcon />
|
<XIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -110,7 +110,7 @@
|
|||||||
placeholder="Path to launcher"
|
placeholder="Path to launcher"
|
||||||
@change="setPath"
|
@change="setPath"
|
||||||
/>
|
/>
|
||||||
<Button @click="() => (selectedLauncherPath = '')">
|
<Button class="r-btn" @click="() => (selectedLauncherPath = '')">
|
||||||
<XIcon />
|
<XIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -23,7 +23,7 @@ defineProps({
|
|||||||
<div class="iconified-input">
|
<div class="iconified-input">
|
||||||
<SearchIcon />
|
<SearchIcon />
|
||||||
<input v-model="search" type="text" placeholder="Search" class="search-input" />
|
<input v-model="search" type="text" placeholder="Search" class="search-input" />
|
||||||
<Button @click="() => (search = '')">
|
<Button class="r-btn" @click="() => (search = '')">
|
||||||
<XIcon />
|
<XIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -189,7 +189,7 @@ defineProps({
|
|||||||
type="text"
|
type="text"
|
||||||
:placeholder="`Search ${projectType}s...`"
|
:placeholder="`Search ${projectType}s...`"
|
||||||
/>
|
/>
|
||||||
<Button @click="() => (query = '')">
|
<Button class="r-btn" @click="() => (query = '')">
|
||||||
<XIcon />
|
<XIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -132,7 +132,7 @@ const next = async () => {
|
|||||||
placeholder="Path to launcher"
|
placeholder="Path to launcher"
|
||||||
@change="setPath"
|
@change="setPath"
|
||||||
/>
|
/>
|
||||||
<Button @click="() => (selectedLauncherPath = '')">
|
<Button class="r-btn" @click="() => (selectedLauncherPath = '')">
|
||||||
<XIcon />
|
<XIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -119,7 +119,7 @@ const clipboardWrite = async (a) => {
|
|||||||
<div class="iconified-input">
|
<div class="iconified-input">
|
||||||
<LogInIcon />
|
<LogInIcon />
|
||||||
<input type="text" :value="loginUrl" readonly />
|
<input type="text" :value="loginUrl" readonly />
|
||||||
<Button v-tooltip="'Open link'" icon-only color="raised" @click="openUrl">
|
<Button v-tooltip="'Open link'" icon-only color="raised" class="r-btn" @click="openUrl">
|
||||||
<GlobeIcon />
|
<GlobeIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -2,8 +2,10 @@ import { createApp } from 'vue'
|
|||||||
import router from '@/routes'
|
import router from '@/routes'
|
||||||
import App from '@/App.vue'
|
import App from '@/App.vue'
|
||||||
import { createPinia } from 'pinia'
|
import { createPinia } from 'pinia'
|
||||||
|
import { createPlugin as createVintl } from '@vintl/vintl/plugin'
|
||||||
import 'omorphia/dist/style.css'
|
import 'omorphia/dist/style.css'
|
||||||
import '@/assets/stylesheets/global.scss'
|
import '@/assets/stylesheets/global.scss'
|
||||||
|
import '@/assets/stylesheets/components.scss'
|
||||||
import 'floating-vue/dist/style.css'
|
import 'floating-vue/dist/style.css'
|
||||||
import FloatingVue from 'floating-vue'
|
import FloatingVue from 'floating-vue'
|
||||||
import { get_opening_command, initialize_state } from '@/helpers/state'
|
import { get_opening_command, initialize_state } from '@/helpers/state'
|
||||||
@ -14,9 +16,25 @@ import { isDev } from './helpers/utils.js'
|
|||||||
|
|
||||||
const pinia = createPinia()
|
const pinia = createPinia()
|
||||||
|
|
||||||
|
const vintl = createVintl({
|
||||||
|
controllerOpts: {
|
||||||
|
defaultLocale: 'en-US',
|
||||||
|
locale: 'en-US',
|
||||||
|
locales: [
|
||||||
|
{
|
||||||
|
tag: 'en-US',
|
||||||
|
meta: {
|
||||||
|
displayName: 'American English',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
let app = createApp(App)
|
let app = createApp(App)
|
||||||
app.use(router)
|
app.use(router)
|
||||||
app.use(pinia)
|
app.use(pinia)
|
||||||
|
app.use(vintl)
|
||||||
app.use(FloatingVue)
|
app.use(FloatingVue)
|
||||||
app.mixin(loadCssMixin)
|
app.mixin(loadCssMixin)
|
||||||
|
|
||||||
@ -54,7 +72,7 @@ initialize_state()
|
|||||||
.finally(() => {
|
.finally(() => {
|
||||||
mountedApp.initialize()
|
mountedApp.initialize()
|
||||||
get_opening_command().then((command) => {
|
get_opening_command().then((command) => {
|
||||||
console.log(JSON.stringify(command)) // change me to use whatever FE command handler is made
|
console.log('Opening Command', JSON.stringify(command)) // change me to use whatever FE command handler is made
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -705,7 +705,7 @@ onUnmounted(() => unlistenOffline())
|
|||||||
:placeholder="`Search ${projectType}s...`"
|
:placeholder="`Search ${projectType}s...`"
|
||||||
@input="onSearchChange(1)"
|
@input="onSearchChange(1)"
|
||||||
/>
|
/>
|
||||||
<Button @click="() => clearSearch()">
|
<Button class="r-btn" @click="() => clearSearch()">
|
||||||
<XIcon />
|
<XIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@ -843,13 +843,6 @@ onUnmounted(() => unlistenOffline())
|
|||||||
min-height: min-content !important;
|
min-height: min-content !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconified-input {
|
|
||||||
input {
|
|
||||||
max-width: none !important;
|
|
||||||
flex-basis: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-panel-container {
|
.search-panel-container {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|||||||
@ -187,7 +187,7 @@ async function refreshDir() {
|
|||||||
<div class="iconified-input">
|
<div class="iconified-input">
|
||||||
<BoxIcon />
|
<BoxIcon />
|
||||||
<input id="appDir" v-model="settingsDir" type="text" class="input" />
|
<input id="appDir" v-model="settingsDir" type="text" class="input" />
|
||||||
<Button @click="findLauncherDir">
|
<Button class="r-btn" @click="findLauncherDir">
|
||||||
<FolderSearchIcon />
|
<FolderSearchIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user