Fix: fix share link archive version detection (#8551)

This commit is contained in:
shamoon 2024-12-24 23:11:03 -08:00 committed by GitHub
parent 8291ec17d4
commit 93f2ef45f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 7 deletions

View File

@ -5680,7 +5680,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts</context>
<context context-type="linenumber">94</context>
<context context-type="linenumber">102</context>
</context-group>
</trans-unit>
<trans-unit id="8542568275115626925" datatype="html">
@ -5708,28 +5708,28 @@
<source>Error retrieving links</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts</context>
<context context-type="linenumber">75</context>
<context context-type="linenumber">83</context>
</context-group>
</trans-unit>
<trans-unit id="3242255798983858463" datatype="html">
<source><x id="PH" equiv-text="days"/> days</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts</context>
<context context-type="linenumber">94</context>
<context context-type="linenumber">102</context>
</context-group>
</trans-unit>
<trans-unit id="2897042887615940599" datatype="html">
<source>Error deleting link</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts</context>
<context context-type="linenumber">123</context>
<context context-type="linenumber">131</context>
</context-group>
</trans-unit>
<trans-unit id="8400747326190565173" datatype="html">
<source>Error creating link</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts</context>
<context context-type="linenumber">151</context>
<context context-type="linenumber">159</context>
</context-group>
</trans-unit>
<trans-unit id="9180110319941008393" datatype="html">

View File

@ -35,8 +35,17 @@ export class ShareLinksDropdownComponent implements OnInit {
@Input()
disabled: boolean = false
private _hasArchiveVersion: boolean = true
@Input()
hasArchiveVersion: boolean = true
set hasArchiveVersion(value: boolean) {
this._hasArchiveVersion = value
this.useArchiveVersion = value
}
get hasArchiveVersion(): boolean {
return this._hasArchiveVersion
}
shareLinks: ShareLink[]
@ -56,7 +65,6 @@ export class ShareLinksDropdownComponent implements OnInit {
ngOnInit(): void {
if (this._documentId !== undefined) this.refresh()
this.useArchiveVersion = this.hasArchiveVersion
}
refresh() {