summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/static_site_editor/components/publish_toolbar.vue
blob: 2d62964cb3be9a78e46045dd6956bf29b15e8ef7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<script>
import { GlButton } from '@gitlab/ui';

export default {
  components: {
    GlButton,
  },
  props: {
    hasSettings: {
      type: Boolean,
      required: false,
      default: false,
    },
    returnUrl: {
      type: String,
      required: false,
      default: '',
    },
    saveable: {
      type: Boolean,
      required: false,
      default: false,
    },
    savingChanges: {
      type: Boolean,
      required: false,
      default: false,
    },
  },
};
</script>
<template>
  <div class="d-flex bg-light border-top justify-content-end align-items-center py-3 px-4">
    <div>
      <gl-button v-if="returnUrl" ref="returnUrlLink" :href="returnUrl">{{
        s__('StaticSiteEditor|Return to site')
      }}</gl-button>
      <gl-button
        v-if="hasSettings"
        ref="settings"
        :disabled="savingChanges"
        @click="$emit('editSettings')"
      >
        {{ __('Settings') }}
      </gl-button>
      <gl-button
        ref="submit"
        variant="success"
        :disabled="!saveable"
        :loading="savingChanges"
        @click="$emit('submit')"
      >
        {{ __('Submit changes') }}
      </gl-button>
    </div>
  </div>
</template>