зеркало из https://github.com/nextcloud/server.git
Revert "Copy to clipboard with button instead of link"
This reverts commit 4ffc022c8b
.
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Родитель
8a1a32fb09
Коммит
fb2fb0d2d5
|
@ -9,14 +9,13 @@
|
||||||
<div class="avatar-external icon-external-white" />
|
<div class="avatar-external icon-external-white" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<NcActionButton :aria-label="t('files_sharing', 'Copy internal link to clipboard')"
|
<NcActionLink :href="internalLink"
|
||||||
|
:aria-label="t('files_sharing', 'Copy internal link to clipboard')"
|
||||||
|
target="_blank"
|
||||||
|
:icon="copied && copySuccess ? 'icon-checkmark-color' : 'icon-clippy'"
|
||||||
@click.prevent="copyLink">
|
@click.prevent="copyLink">
|
||||||
<template #icon>
|
|
||||||
<Check v-if="copied && copySuccess" :size="20" />
|
|
||||||
<ClipboardTextMultipleOutline v-else :size="20" />
|
|
||||||
</template>
|
|
||||||
{{ clipboardTooltip }}
|
{{ clipboardTooltip }}
|
||||||
</NcActionButton>
|
</NcActionLink>
|
||||||
</SharingEntrySimple>
|
</SharingEntrySimple>
|
||||||
</ul>
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
|
@ -24,19 +23,14 @@
|
||||||
<script>
|
<script>
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
import { showSuccess } from '@nextcloud/dialogs'
|
import { showSuccess } from '@nextcloud/dialogs'
|
||||||
import { NcActionButton } from '@nextcloud/vue'
|
import NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink'
|
||||||
import SharingEntrySimple from './SharingEntrySimple'
|
import SharingEntrySimple from './SharingEntrySimple'
|
||||||
|
|
||||||
import Check from 'vue-material-design-icons/Check.vue'
|
|
||||||
import ClipboardTextMultipleOutline from 'vue-material-design-icons/ClipboardTextMultipleOutline.vue'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SharingEntryInternal',
|
name: 'SharingEntryInternal',
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Check,
|
NcActionLink,
|
||||||
ClipboardTextMultipleOutline,
|
|
||||||
NcActionButton,
|
|
||||||
SharingEntrySimple,
|
SharingEntrySimple,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -38,14 +38,13 @@
|
||||||
<NcActions v-if="share && !isEmailShareType && share.token"
|
<NcActions v-if="share && !isEmailShareType && share.token"
|
||||||
ref="copyButton"
|
ref="copyButton"
|
||||||
class="sharing-entry__copy">
|
class="sharing-entry__copy">
|
||||||
<NcActionButton :aria-label="t('files_sharing', 'Copy public link to clipboard')"
|
<NcActionLink :href="shareLink"
|
||||||
|
target="_blank"
|
||||||
|
:aria-label="t('files_sharing', 'Copy public link to clipboard')"
|
||||||
|
:icon="copied && copySuccess ? 'icon-checkmark-color' : 'icon-clippy'"
|
||||||
@click.stop.prevent="copyLink">
|
@click.stop.prevent="copyLink">
|
||||||
<template #icon>
|
|
||||||
<Check v-if="copied && copySuccess" :size="20" />
|
|
||||||
<ClipboardTextMultipleOutline v-else :size="20" />
|
|
||||||
</template>
|
|
||||||
{{ clipboardTooltip }}
|
{{ clipboardTooltip }}
|
||||||
</NcActionButton>
|
</NcActionLink>
|
||||||
</NcActions>
|
</NcActions>
|
||||||
|
|
||||||
<!-- pending actions -->
|
<!-- pending actions -->
|
||||||
|
@ -304,18 +303,16 @@ import { showError, showSuccess } from '@nextcloud/dialogs'
|
||||||
import { Type as ShareTypes } from '@nextcloud/sharing'
|
import { Type as ShareTypes } from '@nextcloud/sharing'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
|
||||||
import {
|
import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton'
|
||||||
NcActionButton,
|
import NcActionCheckbox from '@nextcloud/vue/dist/Components/NcActionCheckbox'
|
||||||
NcActionCheckbox,
|
import NcActionInput from '@nextcloud/vue/dist/Components/NcActionInput'
|
||||||
NcActionInput,
|
import NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink'
|
||||||
NcActionLink,
|
import NcActionText from '@nextcloud/vue/dist/Components/NcActionText'
|
||||||
NcActions,
|
import NcActionSeparator from '@nextcloud/vue/dist/Components/NcActionSeparator'
|
||||||
NcActionSeparator,
|
import NcActionTextEditable from '@nextcloud/vue/dist/Components/NcActionTextEditable'
|
||||||
NcActionText,
|
import NcActions from '@nextcloud/vue/dist/Components/NcActions'
|
||||||
NcActionTextEditable,
|
import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar'
|
||||||
NcAvatar,
|
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'
|
||||||
Tooltip,
|
|
||||||
} from '@nextcloud/vue'
|
|
||||||
|
|
||||||
import ExternalShareAction from './ExternalShareAction.vue'
|
import ExternalShareAction from './ExternalShareAction.vue'
|
||||||
import SharePermissionsEditor from './SharePermissionsEditor.vue'
|
import SharePermissionsEditor from './SharePermissionsEditor.vue'
|
||||||
|
@ -323,25 +320,20 @@ import GeneratePassword from '../utils/GeneratePassword.js'
|
||||||
import Share from '../models/Share.js'
|
import Share from '../models/Share.js'
|
||||||
import SharesMixin from '../mixins/SharesMixin.js'
|
import SharesMixin from '../mixins/SharesMixin.js'
|
||||||
|
|
||||||
import Check from 'vue-material-design-icons/Check.vue'
|
|
||||||
import ClipboardTextMultipleOutline from 'vue-material-design-icons/ClipboardTextMultipleOutline.vue'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SharingEntryLink',
|
name: 'SharingEntryLink',
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Check,
|
NcActions,
|
||||||
ClipboardTextMultipleOutline,
|
|
||||||
ExternalShareAction,
|
|
||||||
NcActionButton,
|
NcActionButton,
|
||||||
NcActionCheckbox,
|
NcActionCheckbox,
|
||||||
NcActionInput,
|
NcActionInput,
|
||||||
NcActionLink,
|
NcActionLink,
|
||||||
NcActions,
|
|
||||||
NcActionSeparator,
|
|
||||||
NcActionText,
|
NcActionText,
|
||||||
NcActionTextEditable,
|
NcActionTextEditable,
|
||||||
|
NcActionSeparator,
|
||||||
NcAvatar,
|
NcAvatar,
|
||||||
|
ExternalShareAction,
|
||||||
SharePermissionsEditor,
|
SharePermissionsEditor,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -206,7 +206,7 @@ class FilesAppSharingContext implements Context, ActorAwareInterface {
|
||||||
* @return Locator
|
* @return Locator
|
||||||
*/
|
*/
|
||||||
public static function copyLinkButton() {
|
public static function copyLinkButton() {
|
||||||
return Locator::forThe()->css("button.sharing-entry__copy")->
|
return Locator::forThe()->css("a.sharing-entry__copy")->
|
||||||
descendantOf(self::shareLinkRow())->
|
descendantOf(self::shareLinkRow())->
|
||||||
describedAs("Copy link button in the details view in Files app");
|
describedAs("Copy link button in the details view in Files app");
|
||||||
}
|
}
|
||||||
|
@ -391,7 +391,7 @@ class FilesAppSharingContext implements Context, ActorAwareInterface {
|
||||||
// Clicking on the menu item copies the link to the clipboard, but it is
|
// Clicking on the menu item copies the link to the clipboard, but it is
|
||||||
// not possible to access that value from the acceptance tests. Due to
|
// not possible to access that value from the acceptance tests. Due to
|
||||||
// this the value of the attribute that holds the URL is used instead.
|
// this the value of the attribute that holds the URL is used instead.
|
||||||
$this->actor->getSharedNotebook()["shared link"] = $this->actor->getSession()->evaluateScript("return document.querySelector('.sharing-entry__link').__vue__.shareLink;");
|
$this->actor->getSharedNotebook()["shared link"] = $this->actor->find(self::copyLinkButton(), 2)->getWrappedElement()->getAttribute("href");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Загрузка…
Ссылка в новой задаче