mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
20.14.2018 9fae05615784eb899c70c91346249680644d0fdf
Modifications are now displayed.
3 files modified
35 ■■■■ changed files
borgbutler-webapp/src/components/views/archives/FileListEntry.jsx 16 ●●●●● patch | view | raw | blame | history
borgbutler-webapp/src/components/views/archives/FileListTable.jsx 5 ●●●●● patch | view | raw | blame | history
borgbutler-webapp/src/css/my-style.css 14 ●●●●● patch | view | raw | blame | history
borgbutler-webapp/src/components/views/archives/FileListEntry.jsx
@@ -34,16 +34,21 @@
}
function FileListEntry({archiveId, diffArchiveId, entry, search, mode, changeCurrentDirectory}) {
    let displayPath = entry.displayPath;
    let downloadArchiveId = archiveId;
    let displayPath = entry.displayPath;
    let pathCss = 'tt';
    let diffCol = undefined;
    if (entry.diffStatus === 'NEW') {
        displayPath = "New: " + displayPath;
        pathCss = 'tt file-new';
        diffCol = <td className={'tt'}>NEW</td>;
    } else if  (entry.diffStatus === 'REMOVED') {
        displayPath = "Rem: " + displayPath;
        pathCss = 'tt file-removed';
        // Download removed files from other archive.
        downloadArchiveId = diffArchiveId;
        diffCol = <td className={'tt'}>REMOVED</td>;
    } else if (entry.diffStatus === 'MODIFIED') {
        displayPath = "Mod: " + displayPath;
        pathCss = 'tt file-modified';
        diffCol = <td className={'tt'}>{entry.differences}</td>;
    }
    let path;
    if (mode === 'tree' && entry.type === 'd') {
@@ -53,7 +58,7 @@
    }
    return (
        <tr>
            <td className={'tt'}>{path}</td>
            <td className={pathCss}>{path}</td>
            <td className={'tt'}>
                <div className={'btn'} onClick={() => download(downloadArchiveId, entry.fileNumber)}>
                    <IconDownload/></div>
@@ -61,6 +66,7 @@
            <td className={'tt'}>{humanFileSize(entry.size, true, true)}</td>
            <td className={'tt'}>{entry.mode}</td>
            <td className={'tt'}>{entry.mtime}</td>
            {diffCol}
        </tr>
    );
}
borgbutler-webapp/src/components/views/archives/FileListTable.jsx
@@ -5,6 +5,10 @@
function FileListTable({archiveId, diffArchiveId, entries, search, mode, changeCurrentDirectory}) {
    const lowercaseSearch = search.split(' ')[0].toLowerCase();
    let diffCol = undefined;
    if (diffArchiveId) {
        diffCol = <th>Modification</th>;
    }
    return (
        <Table striped bordered hover size={'sm'} responsive>
            <thead>
@@ -14,6 +18,7 @@
                <th>Size</th>
                <th>Mode</th>
                <th>Modified time</th>
                {diffCol}
            </tr>
            </thead>
            <tbody>
borgbutler-webapp/src/css/my-style.css
@@ -359,6 +359,20 @@
    text-align: right;
}
td.file-removed {
    text-decoration: line-through;
    color: red;
}
td.file-new {
    text-decoration: underline;
    font-weight: bold;
}
td.file-modified {
    color: red;
}
/* @media only screen and (max-width: 1050px) {
    .navbar.navbar-light a.nav-link {
        font-size: 0.8rem;