summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-10-12 01:04:50 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-10-12 01:04:50 +0900
commit36170c816acd7cb905c34059f66ea4b3fd2e416b (patch)
tree223381f1876405193928f8789035d070d0bf080a /src
parentchore: fix bug (diff)
downloadsharkey-36170c816acd7cb905c34059f66ea4b3fd2e416b.tar.gz
sharkey-36170c816acd7cb905c34059f66ea4b3fd2e416b.tar.bz2
sharkey-36170c816acd7cb905c34059f66ea4b3fd2e416b.zip
tweak ui
Diffstat (limited to 'src')
-rw-r--r--src/client/components/ui/button.vue19
-rw-r--r--src/client/pages/page-editor/page-editor.vue25
2 files changed, 30 insertions, 14 deletions
diff --git a/src/client/components/ui/button.vue b/src/client/components/ui/button.vue
index 53b973fe55..e74c4f550b 100644
--- a/src/client/components/ui/button.vue
+++ b/src/client/components/ui/button.vue
@@ -1,6 +1,5 @@
<template>
-<component class="bghgjjyj _button"
- :is="link ? 'MkA' : 'button'"
+<button v-if="!link" class="bghgjjyj _button"
:class="{ inline, primary, danger, rounded, full }"
:type="type"
@click="$emit('click', $event)"
@@ -10,7 +9,17 @@
<div class="content">
<slot></slot>
</div>
-</component>
+</button>
+<MkA v-else class="bghgjjyj _button"
+ :class="{ inline, primary, danger, rounded, full }"
+ :to="to"
+ @mousedown="onMousedown"
+>
+ <div ref="ripples" class="ripples"></div>
+ <div class="content">
+ <slot></slot>
+ </div>
+</MkA>
</template>
<script lang="ts">
@@ -42,6 +51,10 @@ export default defineComponent({
required: false,
default: false
},
+ to: {
+ type: String,
+ required: false
+ },
autofocus: {
type: Boolean,
required: false,
diff --git a/src/client/pages/page-editor/page-editor.vue b/src/client/pages/page-editor/page-editor.vue
index fc05bb27b3..e04039e634 100644
--- a/src/client/pages/page-editor/page-editor.vue
+++ b/src/client/pages/page-editor/page-editor.vue
@@ -3,12 +3,11 @@
<MkHeader :info="header"/>
<div class="_root">
- <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"><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 class="jqqmcavi" style="margin: 16px;">
+ <MkButton v-if="pageId" class="button" inline link :to="`/@${ author.username }/pages/${ currentName }`"><i class="fas fa-external-link-square-alt"></i> {{ $ts._pages.viewPage }}</MkButton>
+ <MkButton inline @click="save" primary class="button" v-if="!readonly"><i class="fas fa-save"></i> {{ $ts.save }}</MkButton>
+ <MkButton inline @click="duplicate" class="button" v-if="pageId"><i class="fas fa-copy"></i> {{ $ts.duplicate }}</MkButton>
+ <MkButton inline @click="del" class="button" v-if="pageId && !readonly" danger><i class="fas fa-trash-alt"></i> {{ $ts.delete }}</MkButton>
</div>
<div v-if="tab === 'settings'">
@@ -492,6 +491,14 @@ export default defineComponent({
</script>
<style lang="scss" scoped>
+.jqqmcavi {
+ > .button {
+ & + .button {
+ margin-left: 8px;
+ }
+ }
+}
+
.gwbmwxkm {
position: relative;
@@ -559,11 +566,7 @@ export default defineComponent({
}
.qmuvgica {
- padding: 32px;
-
- @media (max-width: 500px) {
- padding: 16px;
- }
+ padding: 16px;
> .variables {
margin-bottom: 16px;