Skip to content

Commit 25a4037

Browse files
committed
Properly align all sharing-entry types
SharingEntryLink and regular ShareEntry were not properly visually aligned before this commit. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
1 parent 1f74c88 commit 25a4037

File tree

4 files changed

+56
-47
lines changed

4 files changed

+56
-47
lines changed

apps/files_sharing/src/components/SharingEntry.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ export default {
150150
<style lang="scss" scoped>
151151
.sharing-entry {
152152
display: flex;
153-
justify-content: space-between;
154153
align-items: center;
155154
height: 44px;
156155
&__summary {
@@ -159,13 +158,11 @@ export default {
159158
display: flex;
160159
flex-direction: column;
161160
justify-content: center;
162-
width: 75%;
163-
min-width: 75%;
161+
width: 80%;
162+
min-width: 80%;
164163
165164
&__desc {
166165
display: inline-block;
167-
flex-direction: column;
168-
justify-content: space-between;
169166
padding-bottom: 0;
170167
line-height: 1.2em;
171168
white-space: nowrap;

apps/files_sharing/src/components/SharingEntryInherited.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export default {
102102
flex-direction: column;
103103
justify-content: space-between;
104104
padding: 8px;
105+
padding-left: 10px;
105106
line-height: 1.2em;
106107
p {
107108
color: var(--color-text-maxcontrast);

apps/files_sharing/src/components/SharingEntryLink.vue

Lines changed: 52 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,36 @@
2121
-->
2222

2323
<template>
24-
<li :class="{'sharing-entry--share': share}" class="sharing-entry sharing-entry__link">
24+
<li :class="{ 'sharing-entry--share': share }" class="sharing-entry sharing-entry__link">
2525
<NcAvatar :is-no-user="true"
2626
:icon-class="isEmailShareType ? 'avatar-link-share icon-mail-white' : 'avatar-link-share icon-public-white'"
2727
class="sharing-entry__avatar" />
28-
<div class="sharing-entry__desc" @click.prevent="toggleQuickShareSelect">
29-
<span class="sharing-entry__title" :title="title">
30-
{{ title }}
31-
</span>
32-
<p v-if="subtitle">
33-
{{ subtitle }}
34-
</p>
35-
<QuickShareSelect v-if="share && share.permissions !== undefined"
36-
:share="share"
37-
:file-info="fileInfo"
38-
:toggle="showDropdown"
39-
@open-sharing-details="openShareDetailsForCustomSettings(share)" />
40-
</div>
4128

42-
<!-- clipboard -->
43-
<NcActions v-if="share && !isEmailShareType && share.token"
44-
ref="copyButton"
45-
class="sharing-entry__copy">
46-
<NcActionLink :href="shareLink"
47-
target="_blank"
48-
:title="copyLinkTooltip"
49-
:aria-label="copyLinkTooltip"
50-
:icon="copied && copySuccess ? 'icon-checkmark-color' : 'icon-clippy'"
51-
@click.stop.prevent="copyLink" />
52-
</NcActions>
29+
<div class="sharing-entry__summary">
30+
<div class="sharing-entry__desc" @click.prevent="toggleQuickShareSelect">
31+
<span class="sharing-entry__title" :title="title">
32+
{{ title }}
33+
</span>
34+
<p v-if="subtitle">
35+
{{ subtitle }}
36+
</p>
37+
<QuickShareSelect v-if="share && share.permissions !== undefined"
38+
:share="share"
39+
:file-info="fileInfo"
40+
:toggle="showDropdown"
41+
@open-sharing-details="openShareDetailsForCustomSettings(share)" />
42+
</div>
43+
44+
<!-- clipboard -->
45+
<NcActions v-if="share && !isEmailShareType && share.token" ref="copyButton" class="sharing-entry__copy">
46+
<NcActionLink :href="shareLink"
47+
target="_blank"
48+
:title="copyLinkTooltip"
49+
:aria-label="copyLinkTooltip"
50+
:icon="copied && copySuccess ? 'icon-checkmark-color' : 'icon-clippy'"
51+
@click.stop.prevent="copyLink" />
52+
</NcActions>
53+
</div>
5354

5455
<!-- pending actions -->
5556
<NcActions v-if="!pending && (pendingPassword || pendingEnforcedPassword || pendingExpirationDate)"
@@ -59,9 +60,7 @@
5960
:open.sync="open"
6061
@close="onNewLinkShare">
6162
<!-- pending data menu -->
62-
<NcActionText v-if="errors.pending"
63-
icon="icon-error"
64-
:class="{ error: errors.pending}">
63+
<NcActionText v-if="errors.pending" icon="icon-error" :class="{ error: errors.pending }">
6564
{{ errors.pending }}
6665
</NcActionText>
6766
<NcActionText v-else icon="icon-info">
@@ -128,8 +127,7 @@
128127
@close="onMenuClose">
129128
<template v-if="share">
130129
<template v-if="share.canEdit && canReshare">
131-
<NcActionButton :disabled="saving"
132-
@click.prevent="openSharingDetails">
130+
<NcActionButton :disabled="saving" @click.prevent="openSharingDetails">
133131
<template #icon>
134132
<Tune />
135133
</template>
@@ -148,7 +146,7 @@
148146
:share="share" />
149147

150148
<!-- external legacy sharing via url (social...) -->
151-
<NcActionLink v-for="({icon, url, name}, index) in externalLegacyLinkActions"
149+
<NcActionLink v-for="({ icon, url, name }, index) in externalLegacyLinkActions"
152150
:key="index"
153151
:href="url(shareLink)"
154152
:icon="icon"
@@ -568,7 +566,7 @@ export default {
568566
this.pending = false
569567
component.open = true
570568
571-
// Nothing is enforced, creating share directly
569+
// Nothing is enforced, creating share directly
572570
} else {
573571
const share = new Share(shareDefaults)
574572
await this.pushNewLinkShare(share)
@@ -774,21 +772,33 @@ export default {
774772
align-items: center;
775773
min-height: 44px;
776774
775+
&__summary {
776+
padding: 8px;
777+
padding-left: 10px;
778+
display: flex;
779+
justify-content: space-between;
780+
width: 80%;
781+
min-width: 80%;
782+
777783
&__desc {
778784
display: flex;
779785
flex-direction: column;
780-
justify-content: space-between;
781-
padding: 8px;
782786
line-height: 1.2em;
783787
784788
p {
785789
color: var(--color-text-maxcontrast);
786790
}
787-
}
788-
&__title {
789-
text-overflow: ellipsis;
790-
overflow: hidden;
791-
white-space: nowrap;
791+
792+
&__title {
793+
text-overflow: ellipsis;
794+
overflow: hidden;
795+
white-space: nowrap;
796+
}
797+
}
798+
799+
&__copy {
800+
801+
}
792802
}
793803
794804
&:not(.sharing-entry--share) &__actions {
@@ -816,9 +826,9 @@ export default {
816826
// put menus to the left
817827
// but only the first one
818828
.action-item {
819-
margin-left: auto;
820-
~ .action-item,
821-
~ .sharing-entry__loading {
829+
830+
~.action-item,
831+
~.sharing-entry__loading {
822832
margin-left: 0;
823833
}
824834
}

apps/files_sharing/src/components/SharingEntrySimple.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export default {
8787
min-height: 44px;
8888
&__desc {
8989
padding: 8px;
90+
padding-left: 10px;
9091
line-height: 1.2em;
9192
position: relative;
9293
flex: 1 1;

0 commit comments

Comments
 (0)