feat: ui, adds full/thumb buttons to assets (#3928)
This commit is contained in:
@@ -1108,82 +1108,130 @@
|
|||||||
<q-separator></q-separator>
|
<q-separator></q-separator>
|
||||||
|
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<q-btn-dropdown
|
<div
|
||||||
color="grey"
|
class="row items-center no-wrap q-col-gutter-sm"
|
||||||
dense
|
|
||||||
outline
|
|
||||||
no-caps
|
|
||||||
:label="props.row.name"
|
|
||||||
:icon="props.row.is_public ? 'public' : ''"
|
|
||||||
>
|
>
|
||||||
<q-list>
|
<div class="col">
|
||||||
<q-item
|
<q-btn-dropdown
|
||||||
clickable
|
color="grey"
|
||||||
v-close-popup
|
dense
|
||||||
@click="copyAssetLinkToClipboard(props.row)"
|
outline
|
||||||
|
no-caps
|
||||||
|
class="full-width"
|
||||||
|
:label="props.row.name"
|
||||||
|
:icon="props.row.is_public ? 'public' : ''"
|
||||||
>
|
>
|
||||||
<q-item-section avatar>
|
<q-list>
|
||||||
<q-avatar icon="content_copy" />
|
<q-item
|
||||||
</q-item-section>
|
clickable
|
||||||
<q-item-section>
|
v-close-popup
|
||||||
<q-item-label>Copy Link</q-item-label>
|
@click="
|
||||||
<q-item-label caption
|
copyAssetLinkToClipboard(props.row)
|
||||||
>Copy asset link to
|
|
||||||
clipboard</q-item-label
|
|
||||||
>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
|
|
||||||
<q-item
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="toggleAssetPublicAccess(props.row)"
|
|
||||||
>
|
|
||||||
<q-item-section avatar>
|
|
||||||
<q-avatar
|
|
||||||
:icon="
|
|
||||||
props.row.is_public
|
|
||||||
? 'public_off'
|
|
||||||
: 'public'
|
|
||||||
"
|
"
|
||||||
text-color="primary"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section v-if="props.row.is_public">
|
|
||||||
<q-item-label>Unpublish</q-item-label>
|
|
||||||
<q-item-label caption
|
|
||||||
>Make this asset private</q-item-label
|
|
||||||
>
|
>
|
||||||
</q-item-section>
|
<q-item-section avatar>
|
||||||
<q-item-section v-else>
|
<q-avatar icon="content_copy" />
|
||||||
<q-item-label>Publish</q-item-label>
|
</q-item-section>
|
||||||
<q-item-label caption
|
<q-item-section>
|
||||||
>Make this asset public</q-item-label
|
<q-item-label>Copy Link</q-item-label>
|
||||||
>
|
<q-item-label caption
|
||||||
</q-item-section>
|
>Copy asset link to
|
||||||
</q-item>
|
clipboard</q-item-label
|
||||||
|
>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="deleteAsset(props.row)"
|
@click="
|
||||||
>
|
toggleAssetPublicAccess(props.row)
|
||||||
<q-item-section avatar>
|
"
|
||||||
<q-avatar
|
|
||||||
icon="delete"
|
|
||||||
text-color="negative"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section>
|
|
||||||
<q-item-label>Delete</q-item-label>
|
|
||||||
<q-item-label caption
|
|
||||||
>Permanently delete this
|
|
||||||
asset</q-item-label
|
|
||||||
>
|
>
|
||||||
</q-item-section>
|
<q-item-section avatar>
|
||||||
</q-item>
|
<q-avatar
|
||||||
</q-list>
|
:icon="
|
||||||
</q-btn-dropdown>
|
props.row.is_public
|
||||||
|
? 'public_off'
|
||||||
|
: 'public'
|
||||||
|
"
|
||||||
|
text-color="primary"
|
||||||
|
/>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section
|
||||||
|
v-if="props.row.is_public"
|
||||||
|
>
|
||||||
|
<q-item-label>Unpublish</q-item-label>
|
||||||
|
<q-item-label caption
|
||||||
|
>Make this asset
|
||||||
|
private</q-item-label
|
||||||
|
>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section v-else>
|
||||||
|
<q-item-label>Publish</q-item-label>
|
||||||
|
<q-item-label caption
|
||||||
|
>Make this asset
|
||||||
|
public</q-item-label
|
||||||
|
>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
|
||||||
|
<q-item
|
||||||
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click="deleteAsset(props.row)"
|
||||||
|
>
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-avatar
|
||||||
|
icon="delete"
|
||||||
|
text-color="negative"
|
||||||
|
/>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label>Delete</q-item-label>
|
||||||
|
<q-item-label caption
|
||||||
|
>Permanently delete this
|
||||||
|
asset</q-item-label
|
||||||
|
>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
|
</q-btn-dropdown>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<q-btn
|
||||||
|
type="a"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
color="primary"
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
icon="image"
|
||||||
|
:href="`/api/v1/assets/${props.row.id}/data`"
|
||||||
|
>
|
||||||
|
<q-tooltip>Full image</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="col-auto"
|
||||||
|
v-if="props.row.thumbnail_base64"
|
||||||
|
>
|
||||||
|
<q-btn
|
||||||
|
type="a"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
color="secondary"
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
icon="photo_size_select_small"
|
||||||
|
:href="`/api/v1/assets/${props.row.id}/thumbnail`"
|
||||||
|
>
|
||||||
|
<q-tooltip>Thumbnail</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user