Use FontAwesome as web font instead of vue component (#7469)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * Update yarn.lock * wip * wip
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<div class="_root">
|
||||
<MkA class="view" v-if="pageId" :to="`/@${ author.username }/pages/${ currentName }`"><Fa :icon="faExternalLinkSquareAlt"/> {{ $ts._pages.viewPage }}</MkA>
|
||||
<MkA class="view" v-if="pageId" :to="`/@${ author.username }/pages/${ currentName }`"><i class="fas fa-external-link-square-alt"></i> {{ $ts._pages.viewPage }}</MkA>
|
||||
|
||||
<div class="buttons" style="margin: 16px;">
|
||||
<MkButton inline @click="save" primary class="save" v-if="!readonly"><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
|
||||
<MkButton inline @click="duplicate" class="duplicate" v-if="pageId"><Fa :icon="faCopy"/> {{ $ts.duplicate }}</MkButton>
|
||||
<MkButton inline @click="del" class="delete" v-if="pageId && !readonly"><Fa :icon="faTrashAlt"/> {{ $ts.delete }}</MkButton>
|
||||
<MkButton inline @click="save" primary class="save" v-if="!readonly"><i class="fas fa-save"></i> {{ $ts.save }}</MkButton>
|
||||
<MkButton inline @click="duplicate" class="duplicate" v-if="pageId"><i class="fas fa-copy"></i> {{ $ts.duplicate }}</MkButton>
|
||||
<MkButton inline @click="del" class="delete" v-if="pageId && !readonly"><i class="fas fa-trash-alt"></i> {{ $ts.delete }}</MkButton>
|
||||
</div>
|
||||
|
||||
<MkContainer :foldable="true" :expanded="true" class="_gap">
|
||||
<template #header><Fa :icon="faCog"/> {{ $ts._pages.pageSetting }}</template>
|
||||
<template #header><i class="fas fa-cog"></i> {{ $ts._pages.pageSetting }}</template>
|
||||
<div style="padding: 16px;">
|
||||
<MkInput v-model:value="title">
|
||||
<span>{{ $ts._pages.title }}</span>
|
||||
@@ -35,26 +35,26 @@
|
||||
<MkSwitch v-model:value="hideTitleWhenPinned">{{ $ts._pages.hideTitleWhenPinned }}</MkSwitch>
|
||||
|
||||
<div class="eyeCatch">
|
||||
<MkButton v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage"><Fa :icon="faPlus"/> {{ $ts._pages.eyeCatchingImageSet }}</MkButton>
|
||||
<MkButton v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage"><i class="fas fa-plus"></i> {{ $ts._pages.eyeCatchingImageSet }}</MkButton>
|
||||
<div v-else-if="eyeCatchingImage">
|
||||
<img :src="eyeCatchingImage.url" :alt="eyeCatchingImage.name" style="max-width: 100%;"/>
|
||||
<MkButton @click="removeEyeCatchingImage()" v-if="!readonly"><Fa :icon="faTrashAlt"/> {{ $ts._pages.eyeCatchingImageRemove }}</MkButton>
|
||||
<MkButton @click="removeEyeCatchingImage()" v-if="!readonly"><i class="fas fa-trash-alt"></i> {{ $ts._pages.eyeCatchingImageRemove }}</MkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</MkContainer>
|
||||
|
||||
<MkContainer :foldable="true" :expanded="true" class="_gap">
|
||||
<template #header><Fa :icon="faStickyNote"/> {{ $ts._pages.contents }}</template>
|
||||
<template #header><i class="fas fa-sticky-note"></i> {{ $ts._pages.contents }}</template>
|
||||
<div style="padding: 16px;">
|
||||
<XBlocks class="content" v-model:value="content" :hpml="hpml"/>
|
||||
|
||||
<MkButton @click="add()" v-if="!readonly"><Fa :icon="faPlus"/></MkButton>
|
||||
<MkButton @click="add()" v-if="!readonly"><i class="fas fa-plus"></i></MkButton>
|
||||
</div>
|
||||
</MkContainer>
|
||||
|
||||
<MkContainer :foldable="true" class="_gap">
|
||||
<template #header><Fa :icon="faMagic"/> {{ $ts._pages.variables }}</template>
|
||||
<template #header><i class="fas fa-magic"></i> {{ $ts._pages.variables }}</template>
|
||||
<div class="qmuvgica">
|
||||
<XDraggable tag="div" class="variables" v-show="variables.length > 0" v-model="variables" item-key="name" handle=".drag-handle" :group="{ name: 'variables' }" animation="150" swap-threshold="0.5">
|
||||
<template #item="{element}">
|
||||
@@ -70,12 +70,12 @@
|
||||
</template>
|
||||
</XDraggable>
|
||||
|
||||
<MkButton @click="addVariable()" class="add" v-if="!readonly"><Fa :icon="faPlus"/></MkButton>
|
||||
<MkButton @click="addVariable()" class="add" v-if="!readonly"><i class="fas fa-plus"></i></MkButton>
|
||||
</div>
|
||||
</MkContainer>
|
||||
|
||||
<MkContainer :foldable="true" :expanded="true" class="_gap">
|
||||
<template #header><Fa :icon="faCode"/> {{ $ts.script }}</template>
|
||||
<template #header><i class="fas fa-code"></i> {{ $ts.script }}</template>
|
||||
<div>
|
||||
<MkTextarea class="_code" v-model:value="script"/>
|
||||
</div>
|
||||
@@ -91,8 +91,6 @@ import 'prismjs/components/prism-clike';
|
||||
import 'prismjs/components/prism-javascript';
|
||||
import 'prismjs/themes/prism-okaidia.css';
|
||||
import 'vue-prism-editor/dist/prismeditor.min.css';
|
||||
import { faICursor, faPlus, faMagic, faCog, faCode, faExternalLinkSquareAlt, faPencilAlt, faCopy } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faSave, faStickyNote, faTrashAlt } from '@fortawesome/free-regular-svg-icons';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import XVariable from './page-editor.script-block.vue';
|
||||
import XBlocks from './page-editor.blocks.vue';
|
||||
@@ -143,7 +141,7 @@ export default defineComponent({
|
||||
}
|
||||
return {
|
||||
title: title,
|
||||
icon: faPencilAlt,
|
||||
icon: 'fas fa-pencil-alt',
|
||||
};
|
||||
}),
|
||||
author: this.$i,
|
||||
@@ -164,7 +162,6 @@ export default defineComponent({
|
||||
hpml: null,
|
||||
script: '',
|
||||
url,
|
||||
faPlus, faICursor, faSave, faStickyNote, faMagic, faCog, faTrashAlt, faExternalLinkSquareAlt, faCode, faCopy
|
||||
};
|
||||
},
|
||||
|
||||
@@ -471,7 +468,7 @@ export default defineComponent({
|
||||
font-weight: bold;
|
||||
box-shadow: 0 1px rgba(#000, 0.07);
|
||||
|
||||
> [data-icon] {
|
||||
> i {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user