Skip to content

Commit 1bae166

Browse files
committed
menu options for images
1 parent d967a73 commit 1bae166

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

electron_app/src/components/History.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<div v-for="img in history_box.imgs" :key="img" class="history_box">
2525

26-
<ImageItem :path="img" :style_obj="{height:'100%'}"></ImageItem>
26+
<ImageItem :hide_extra_save_button="true" :path="img" :style_obj="{height:'100%'}"></ImageItem>
2727

2828
</div>
2929
<div style="clear: both; display: table; margin-bottom: 10px;">

electron_app/src/components/ImageItem.vue

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
11
<template>
2-
<div style="height:100%">
3-
<img @click="open_image_popup( path )" class="gal_img" :src="'file://' + path " v-bind:style="style_obj">
2+
<div style="height:100%" v-bind:style="style_obj">
3+
4+
<div style=" position:absolute ; margin-top:7px ; margin-left:7px " class="">
5+
<b-dropdown left variant="link" size="sm" toggle-class="text-decoration-none" no-caret>
6+
<template #button-content>
7+
<div class=" l_button button_colored" style="background-color: rgba(0,0,0,0.6);">
8+
<font-awesome-icon icon="bars" />
9+
</div>
10+
</template>
11+
<b-dropdown-item-button @click="save_image(path)" >Save Image</b-dropdown-item-button>
12+
<b-dropdown-item-button >Upscale Image</b-dropdown-item-button>
13+
<b-dropdown-item-button >Send to Img2Img</b-dropdown-item-button>
14+
15+
16+
</b-dropdown>
17+
</div>
18+
19+
20+
<img @click="open_image_popup( path )" class="gal_img" :src="'file://' + path " style="max-height: 100% ; max-width: 100%;" >
421
<br>
5-
<div @click="save_image(path)" class="l_button">Save Image</div>
22+
<div v-if="!hide_extra_save_button" @click="save_image(path)" class="l_button">Save Image</div>
623
</div>
724
</template>
825
<script>
@@ -13,7 +30,8 @@ export default {
1330
name: 'ImageItem',
1431
props: {
1532
path : String,
16-
style_obj:String
33+
style_obj:String,
34+
hide_extra_save_button : Boolean,
1735
},
1836
components: {},
1937
mounted() {

electron_app/src/components/ImgGenerate.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
<div v-if="generated_images.length == 1" >
138138
<center>
139139

140-
<ImageItem :path="generated_images[0]" :style_obj="{ 'height': 'calc(100vh - 380px )' , 'margin-top': '60px' }"></ImageItem>
140+
<ImageItem :path="generated_images[0]" :style_obj="{ 'width': 'calc(100vh - 380px )' , 'margin-top': '60px' }"></ImageItem>
141141

142142
</center>
143143
</div>

0 commit comments

Comments
 (0)