1 |
package Frey::Web; |
package Frey::Web; |
2 |
use Moose::Role; |
use Moose::Role; |
3 |
|
|
4 |
|
with 'Frey::Session'; |
5 |
|
|
6 |
use Frey::Types; |
use Frey::Types; |
7 |
|
|
8 |
use Continuity::Widget::DomNode; |
#use Continuity::Widget::DomNode; |
9 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
10 |
use Carp qw/confess cluck/; |
use Carp qw/confess cluck/; |
11 |
use File::Slurp; |
use File::Slurp; |
107 |
} |
} |
108 |
} |
} |
109 |
|
|
|
sub dom2html { |
|
|
# warn "## dom2html ",dump( @_ ); |
|
|
return Continuity::Widget::DomNode->create( @_ )->to_string; |
|
|
} |
|
|
|
|
110 |
sub _inline_path { |
sub _inline_path { |
111 |
my ( $self, $path ) = @_; |
my ( $self, $path ) = @_; |
112 |
-s $path < $self->inline_smaller_than; |
-s $path < $self->inline_smaller_than; |
352 |
warn "# $class from $self icon_path $path"; |
warn "# $class from $self icon_path $path"; |
353 |
return $path; |
return $path; |
354 |
} else { |
} else { |
355 |
warn "TODO: add $path icon for $class"; |
$self->TODO( "add $path icon for $class" ); |
356 |
return undef; |
return undef; |
357 |
} |
} |
358 |
} |
} |