summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-10-03 00:33:29 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-10-03 00:33:29 +0900
commitdcd216daff36a62d283963e10f8ec337a7e4c111 (patch)
tree96331eaefe7dc63731662a24d8234b6462dc086f /src
parentMerge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff)
downloadsharkey-dcd216daff36a62d283963e10f8ec337a7e4c111.tar.gz
sharkey-dcd216daff36a62d283963e10f8ec337a7e4c111.tar.bz2
sharkey-dcd216daff36a62d283963e10f8ec337a7e4c111.zip
:art:
Diffstat (limited to 'src')
-rw-r--r--src/client/pages/instance/index.vue6
-rw-r--r--src/client/pages/page-editor/page-editor.vue56
2 files changed, 39 insertions, 23 deletions
diff --git a/src/client/pages/instance/index.vue b/src/client/pages/instance/index.vue
index 780dd099b6..867031eaf2 100644
--- a/src/client/pages/instance/index.vue
+++ b/src/client/pages/instance/index.vue
@@ -2,10 +2,8 @@
<div class="hiyeyicy" :class="{ wide: !narrow }" ref="el">
<div class="nav" v-if="!narrow || page == null">
<div class="group">
- <div class="_debobigegoItem">
- <div class="_debobigegoPanel lxpfedzu">
- <img :src="$instance.iconUrl || '/favicon.ico'" alt="" class="icon"/>
- </div>
+ <div class="lxpfedzu">
+ <img :src="$instance.iconUrl || '/favicon.ico'" alt="" class="icon"/>
</div>
<XLink :active="page === 'overview'" replace to="/instance/overview"><template #icon><i class="fas fa-tachometer-alt"></i></template>{{ $ts.overview }}</XLink>
</div>
diff --git a/src/client/pages/page-editor/page-editor.vue b/src/client/pages/page-editor/page-editor.vue
index 74cfd29dae..0daefc6518 100644
--- a/src/client/pages/page-editor/page-editor.vue
+++ b/src/client/pages/page-editor/page-editor.vue
@@ -8,31 +8,30 @@
<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><i class="fas fa-cog"></i> {{ $ts._pages.pageSetting }}</template>
- <div style="padding: 16px;">
- <MkInput v-model="title">
+ <div v-if="tab === 'settings'">
+ <div style="padding: 16px;" class="_formRoot">
+ <MkInput v-model="title" class="_formBlock">
<template #label>{{ $ts._pages.title }}</template>
</MkInput>
- <MkInput v-model="summary">
+ <MkInput v-model="summary" class="_formBlock">
<template #label>{{ $ts._pages.summary }}</template>
</MkInput>
- <MkInput v-model="name">
+ <MkInput v-model="name" class="_formBlock">
<template #prefix>{{ url }}/@{{ author.username }}/pages/</template>
<template #label>{{ $ts._pages.url }}</template>
</MkInput>
- <MkSwitch v-model="alignCenter">{{ $ts._pages.alignCenter }}</MkSwitch>
+ <MkSwitch v-model="alignCenter" class="_formBlock">{{ $ts._pages.alignCenter }}</MkSwitch>
- <MkSelect v-model="font">
+ <MkSelect v-model="font" class="_formBlock">
<template #label>{{ $ts._pages.font }}</template>
<option value="serif">{{ $ts._pages.fontSerif }}</option>
<option value="sans-serif">{{ $ts._pages.fontSansSerif }}</option>
</MkSelect>
- <MkSwitch v-model="hideTitleWhenPinned">{{ $ts._pages.hideTitleWhenPinned }}</MkSwitch>
+ <MkSwitch v-model="hideTitleWhenPinned" class="_formBlock">{{ $ts._pages.hideTitleWhenPinned }}</MkSwitch>
<div class="eyeCatch">
<MkButton v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage"><i class="fas fa-plus"></i> {{ $ts._pages.eyeCatchingImageSet }}</MkButton>
@@ -42,19 +41,17 @@
</div>
</div>
</div>
- </MkContainer>
+ </div>
- <MkContainer :foldable="true" :expanded="true" class="_gap">
- <template #header><i class="fas fa-sticky-note"></i> {{ $ts._pages.contents }}</template>
+ <div v-else-if="tab === 'contents'">
<div style="padding: 16px;">
<XBlocks class="content" v-model="content" :hpml="hpml"/>
<MkButton @click="add()" v-if="!readonly"><i class="fas fa-plus"></i></MkButton>
</div>
- </MkContainer>
+ </div>
- <MkContainer :foldable="true" class="_gap">
- <template #header><i class="fas fa-magic"></i> {{ $ts._pages.variables }}</template>
+ <div v-else-if="tab === 'variables'">
<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}">
@@ -72,14 +69,13 @@
<MkButton @click="addVariable()" class="add" v-if="!readonly"><i class="fas fa-plus"></i></MkButton>
</div>
- </MkContainer>
+ </div>
- <MkContainer :foldable="true" :expanded="true" class="_gap">
- <template #header><i class="fas fa-code"></i> {{ $ts.script }}</template>
+ <div v-else-if="tab === 'script'">
<div>
<MkTextarea class="_code" v-model="script"/>
</div>
- </MkContainer>
+ </div>
</div>
</template>
@@ -143,8 +139,30 @@ export default defineComponent({
title: title,
icon: 'fas fa-pencil-alt',
bg: 'var(--bg)',
+ tabs: [{
+ active: this.tab === 'settings',
+ title: this.$ts._pages.pageSetting,
+ icon: 'fas fa-cog',
+ onClick: () => { this.tab = 'settings'; },
+ }, {
+ active: this.tab === 'contents',
+ title: this.$ts._pages.contents,
+ icon: 'fas fa-sticky-note',
+ onClick: () => { this.tab = 'contents'; },
+ }, {
+ active: this.tab === 'variables',
+ title: this.$ts._pages.variables,
+ icon: 'fas fa-magic',
+ onClick: () => { this.tab = 'variables'; },
+ }, {
+ active: this.tab === 'script',
+ title: this.$ts.script,
+ icon: 'fas fa-code',
+ onClick: () => { this.tab = 'script'; },
+ }]
};
}),
+ tab: 'settings',
author: this.$i,
readonly: false,
page: null,