<commit_before>import { Component, OnInit, Input } from '@angular/core';
import { ImageObject } from './imageObject.class';
import { ClipboardService } from './clipboard.service';
import { ElectronWindowService } from './electronWindow.service';

@Component({
    moduleId: module.id,
    selector: 'image-display',
    template: `
    <div class="image-container" [style.height.px]="image.imageSizes.smallSize.height">
        <div class="info">
            {{ image.fullSizedImageFileSize }}
        </div>
        <div class="action-items">
            <button (click)="copyUrl()" title="Click to copy the Url">Copy</button>
        </div>
        <img (click)="openWindow()" [src]="image.displayUrl">
    </div>
    `,
    styles: [
        `
        .image-container {
            display: flex;
            position: relative;
        }
        .action-items {
            position: absolute;
            bottom: 0;
            right: 0;
            z-index: 10;
        }
        .info {
            position: absolute;
            bottom: 0;
            left: 0;
            height: 22px;
            line-height: 20px;
            font-size: 20px;
            background-color: white;
            text-align: center;
            font-family: "Helvetica Neue";
            opacity: 0.6;
            padding: 0 5px;
            z-index: 10;

        }
        img {
            width: 200px;
            display: block;
            z-index: 9;
        }
        button {
            height: 40px;
            line-height: 40px;
            opacity: 0.6;
        }
        `
    ]
})
export class ImageDisplayComponent implements OnInit {

    @Input() image: ImageObject;

    constructor(private clipboardService: ClipboardService, private electronWindowService: ElectronWindowService) { }

    ngOnInit() { }

    copyUrl() {
        this.clipboardService.writeText(`${this.image.fullSizedImageUrl} #gifbar`);<commit_msg>Closes window after clicking copy.<commit_after>import { Component, OnInit, Input } from '@angular/core';
import { ImageObject } from './imageObject.class';
import { ClipboardService } from './clipboard.service';
import { ElectronWindowService } from './electronWindow.service';

@Component({
    moduleId: module.id,
    selector: 'image-display',
    template: `
    <div class="image-container" [style.height.px]="image.imageSizes.smallSize.height">
        <div class="info">
            {{ image.fullSizedImageFileSize }}
        </div>
        <div class="action-items">
            <button (click)="copyUrl()" title="Click to copy the Url">Copy</button>
        </div>
        <img (click)="openWindow()" [src]="image.displayUrl">
    </div>
    `,
    styles: [
        `
        .image-container {
            display: flex;
            position: relative;
        }
        .action-items {
            position: absolute;
            bottom: 0;
            right: 0;
            z-index: 10;
        }
        .info {
            position: absolute;
            bottom: 0;
            left: 0;
            height: 22px;
            line-height: 20px;
            font-size: 20px;
            background-color: white;
            text-align: center;
            font-family: "Helvetica Neue";
            opacity: 0.6;
            padding: 0 5px;
            z-index: 10;

        }
        img {
            width: 200px;
            display: block;
            z-index: 9;
        }
        button {
            height: 40px;
            line-height: 40px;
            opacity: 0.6;
        }
        `
    ]
})
export class ImageDisplayComponent implements OnInit {

    @Input() image: ImageObject;

    constructor(private clipboardService: ClipboardService, private electronWindowService: ElectronWindowService) { }

    ngOnInit() { }

    copyUrl() {
        this.clipboardService.writeText(`${this.image.fullSizedImageUrl} #gifbar`);
        this.electronWindowService.hideCurrentWindow();
{'fraction_non_alphanumeric': 0.12242824485648972, 'fraction_numerical': 0.014224028448056897, 'mean_word_length': 1.755773268019594, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7639123', 'n_tokens_mistral': 1163, 'n_tokens_neox': 1091, 'n_words': 242}