mirror of
https://github.com/git-touch/git-touch
synced 2025-02-07 15:18:47 +01:00
improvement(github): add font exts
This commit is contained in:
parent
32d29f6f0b
commit
97bb7165f7
@ -9,7 +9,6 @@ import 'package:git_touch/widgets/object_tree.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:path/path.dart' as p;
|
|
||||||
import 'package:git_touch/utils/utils.dart';
|
import 'package:git_touch/utils/utils.dart';
|
||||||
|
|
||||||
final objectRouter = RouterScreen('/:owner/:name/blob/:ref', (context, params) {
|
final objectRouter = RouterScreen('/:owner/:name/blob/:ref', (context, params) {
|
||||||
@ -60,8 +59,22 @@ class ObjectScreen extends StatelessWidget {
|
|||||||
items: items.map((v) {
|
items: items.map((v) {
|
||||||
// if (item.type == 'commit') return null;
|
// if (item.type == 'commit') return null;
|
||||||
String url;
|
String url;
|
||||||
if (['pdf', 'docx', 'doc', 'pptx', 'ppt', 'xlsx', 'xls']
|
if ([
|
||||||
.contains(v.name.ext)) {
|
// Docs
|
||||||
|
'pdf',
|
||||||
|
'docx',
|
||||||
|
'doc',
|
||||||
|
'pptx',
|
||||||
|
'ppt',
|
||||||
|
'xlsx',
|
||||||
|
'xls',
|
||||||
|
// Fonts
|
||||||
|
'ttf',
|
||||||
|
'otf',
|
||||||
|
'eot',
|
||||||
|
'woff',
|
||||||
|
'woff2'
|
||||||
|
].contains(v.name.ext)) {
|
||||||
// Let system browser handle these files
|
// Let system browser handle these files
|
||||||
//
|
//
|
||||||
// TODO:
|
// TODO:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user