* wip

* wip

* wip
This commit is contained in:
syuilo
2021-03-03 01:03:29 +09:00
committed by GitHub
parent 7e93319873
commit 5e9cc09fcb
11 changed files with 271 additions and 5 deletions

View File

@ -8,7 +8,7 @@
<Fa :icon="faExternalLinkAlt" class="icon"/>
</span>
</a>
<MkA class="main _button _formPanel _formClickable" :class="{ active }" :to="to" v-else>
<MkA class="main _button _formPanel _formClickable" :class="{ active }" :to="to" :behavior="behavior" v-else>
<span class="icon"><slot name="icon"></slot></span>
<span class="text"><slot></slot></span>
<span class="right">
@ -38,6 +38,10 @@ export default defineComponent({
type: Boolean,
required: false
},
behavior: {
type: String,
required: false,
},
},
data() {
return {

View File

@ -98,6 +98,11 @@ export default defineComponent({
},
nav() {
if (this.behavior === 'browser') {
location.href = this.to;
return;
}
if (this.to.startsWith('/my/messaging')) {
if (ColdDeviceStorage.get('chatOpenBehavior') === 'window') return this.window();
if (ColdDeviceStorage.get('chatOpenBehavior') === 'popout') return this.popout();

View File

@ -23,13 +23,16 @@
<FormLink to="/settings/registry"><template #icon><Fa :icon="faCogs"/></template>{{ $ts.registry }}</FormLink>
<FormLink to="/bios" behavior="browser"><template #icon><Fa :icon="faDoorOpen"/></template>BIOS</FormLink>
<FormLink to="/cli" behavior="browser"><template #icon><Fa :icon="faDoorOpen"/></template>CLI</FormLink>
<FormButton @click="closeAccount" danger>{{ $ts.closeAccount }}</FormButton>
</FormBase>
</template>
<script lang="ts">
import { defineAsyncComponent, defineComponent } from 'vue';
import { faEllipsisH, faCogs } from '@fortawesome/free-solid-svg-icons';
import { faEllipsisH, faCogs, faDoorOpen } from '@fortawesome/free-solid-svg-icons';
import FormSwitch from '@/components/form/switch.vue';
import FormSelect from '@/components/form/select.vue';
import FormLink from '@/components/form/link.vue';
@ -61,7 +64,7 @@ export default defineComponent({
icon: faEllipsisH
},
debug,
faCogs
faCogs, faDoorOpen,
}
},