<commit_before>// Config variables

$circle-size: 50px;
$loading-ring-thickness: 5px;

// Animations

@keyframes file-download-rotater {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


// Styling

.message-media {

    .in-view-indicator {
        position: absolute;
        width: 100%;
        height: 100%;
    }

    // up/downloading circle element
    .circle {
        height: $circle-size;
        width: $circle-size;
        background-color: grey;
        outline: none;
        position: relative;
        border-radius: $circle-size / 2;
        display: flex;
        // centering element
        &.center {
            margin: 0 auto;
        }
        i,
        img {
            color: white;
            margin: auto auto;
            position: relative;
        }
    }

    // Loading indicator
    .loading.active {
        display: block;
        width: $circle-size - 2 * $loading-ring-thickness;
        height: $circle-size - 2 * $loading-ring-thickness;
        border: $loading-ring-thickness solid rgba(0, 0, 0, 0.1);
        border-left-color: lightgreen;
        animation: file-download-rotater 1.1s infinite linear;
        border-radius: 50%;
        position: absolute;
        top: 0;
        left: 0;
    }

    // Thumbnails (Images, GIFs, Locations, ...)
    .thumbnail {
        // For absolute positioning of children
        position: relative;

        // for big pictures
        overflow: hidden;

        // Make it clickable
        @include mouse-hand;

        // Show/hide logic
        .loading-wrapper {
            display: none;
            &.active {
                z-index: 10;
                display: block;
            }
        }

        // max size of a thumbnail

        // Styling of loader
        .loading-wrapper {
            position: absolute;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.2);
            .loading {
                display: block;
                position: absolute;
                top: calc(50% - #{$circle-size/2} - 1em);
                left: calc(50% - #{$circle-size/2});
                width: $circle-size - 2 * $loading-ring-thickness;
                height: $circle-size - 2 * $loading-ring-thickness;
                border: $loading-ring-thickness solid rgba(255, 255, 255, 0.3);
                border-left-color: lightgreen;
                animation: file-download-rotater 1.1s infinite linear;
                border-radius: 50%;
            }
            .loading-text {
                display: block;
                text-align: center;
                width: 100%;
                color: white;
                height: 1em;
                position: absolute;
                top: calc(50% + #{$circle-size/2});
            }
        }

        .overlay {
            &.video, &.gif {
                position: absolute;
                width: 100%;
                height: 100%;
                i {
                    line-height: $circle-size;
                    font-size: $circle-size;
                    position: absolute;
                    top: calc(50% - #{$circle-size/2});
                    left: calc(50% - #{$circle-size/2});
                }
            }
        }
    }

    // File messages (Files, Audio, ...)
    .file-message {
        height: $circle-size;
        @include mouse-hand;


        .message-text {
            padding-top: 8px;
        }

        .info {
            position: relative;
            margin-left: $circle-size + 16px;
            top: -$circle-size;
            height: $circle-size;
            line-height: $circle-size;
            p {
                margin: 0;
                line-height: normal;
                padding: 0;
                font-size: 10pt;
            }

            p:first-child {
                font-size: 100%;
            }
        }

    }

    img {
        max-width: 100%;
    }
}
<commit_msg>Show ellipsis on long file names (#75)<commit_after>// Config variables

$circle-size: 50px;
$loading-ring-thickness: 5px;

// Animations

@keyframes file-download-rotater {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


// Styling

.message-media {

    .in-view-indicator {
        position: absolute;
        width: 100%;
        height: 100%;
    }

    // up/downloading circle element
    .circle {
        height: $circle-size;
        width: $circle-size;
        background-color: grey;
        outline: none;
        position: relative;
        border-radius: $circle-size / 2;
        display: flex;
        // centering element
        &.center {
            margin: 0 auto;
        }
        i,
        img {
            color: white;
            margin: auto auto;
            position: relative;
        }
    }

    // Loading indicator
    .loading.active {
        display: block;
        width: $circle-size - 2 * $loading-ring-thickness;
        height: $circle-size - 2 * $loading-ring-thickness;
        border: $loading-ring-thickness solid rgba(0, 0, 0, 0.1);
        border-left-color: lightgreen;
        animation: file-download-rotater 1.1s infinite linear;
        border-radius: 50%;
        position: absolute;
        top: 0;
        left: 0;
    }

    // Thumbnails (Images, GIFs, Locations, ...)
    .thumbnail {
        // For absolute positioning of children
        position: relative;

        // for big pictures
        overflow: hidden;

        // Make it clickable
        @include mouse-hand;

        // Show/hide logic
        .loading-wrapper {
            display: none;
            &.active {
                z-index: 10;
                display: block;
            }
        }

        // max size of a thumbnail

        // Styling of loader
        .loading-wrapper {
            position: absolute;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.2);
            .loading {
                display: block;
                position: absolute;
                top: calc(50% - #{$circle-size/2} - 1em);
                left: calc(50% - #{$circle-size/2});
                width: $circle-size - 2 * $loading-ring-thickness;
                height: $circle-size - 2 * $loading-ring-thickness;
                border: $loading-ring-thickness solid rgba(255, 255, 255, 0.3);
                border-left-color: lightgreen;
                animation: file-download-rotater 1.1s infinite linear;
                border-radius: 50%;
            }
            .loading-text {
                display: block;
                text-align: center;
                width: 100%;
                color: white;
                height: 1em;
                position: absolute;
                top: calc(50% + #{$circle-size/2});
            }
        }

        .overlay {
            &.video, &.gif {
                position: absolute;
                width: 100%;
                height: 100%;
                i {
                    line-height: $circle-size;
                    font-size: $circle-size;
                    position: absolute;
                    top: calc(50% - #{$circle-size/2});
                    left: calc(50% - #{$circle-size/2});
                }
            }
        }
    }

    // File messages (Files, Audio, ...)
    .file-message {
        height: $circle-size;
        @include mouse-hand;


        .message-text {
            padding-top: 8px;
        }

        .info {
            position: relative;
            margin-left: $circle-size + 16px;
            top: -$circle-size;
            height: $circle-size;
            line-height: $circle-size;
            p {
                margin: 0;
                line-height: normal;
                padding: 0;
                font-size: 10pt;
                text-overflow: ellipsis;
                overflow: hidden;
            }

            p:first-child {
                font-size: 100%;
            }
        }

    }

    img {
        max-width: 100%;
    }
}

{'fraction_non_alphanumeric': 0.1152232913890945, 'fraction_numerical': 0.025166543301258327, 'mean_word_length': 1.1367949393779653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6599707', 'n_tokens_mistral': 2507, 'n_tokens_neox': 2201, 'n_words': 528}