Skip to content

Commit

Permalink
Properly align all sharing-entry types
Browse files Browse the repository at this point in the history
SharingEntryLink and regular ShareEntry were not properly visually aligned
before this commit.

Signed-off-by: fenn-cs <[email protected]>
  • Loading branch information
nfebe committed Sep 14, 2023
1 parent 1f74c88 commit 7c4248f
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 54 deletions.
7 changes: 2 additions & 5 deletions apps/files_sharing/src/components/SharingEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ export default {
<style lang="scss" scoped>
.sharing-entry {
display: flex;
justify-content: space-between;
align-items: center;
height: 44px;
&__summary {
Expand All @@ -159,13 +158,11 @@ export default {
display: flex;
flex-direction: column;
justify-content: center;
width: 75%;
min-width: 75%;
width: 80%;
min-width: 80%;

&__desc {
display: inline-block;
flex-direction: column;
justify-content: space-between;
padding-bottom: 0;
line-height: 1.2em;
white-space: nowrap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export default {
flex-direction: column;
justify-content: space-between;
padding: 8px;
padding-left: 10px;
line-height: 1.2em;
p {
color: var(--color-text-maxcontrast);
Expand Down
94 changes: 52 additions & 42 deletions apps/files_sharing/src/components/SharingEntryLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,36 @@
-->

<template>
<li :class="{'sharing-entry--share': share}" class="sharing-entry sharing-entry__link">
<li :class="{ 'sharing-entry--share': share }" class="sharing-entry sharing-entry__link">
<NcAvatar :is-no-user="true"
:icon-class="isEmailShareType ? 'avatar-link-share icon-mail-white' : 'avatar-link-share icon-public-white'"
class="sharing-entry__avatar" />
<div class="sharing-entry__desc" @click.prevent="toggleQuickShareSelect">
<span class="sharing-entry__title" :title="title">
{{ title }}
</span>
<p v-if="subtitle">
{{ subtitle }}
</p>
<QuickShareSelect v-if="share && share.permissions !== undefined"
:share="share"
:file-info="fileInfo"
:toggle="showDropdown"
@open-sharing-details="openShareDetailsForCustomSettings(share)" />
</div>

<!-- clipboard -->
<NcActions v-if="share && !isEmailShareType && share.token"
ref="copyButton"
class="sharing-entry__copy">
<NcActionLink :href="shareLink"
target="_blank"
:title="copyLinkTooltip"
:aria-label="copyLinkTooltip"
:icon="copied && copySuccess ? 'icon-checkmark-color' : 'icon-clippy'"
@click.stop.prevent="copyLink" />
</NcActions>
<div class="sharing-entry__summary">
<div class="sharing-entry__desc" @click.prevent="toggleQuickShareSelect">
<span class="sharing-entry__title" :title="title">
{{ title }}
</span>
<p v-if="subtitle">
{{ subtitle }}
</p>
<QuickShareSelect v-if="share && share.permissions !== undefined"
:share="share"
:file-info="fileInfo"
:toggle="showDropdown"
@open-sharing-details="openShareDetailsForCustomSettings(share)" />
</div>

<!-- clipboard -->
<NcActions v-if="share && !isEmailShareType && share.token" ref="copyButton" class="sharing-entry__copy">
<NcActionLink :href="shareLink"
target="_blank"
:title="copyLinkTooltip"
:aria-label="copyLinkTooltip"
:icon="copied && copySuccess ? 'icon-checkmark-color' : 'icon-clippy'"
@click.stop.prevent="copyLink" />
</NcActions>
</div>

<!-- pending actions -->
<NcActions v-if="!pending && (pendingPassword || pendingEnforcedPassword || pendingExpirationDate)"
Expand All @@ -59,9 +60,7 @@
:open.sync="open"
@close="onNewLinkShare">
<!-- pending data menu -->
<NcActionText v-if="errors.pending"
icon="icon-error"
:class="{ error: errors.pending}">
<NcActionText v-if="errors.pending" icon="icon-error" :class="{ error: errors.pending }">
{{ errors.pending }}
</NcActionText>
<NcActionText v-else icon="icon-info">
Expand Down Expand Up @@ -128,8 +127,7 @@
@close="onMenuClose">
<template v-if="share">
<template v-if="share.canEdit && canReshare">
<NcActionButton :disabled="saving"
@click.prevent="openSharingDetails">
<NcActionButton :disabled="saving" @click.prevent="openSharingDetails">
<template #icon>
<Tune />
</template>
Expand All @@ -148,7 +146,7 @@
:share="share" />

<!-- external legacy sharing via url (social...) -->
<NcActionLink v-for="({icon, url, name}, index) in externalLegacyLinkActions"
<NcActionLink v-for="({ icon, url, name }, index) in externalLegacyLinkActions"
:key="index"
:href="url(shareLink)"
:icon="icon"
Expand Down Expand Up @@ -568,7 +566,7 @@ export default {
this.pending = false
component.open = true

// Nothing is enforced, creating share directly
// Nothing is enforced, creating share directly
} else {
const share = new Share(shareDefaults)
await this.pushNewLinkShare(share)
Expand Down Expand Up @@ -774,21 +772,33 @@ export default {
align-items: center;
min-height: 44px;

&__summary {
padding: 8px;
padding-left: 10px;
display: flex;
justify-content: space-between;
width: 80%;
min-width: 80%;

&__desc {
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 8px;
line-height: 1.2em;

p {
color: var(--color-text-maxcontrast);
}
}
&__title {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;

&__title {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}

&__copy {

}
}

&:not(.sharing-entry--share) &__actions {
Expand Down Expand Up @@ -816,9 +826,9 @@ export default {
// put menus to the left
// but only the first one
.action-item {
margin-left: auto;
~ .action-item,
~ .sharing-entry__loading {

~.action-item,
~.sharing-entry__loading {
margin-left: 0;
}
}
Expand Down
1 change: 1 addition & 0 deletions apps/files_sharing/src/components/SharingEntrySimple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export default {
min-height: 44px;
&__desc {
padding: 8px;
padding-left: 10px;
line-height: 1.2em;
position: relative;
flex: 1 1;
Expand Down
3 changes: 0 additions & 3 deletions dist/1012-1012.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/1012-1012.js.map

This file was deleted.

3 changes: 3 additions & 0 deletions dist/9794-9794.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/9794-9794.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

0 comments on commit 7c4248f

Please sign in to comment.