diff --git a/css/icons.scss b/css/icons.scss
index 2ecbc647b..c141d727e 100644
--- a/css/icons.scss
+++ b/css/icons.scss
@@ -37,8 +37,8 @@
@include icon-color('checkmark', 'actions', $color-success, 1, true);
}
-.icon-clippy-primary {
- @include icon-color('clippy', 'actions', $color-primary-text, 1, true);
+.icon-share-primary {
+ @include icon-color('share', 'actions', $color-primary-text, 1, true);
}
.icon-comment-yes {
diff --git a/src/Forms.vue b/src/Forms.vue
index fb5c34d77..8af297619 100644
--- a/src/Forms.vue
+++ b/src/Forms.vue
@@ -32,6 +32,7 @@
:key="form.id"
:form="form"
:read-only="false"
+ @open-sharing="openSharing"
@mobile-close-navigation="mobileCloseNavigation"
@clone="onCloneForm"
@delete="onDeleteForm" />
@@ -73,10 +74,12 @@
+ :sidebar-opened.sync="sidebarOpened"
+ @open-sharing="openSharing" />
@@ -119,6 +122,7 @@ export default {
return {
loading: true,
sidebarOpened: true,
+ sidebarActive: 'forms-sharing',
forms: [],
sharedForms: [],
}
@@ -189,6 +193,19 @@ export default {
}
},
+ /**
+ * Open a form and its sidebar for sharing
+ *
+ * @param {string} hash the hash of the form to load
+ */
+ openSharing(hash) {
+ if (hash !== this.routeHash || this.$route.name !== 'edit') {
+ this.$router.push({ name: 'edit', params: { hash } })
+ }
+ this.sidebarActive = 'forms-sharing'
+ this.sidebarOpened = true
+ },
+
/**
* Initial forms load
*/
diff --git a/src/components/AppNavigationForm.vue b/src/components/AppNavigationForm.vue
index 24e80e678..bb9300767 100644
--- a/src/components/AppNavigationForm.vue
+++ b/src/components/AppNavigationForm.vue
@@ -30,12 +30,9 @@
}"
@click="mobileCloseNavigation">
-
- {{ clipboardTooltip }}
-
+
+ {{ t('forms', 'Share form') }}
+