summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/static_site_editor/components/publish_toolbar.vue
blob: efb442d4d093f467ffc3c8886b1eed609ef768f6 (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
<script>
import { GlNewButton, GlLoadingIcon } from '@gitlab/ui';

export default {
  components: {
    GlNewButton,
    GlLoadingIcon,
  },
  props: {
    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-between align-items-center py-3 px-4">
    <gl-loading-icon :class="{ invisible: !savingChanges }" size="md" />
    <div>
      <gl-new-button v-if="returnUrl" ref="returnUrlLink" :href="returnUrl">{{
        s__('StaticSiteEditor|Return to site')
      }}</gl-new-button>
      <gl-new-button
        variant="success"
        :disabled="!saveable || savingChanges"
        @click="$emit('submit')"
      >
        {{ __('Submit Changes') }}
      </gl-new-button>
    </div>
  </div>
</template>